generated-configure.sh revision 2621:f6e365a5e489
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
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666ELF_LIBS
667ELF_CFLAGS
668STLPORT_LIB
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIB_FILE
686ENABLE_LIBFFI_BUNDLING
687LIBFFI_LIBS
688LIBFFI_CFLAGS
689ALSA_LIBS
690ALSA_CFLAGS
691FREETYPE_BUNDLE_LIB_PATH
692FREETYPE_LIBS
693FREETYPE_CFLAGS
694CUPS_CFLAGS
695X_EXTRA_LIBS
696X_LIBS
697X_PRE_LIBS
698X_CFLAGS
699XMKMF
700MSVCP_DLL
701MSVCR_DLL
702LIBCXX
703FIXPATH_DETACH_FLAG
704FIXPATH
705BUILD_GTEST
706ENABLE_AOT
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796BUILD_AS
797BUILD_LDCXX
798BUILD_LD
799BUILD_STRIP
800BUILD_OBJCOPY
801BUILD_AR
802BUILD_NM
803BUILD_CXX
804BUILD_CC
805BUILD_SYSROOT_LDFLAGS
806BUILD_SYSROOT_CFLAGS
807ac_ct_OBJDUMP
808OBJDUMP
809ac_ct_OBJCOPY
810OBJCOPY
811ac_ct_NM
812ac_ct_STRIP
813GNM
814NM
815STRIP
816MSBUILD
817DUMPBIN
818RC
819MT
820LIPO
821ac_ct_AR
822AR
823AS
824LDCXX
825LD
826CXXCPP
827CPP
828CXX_VERSION_NUMBER
829CC_VERSION_NUMBER
830ac_ct_CXX
831CXXFLAGS
832CXX
833TOOLCHAIN_PATH_CXX
834POTENTIAL_CXX
835OBJEXT
836EXEEXT
837ac_ct_CC
838CPPFLAGS
839LDFLAGS
840CFLAGS
841CC
842TOOLCHAIN_PATH_CC
843POTENTIAL_CC
844TOOLCHAIN_VERSION
845VS_LIB
846VS_INCLUDE
847VS_PATH
848CYGWIN_LINK
849SYSROOT_LDFLAGS
850SYSROOT_CFLAGS
851EXTRA_LDFLAGS
852EXTRA_CXXFLAGS
853EXTRA_CFLAGS
854EXE_SUFFIX
855OBJ_SUFFIX
856STATIC_LIBRARY
857SHARED_LIBRARY
858STATIC_LIBRARY_SUFFIX
859SHARED_LIBRARY_SUFFIX
860LIBRARY_PREFIX
861TOOLCHAIN_TYPE
862STATIC_BUILD
863IMPORT_MODULES_MAKE
864IMPORT_MODULES_SRC
865IMPORT_MODULES_MAN
866IMPORT_MODULES_LEGAL
867IMPORT_MODULES_CONF
868IMPORT_MODULES_LIBS
869IMPORT_MODULES_CMDS
870IMPORT_MODULES_CLASSES
871BUILD_OUTPUT
872JDK_TOPDIR
873NASHORN_TOPDIR
874HOTSPOT_TOPDIR
875JAXWS_TOPDIR
876JAXP_TOPDIR
877CORBA_TOPDIR
878LANGTOOLS_TOPDIR
879EXTERNAL_BUILDJDK
880BUILD_JDK
881CREATE_BUILDJDK
882JLINK
883JMOD
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_FULL_DOCS
922ENABLE_HEADLESS_ONLY
923DEFAULT_MAKE_TARGET
924OS_VERSION_MICRO
925OS_VERSION_MINOR
926OS_VERSION_MAJOR
927PKG_CONFIG
928BASH_ARGS
929SETFILE
930CODESIGN
931XATTR
932DSYMUTIL
933IS_GNU_TIME
934PATCH
935DTRACE
936TIME
937STAT
938HG
939DOT
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964JVM_VARIANT_MAIN
965VALID_JVM_VARIANTS
966JVM_VARIANTS
967DEBUG_LEVEL
968HOTSPOT_DEBUG_LEVEL
969JDK_VARIANT
970USERNAME
971CANONICAL_TOPDIR
972ORIGINAL_TOPDIR
973TOPDIR
974PATH_SEP
975HOTSPOT_BUILD_CPU_DEFINE
976HOTSPOT_BUILD_CPU_ARCH
977HOTSPOT_BUILD_CPU
978HOTSPOT_BUILD_OS_TYPE
979HOTSPOT_BUILD_OS
980OPENJDK_BUILD_BUNDLE_PLATFORM
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_OSARCH
983OPENJDK_BUILD_CPU_ISADIR
984OPENJDK_BUILD_CPU_LEGACY_LIB
985OPENJDK_BUILD_CPU_LEGACY
986HOTSPOT_TARGET_CPU_DEFINE
987HOTSPOT_TARGET_CPU_ARCH
988HOTSPOT_TARGET_CPU
989HOTSPOT_TARGET_OS_TYPE
990HOTSPOT_TARGET_OS
991DEFINE_CROSS_COMPILE_ARCH
992OPENJDK_TARGET_BUNDLE_PLATFORM
993OPENJDK_TARGET_OS_EXPORT_DIR
994OPENJDK_TARGET_CPU_OSARCH
995OPENJDK_TARGET_CPU_ISADIR
996OPENJDK_TARGET_CPU_LEGACY_LIB
997OPENJDK_TARGET_CPU_LEGACY
998RELEASE_FILE_OS_ARCH
999RELEASE_FILE_OS_NAME
1000OPENJDK_MODULE_TARGET_PLATFORM
1001COMPILE_TYPE
1002OPENJDK_TARGET_CPU_ENDIAN
1003OPENJDK_TARGET_CPU_BITS
1004OPENJDK_TARGET_CPU_ARCH
1005OPENJDK_TARGET_CPU
1006OPENJDK_TARGET_OS_ENV
1007OPENJDK_TARGET_OS_TYPE
1008OPENJDK_TARGET_OS
1009OPENJDK_BUILD_CPU_ENDIAN
1010OPENJDK_BUILD_CPU_BITS
1011OPENJDK_BUILD_CPU_ARCH
1012OPENJDK_BUILD_CPU
1013OPENJDK_BUILD_OS_ENV
1014OPENJDK_BUILD_OS_TYPE
1015OPENJDK_BUILD_OS
1016OPENJDK_BUILD_AUTOCONF_NAME
1017OPENJDK_TARGET_AUTOCONF_NAME
1018target_os
1019target_vendor
1020target_cpu
1021target
1022host_os
1023host_vendor
1024host_cpu
1025host
1026build_os
1027build_vendor
1028build_cpu
1029build
1030PANDOC
1031NICE
1032CPIO
1033DF
1034READLINK
1035CYGPATH
1036SED
1037FGREP
1038EGREP
1039GREP
1040AWK
1041XARGS
1042WHICH
1043WC
1044UNIQ
1045UNAME
1046TR
1047TOUCH
1048TEE
1049TAR
1050TAIL
1051SORT
1052SH
1053RMDIR
1054RM
1055PRINTF
1056NAWK
1057MV
1058MKTEMP
1059MKDIR
1060LS
1061LN
1062GZIP
1063GUNZIP
1064HEAD
1065FIND
1066FILE
1067EXPR
1068ECHO
1069DIRNAME
1070DIFF
1071DATE
1072CUT
1073CP
1074COMM
1075CMP
1076CHMOD
1077CAT
1078BASH
1079BASENAME
1080DATE_WHEN_CONFIGURED
1081ORIGINAL_PATH
1082CONFIGURE_COMMAND_LINE
1083target_alias
1084host_alias
1085build_alias
1086LIBS
1087ECHO_T
1088ECHO_N
1089ECHO_C
1090DEFS
1091mandir
1092localedir
1093libdir
1094psdir
1095pdfdir
1096dvidir
1097htmldir
1098infodir
1099docdir
1100oldincludedir
1101includedir
1102localstatedir
1103sharedstatedir
1104sysconfdir
1105datadir
1106datarootdir
1107libexecdir
1108sbindir
1109bindir
1110program_transform_name
1111prefix
1112exec_prefix
1113PACKAGE_URL
1114PACKAGE_BUGREPORT
1115PACKAGE_STRING
1116PACKAGE_VERSION
1117PACKAGE_TARNAME
1118PACKAGE_NAME
1119PATH_SEPARATOR
1120SHELL'
1121ac_subst_files=''
1122ac_user_opts='
1123enable_option_checking
1124with_target_bits
1125enable_openjdk_only
1126with_custom_make_dir
1127with_jdk_variant
1128enable_debug
1129with_debug_level
1130with_jvm_variants
1131with_cpu_port
1132with_devkit
1133with_sys_root
1134with_sysroot
1135with_tools_dir
1136with_toolchain_path
1137with_extra_path
1138with_sdk_name
1139with_conf_name
1140with_output_sync
1141with_default_make_target
1142enable_headless_only
1143enable_full_docs
1144with_cacerts_file
1145enable_unlimited_crypto
1146with_copyright_year
1147enable_keep_packaged_modules
1148with_milestone
1149with_update_version
1150with_user_release_suffix
1151with_build_number
1152with_version_string
1153with_version_pre
1154with_version_opt
1155with_version_build
1156with_version_major
1157with_version_minor
1158with_version_security
1159with_version_patch
1160with_boot_jdk
1161with_build_jdk
1162with_add_source_root
1163with_override_source_root
1164with_adds_and_overrides
1165with_override_langtools
1166with_override_corba
1167with_override_jaxp
1168with_override_jaxws
1169with_override_hotspot
1170with_override_nashorn
1171with_override_jdk
1172with_import_hotspot
1173with_import_modules
1174enable_static_build
1175with_toolchain_type
1176with_extra_cflags
1177with_extra_cxxflags
1178with_extra_ldflags
1179with_toolchain_version
1180with_build_devkit
1181with_jtreg
1182with_abi_profile
1183enable_warnings_as_errors
1184with_native_debug_symbols
1185enable_debug_symbols
1186enable_zip_debug_info
1187enable_native_coverage
1188enable_dtrace
1189enable_aot
1190enable_hotspot_gtest
1191with_stdc__lib
1192with_msvcr_dll
1193with_msvcp_dll
1194with_x
1195with_cups
1196with_cups_include
1197with_freetype
1198with_freetype_include
1199with_freetype_lib
1200with_freetype_src
1201enable_freetype_bundling
1202with_alsa
1203with_alsa_include
1204with_alsa_lib
1205with_libffi
1206with_libffi_include
1207with_libffi_lib
1208enable_libffi_bundling
1209with_libjpeg
1210with_giflib
1211with_libpng
1212with_zlib
1213with_lcms
1214with_dxsdk
1215with_dxsdk_lib
1216with_dxsdk_include
1217with_libelf
1218with_libelf_include
1219with_libelf_lib
1220with_jvm_features
1221with_jvm_interpreter
1222enable_jtreg_failure_handler
1223enable_generate_classlist
1224with_num_cores
1225with_memory_size
1226with_jobs
1227with_test_jobs
1228with_boot_jdk_jvmargs
1229with_sjavac_server_java
1230enable_sjavac
1231enable_javac_server
1232enable_icecc
1233enable_precompiled_headers
1234enable_ccache
1235with_ccache_dir
1236'
1237      ac_precious_vars='build_alias
1238host_alias
1239target_alias
1240BASENAME
1241BASH
1242CAT
1243CHMOD
1244CMP
1245COMM
1246CP
1247CUT
1248DATE
1249DIFF
1250DIRNAME
1251ECHO
1252EXPR
1253FILE
1254FIND
1255HEAD
1256GUNZIP
1257GZIP
1258LN
1259LS
1260MKDIR
1261MKTEMP
1262MV
1263NAWK
1264PRINTF
1265RM
1266RMDIR
1267SH
1268SORT
1269TAIL
1270TAR
1271TEE
1272TOUCH
1273TR
1274UNAME
1275UNIQ
1276WC
1277WHICH
1278XARGS
1279AWK
1280GREP
1281EGREP
1282FGREP
1283SED
1284CYGPATH
1285READLINK
1286DF
1287CPIO
1288NICE
1289PANDOC
1290MAKE
1291UNZIP
1292ZIPEXE
1293LDD
1294OTOOL
1295READELF
1296DOT
1297HG
1298STAT
1299TIME
1300DTRACE
1301PATCH
1302DSYMUTIL
1303XATTR
1304CODESIGN
1305SETFILE
1306PKG_CONFIG
1307JAVA
1308JAVAC
1309JAVAH
1310JAR
1311JARSIGNER
1312CC
1313CFLAGS
1314LDFLAGS
1315LIBS
1316CPPFLAGS
1317CXX
1318CXXFLAGS
1319CCC
1320CPP
1321CXXCPP
1322AS
1323AR
1324LIPO
1325STRIP
1326NM
1327GNM
1328OBJCOPY
1329OBJDUMP
1330BUILD_CC
1331BUILD_CXX
1332BUILD_NM
1333BUILD_AR
1334BUILD_OBJCOPY
1335BUILD_STRIP
1336JTREGEXE
1337XMKMF
1338FREETYPE_CFLAGS
1339FREETYPE_LIBS
1340ALSA_CFLAGS
1341ALSA_LIBS
1342LIBFFI_CFLAGS
1343LIBFFI_LIBS
1344PNG_CFLAGS
1345PNG_LIBS
1346LCMS_CFLAGS
1347LCMS_LIBS
1348ELF_CFLAGS
1349ELF_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-full-docs      build complete documentation [enabled if all tools
1978                          found]
1979  --disable-unlimited-crypto
1980                          Disable unlimited crypto policy [enabled]
1981  --disable-keep-packaged-modules
1982                          Do not keep packaged modules in jdk image [enable]
1983  --enable-static-build   enable static library build [disabled]
1984  --disable-warnings-as-errors
1985                          do not consider native warnings to be an error
1986                          [enabled]
1987  --enable-debug-symbols  Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-zip-debug-info Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-native-coverage
1992                          enable native compilation with code coverage
1993                          data[disabled]
1994  --enable-dtrace[=yes/no/auto]
1995                          enable dtrace. Default is auto, where dtrace is
1996                          enabled if all dependencies are present.
1997  --enable-aot[=yes/no/auto]
1998                          enable ahead of time compilation feature. Default is
1999                          auto, where aot is enabled if all dependencies are
2000                          present.
2001  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2002  --disable-freetype-bundling
2003                          disable bundling of the freetype library with the
2004                          build result [enabled on Windows or when using
2005                          --with-freetype, disabled otherwise]
2006  --enable-libffi-bundling
2007                          enable bundling of libffi.so to make the built JDK
2008                          runnable on more systems
2009  --enable-jtreg-failure-handler
2010                          forces build of the jtreg failure handler to be
2011                          enabled, missing dependencies become fatal errors.
2012                          Default is auto, where the failure handler is built
2013                          if all dependencies are present and otherwise just
2014                          disabled.
2015  --disable-generate-classlist
2016                          forces enabling or disabling of the generation of a
2017                          CDS classlist at build time. Default is to generate
2018                          it when either the server or client JVMs are built.
2019  --enable-sjavac         use sjavac to do fast incremental compiles
2020                          [disabled]
2021  --disable-javac-server  disable javac server [enabled]
2022  --enable-icecc          enable distribted compilation of native code using
2023                          icecc/icecream [disabled]
2024  --disable-precompiled-headers
2025                          disable using precompiled headers when compiling C++
2026                          [enabled]
2027  --enable-ccache         enable using ccache to speed up recompilations
2028                          [disabled]
2029
2030Optional Packages:
2031  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2032  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2033  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2034                          support it), e.g. --with-target-bits=32 [guessed]
2035  --with-custom-make-dir  Deprecated. Option is kept for backwards
2036                          compatibility and is ignored
2037  --with-jdk-variant      JDK variant to build (normal) [normal]
2038  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2039                          optimized) [release]
2040  --with-jvm-variants     JVM variants (separated by commas) to build
2041                          (server,client,minimal,core,zero,zeroshark,custom)
2042                          [server]
2043  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2044                          (arm64,aarch64) [aarch64]
2045  --with-devkit           use this devkit for compilers, tools and resources
2046  --with-sys-root         alias for --with-sysroot for backwards compatability
2047  --with-sysroot          use this directory as sysroot
2048  --with-tools-dir        alias for --with-toolchain-path for backwards
2049                          compatibility
2050  --with-toolchain-path   prepend these directories when searching for
2051                          toolchain binaries (compilers etc)
2052  --with-extra-path       prepend these directories to the default path
2053  --with-sdk-name         use the platform SDK of the given name. [macosx]
2054  --with-conf-name        use this as the name of the configuration [generated
2055                          from important configuration options]
2056  --with-output-sync      set make output sync type if supported by make.
2057                          [recurse]
2058  --with-default-make-target
2059                          set the default make target [exploded-image]
2060  --with-cacerts-file     specify alternative cacerts file
2061  --with-copyright-year   Set copyright year value for build [current year]
2062  --with-milestone        Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-update-version   Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-user-release-suffix
2067                          Deprecated. Option is kept for backwards
2068                          compatibility and is ignored
2069  --with-build-number     Deprecated. Option is kept for backwards
2070                          compatibility and is ignored
2071  --with-version-string   Set version string [calculated]
2072  --with-version-pre      Set the base part of the version 'PRE' field
2073                          (pre-release identifier) ['internal']
2074  --with-version-opt      Set version 'OPT' field (build metadata)
2075                          [<timestamp>.<user>.<dirname>]
2076  --with-version-build    Set version 'BUILD' field (build number) [not
2077                          specified]
2078  --with-version-major    Set version 'MAJOR' field (first number) [current
2079                          source value]
2080  --with-version-minor    Set version 'MINOR' field (second number) [current
2081                          source value]
2082  --with-version-security Set version 'SECURITY' field (third number) [current
2083                          source value]
2084  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2085                          specified]
2086  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2087  --with-build-jdk        path to JDK of same version as is being built[the
2088                          newly built JDK]
2089  --with-add-source-root  Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-source-root
2092                          Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-adds-and-overrides
2095                          Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-langtools
2098                          Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-corba   Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-override-jaxp    Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-jaxws   Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-hotspot Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-nashorn Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-jdk     Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-import_hotspot   Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-import-modules   import a set of prebuilt modules either as a zip
2115                          file or an exploded directory
2116  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2117                          to show possible values [platform dependent]
2118  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2119  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2120  --with-extra-ldflags    extra flags to be used when linking jdk
2121  --with-toolchain-version
2122                          the version of the toolchain to look for, use
2123                          '--help' to show possible values [platform
2124                          dependent]
2125  --with-build-devkit     Devkit to use for the build platform toolchain
2126  --with-jtreg            Regression Test Harness [probed]
2127  --with-abi-profile      specify ABI profile for ARM builds
2128                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2129                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2130                          [toolchain dependent]
2131  --with-native-debug-symbols
2132                          set the native debug symbol configuration (none,
2133                          internal, external, zipped) [varying]
2134  --with-stdc++lib=<static>,<dynamic>,<default>
2135                          force linking of the C++ runtime on Linux to either
2136                          static or dynamic, default is static with dynamic as
2137                          fallback
2138  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2139                          (Windows only) [probed]
2140  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2141                          (Windows only) [probed]
2142  --with-x                use the X Window System
2143  --with-cups             specify prefix directory for the cups package
2144                          (expecting the headers under PATH/include)
2145  --with-cups-include     specify directory for the cups include files
2146  --with-freetype         specify prefix directory for the freetype package
2147                          (expecting the libraries under PATH/lib and the
2148                          headers under PATH/include)
2149  --with-freetype-include specify directory for the freetype include files
2150  --with-freetype-lib     specify directory for the freetype library
2151  --with-freetype-src     specify directory with freetype sources to
2152                          automatically build the library (experimental,
2153                          Windows-only)
2154  --with-alsa             specify prefix directory for the alsa package
2155                          (expecting the libraries under PATH/lib and the
2156                          headers under PATH/include)
2157  --with-alsa-include     specify directory for the alsa include files
2158  --with-alsa-lib         specify directory for the alsa library
2159  --with-libffi           specify prefix directory for the libffi package
2160                          (expecting the libraries under PATH/lib and the
2161                          headers under PATH/include)
2162  --with-libffi-include   specify directory for the libffi include files
2163  --with-libffi-lib       specify directory for the libffi library
2164  --with-libjpeg          use libjpeg from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-giflib           use giflib from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-libpng           use libpng from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-zlib             use zlib from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-lcms             use lcms2 from build system or OpenJDK source
2173                          (system, bundled) [bundled]
2174  --with-dxsdk            Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-dxsdk-include    Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-libelf           specify prefix directory for the libelf package
2181                          (expecting the libraries under PATH/lib and the
2182                          headers under PATH/include)
2183  --with-libelf-include   specify directory for the libelf include files
2184  --with-libelf-lib       specify directory for the libelf library
2185  --with-jvm-features     additional JVM features to enable (separated by
2186                          comma), use '--help' to show possible values [none]
2187  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2188                          compatibility and is ignored
2189  --with-num-cores        number of cores in the build system, e.g.
2190                          --with-num-cores=8 [probed]
2191  --with-memory-size      memory (in MB) available in the build system, e.g.
2192                          --with-memory-size=1024 [probed]
2193  --with-jobs             number of parallel jobs to let make run [calculated
2194                          based on cores and memory]
2195  --with-test-jobs        number of parallel tests jobs to run [based on build
2196                          jobs]
2197  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2198                          invocations of boot JDK, overriding the default
2199                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2200                          -enableassertions"
2201  --with-sjavac-server-java
2202                          use this java binary for running the sjavac
2203                          background server [Boot JDK java]
2204  --with-ccache-dir       where to store ccache files [~/.ccache]
2205
2206Some influential environment variables:
2207  BASENAME    Override default value for BASENAME
2208  BASH        Override default value for BASH
2209  CAT         Override default value for CAT
2210  CHMOD       Override default value for CHMOD
2211  CMP         Override default value for CMP
2212  COMM        Override default value for COMM
2213  CP          Override default value for CP
2214  CUT         Override default value for CUT
2215  DATE        Override default value for DATE
2216  DIFF        Override default value for DIFF
2217  DIRNAME     Override default value for DIRNAME
2218  ECHO        Override default value for ECHO
2219  EXPR        Override default value for EXPR
2220  FILE        Override default value for FILE
2221  FIND        Override default value for FIND
2222  HEAD        Override default value for HEAD
2223  GUNZIP      Override default value for GUNZIP
2224  GZIP        Override default value for GZIP
2225  LN          Override default value for LN
2226  LS          Override default value for LS
2227  MKDIR       Override default value for MKDIR
2228  MKTEMP      Override default value for MKTEMP
2229  MV          Override default value for MV
2230  NAWK        Override default value for NAWK
2231  PRINTF      Override default value for PRINTF
2232  RM          Override default value for RM
2233  RMDIR       Override default value for RMDIR
2234  SH          Override default value for SH
2235  SORT        Override default value for SORT
2236  TAIL        Override default value for TAIL
2237  TAR         Override default value for TAR
2238  TEE         Override default value for TEE
2239  TOUCH       Override default value for TOUCH
2240  TR          Override default value for TR
2241  UNAME       Override default value for UNAME
2242  UNIQ        Override default value for UNIQ
2243  WC          Override default value for WC
2244  WHICH       Override default value for WHICH
2245  XARGS       Override default value for XARGS
2246  AWK         Override default value for AWK
2247  GREP        Override default value for GREP
2248  EGREP       Override default value for EGREP
2249  FGREP       Override default value for FGREP
2250  SED         Override default value for SED
2251  CYGPATH     Override default value for CYGPATH
2252  READLINK    Override default value for READLINK
2253  DF          Override default value for DF
2254  CPIO        Override default value for CPIO
2255  NICE        Override default value for NICE
2256  PANDOC      Override default value for PANDOC
2257  MAKE        Override default value for MAKE
2258  UNZIP       Override default value for UNZIP
2259  ZIPEXE      Override default value for ZIPEXE
2260  LDD         Override default value for LDD
2261  OTOOL       Override default value for OTOOL
2262  READELF     Override default value for READELF
2263  DOT         Override default value for DOT
2264  HG          Override default value for HG
2265  STAT        Override default value for STAT
2266  TIME        Override default value for TIME
2267  DTRACE      Override default value for DTRACE
2268  PATCH       Override default value for PATCH
2269  DSYMUTIL    Override default value for DSYMUTIL
2270  XATTR       Override default value for XATTR
2271  CODESIGN    Override default value for CODESIGN
2272  SETFILE     Override default value for SETFILE
2273  PKG_CONFIG  path to pkg-config utility
2274  JAVA        Override default value for JAVA
2275  JAVAC       Override default value for JAVAC
2276  JAVAH       Override default value for JAVAH
2277  JAR         Override default value for JAR
2278  JARSIGNER   Override default value for JARSIGNER
2279  CC          C compiler command
2280  CFLAGS      C compiler flags
2281  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2282              nonstandard directory <lib dir>
2283  LIBS        libraries to pass to the linker, e.g. -l<library>
2284  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2285              you have headers in a nonstandard directory <include dir>
2286  CXX         C++ compiler command
2287  CXXFLAGS    C++ compiler flags
2288  CPP         C preprocessor
2289  CXXCPP      C++ preprocessor
2290  AS          Override default value for AS
2291  AR          Override default value for AR
2292  LIPO        Override default value for LIPO
2293  STRIP       Override default value for STRIP
2294  NM          Override default value for NM
2295  GNM         Override default value for GNM
2296  OBJCOPY     Override default value for OBJCOPY
2297  OBJDUMP     Override default value for OBJDUMP
2298  BUILD_CC    Override default value for BUILD_CC
2299  BUILD_CXX   Override default value for BUILD_CXX
2300  BUILD_NM    Override default value for BUILD_NM
2301  BUILD_AR    Override default value for BUILD_AR
2302  BUILD_OBJCOPY
2303              Override default value for BUILD_OBJCOPY
2304  BUILD_STRIP Override default value for BUILD_STRIP
2305  JTREGEXE    Override default value for JTREGEXE
2306  XMKMF       Path to xmkmf, Makefile generator for X Window System
2307  FREETYPE_CFLAGS
2308              C compiler flags for FREETYPE, overriding pkg-config
2309  FREETYPE_LIBS
2310              linker flags for FREETYPE, overriding pkg-config
2311  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2312  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2313  LIBFFI_CFLAGS
2314              C compiler flags for LIBFFI, overriding pkg-config
2315  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2316  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2317  PNG_LIBS    linker flags for PNG, overriding pkg-config
2318  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2319  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2320  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2321  ELF_LIBS    linker flags for ELF, overriding pkg-config
2322  ICECC_CMD   Override default value for ICECC_CMD
2323  ICECC_CREATE_ENV
2324              Override default value for ICECC_CREATE_ENV
2325  ICECC_WRAPPER
2326              Override default value for ICECC_WRAPPER
2327  CCACHE      Override default value for CCACHE
2328
2329Use these variables to override the choices made by `configure' or to help
2330it to find libraries and programs with nonstandard names/locations.
2331
2332Report bugs to <build-dev@openjdk.java.net>.
2333OpenJDK home page: <http://openjdk.java.net>.
2334_ACEOF
2335ac_status=$?
2336fi
2337
2338if test "$ac_init_help" = "recursive"; then
2339  # If there are subdirs, report their specific --help.
2340  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2341    test -d "$ac_dir" ||
2342      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2343      continue
2344    ac_builddir=.
2345
2346case "$ac_dir" in
2347.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2348*)
2349  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2350  # A ".." for each directory in $ac_dir_suffix.
2351  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2352  case $ac_top_builddir_sub in
2353  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2354  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2355  esac ;;
2356esac
2357ac_abs_top_builddir=$ac_pwd
2358ac_abs_builddir=$ac_pwd$ac_dir_suffix
2359# for backward compatibility:
2360ac_top_builddir=$ac_top_build_prefix
2361
2362case $srcdir in
2363  .)  # We are building in place.
2364    ac_srcdir=.
2365    ac_top_srcdir=$ac_top_builddir_sub
2366    ac_abs_top_srcdir=$ac_pwd ;;
2367  [\\/]* | ?:[\\/]* )  # Absolute name.
2368    ac_srcdir=$srcdir$ac_dir_suffix;
2369    ac_top_srcdir=$srcdir
2370    ac_abs_top_srcdir=$srcdir ;;
2371  *) # Relative name.
2372    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2373    ac_top_srcdir=$ac_top_build_prefix$srcdir
2374    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2375esac
2376ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2377
2378    cd "$ac_dir" || { ac_status=$?; continue; }
2379    # Check for guested configure.
2380    if test -f "$ac_srcdir/configure.gnu"; then
2381      echo &&
2382      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2383    elif test -f "$ac_srcdir/configure"; then
2384      echo &&
2385      $SHELL "$ac_srcdir/configure" --help=recursive
2386    else
2387      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2388    fi || ac_status=$?
2389    cd "$ac_pwd" || { ac_status=$?; break; }
2390  done
2391fi
2392
2393test -n "$ac_init_help" && exit $ac_status
2394if $ac_init_version; then
2395  cat <<\_ACEOF
2396OpenJDK configure jdk9
2397generated by GNU Autoconf 2.69
2398
2399Copyright (C) 2012 Free Software Foundation, Inc.
2400This configure script is free software; the Free Software Foundation
2401gives unlimited permission to copy, distribute and modify it.
2402_ACEOF
2403  exit
2404fi
2405
2406## ------------------------ ##
2407## Autoconf initialization. ##
2408## ------------------------ ##
2409
2410# ac_fn_c_try_compile LINENO
2411# --------------------------
2412# Try to compile conftest.$ac_ext, and return whether this succeeded.
2413ac_fn_c_try_compile ()
2414{
2415  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2416  rm -f conftest.$ac_objext
2417  if { { ac_try="$ac_compile"
2418case "(($ac_try" in
2419  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2420  *) ac_try_echo=$ac_try;;
2421esac
2422eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2423$as_echo "$ac_try_echo"; } >&5
2424  (eval "$ac_compile") 2>conftest.err
2425  ac_status=$?
2426  if test -s conftest.err; then
2427    grep -v '^ *+' conftest.err >conftest.er1
2428    cat conftest.er1 >&5
2429    mv -f conftest.er1 conftest.err
2430  fi
2431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432  test $ac_status = 0; } && {
2433	 test -z "$ac_c_werror_flag" ||
2434	 test ! -s conftest.err
2435       } && test -s conftest.$ac_objext; then :
2436  ac_retval=0
2437else
2438  $as_echo "$as_me: failed program was:" >&5
2439sed 's/^/| /' conftest.$ac_ext >&5
2440
2441	ac_retval=1
2442fi
2443  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2444  as_fn_set_status $ac_retval
2445
2446} # ac_fn_c_try_compile
2447
2448# ac_fn_cxx_try_compile LINENO
2449# ----------------------------
2450# Try to compile conftest.$ac_ext, and return whether this succeeded.
2451ac_fn_cxx_try_compile ()
2452{
2453  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2454  rm -f conftest.$ac_objext
2455  if { { ac_try="$ac_compile"
2456case "(($ac_try" in
2457  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2458  *) ac_try_echo=$ac_try;;
2459esac
2460eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2461$as_echo "$ac_try_echo"; } >&5
2462  (eval "$ac_compile") 2>conftest.err
2463  ac_status=$?
2464  if test -s conftest.err; then
2465    grep -v '^ *+' conftest.err >conftest.er1
2466    cat conftest.er1 >&5
2467    mv -f conftest.er1 conftest.err
2468  fi
2469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2470  test $ac_status = 0; } && {
2471	 test -z "$ac_cxx_werror_flag" ||
2472	 test ! -s conftest.err
2473       } && test -s conftest.$ac_objext; then :
2474  ac_retval=0
2475else
2476  $as_echo "$as_me: failed program was:" >&5
2477sed 's/^/| /' conftest.$ac_ext >&5
2478
2479	ac_retval=1
2480fi
2481  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2482  as_fn_set_status $ac_retval
2483
2484} # ac_fn_cxx_try_compile
2485
2486# ac_fn_c_try_cpp LINENO
2487# ----------------------
2488# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2489ac_fn_c_try_cpp ()
2490{
2491  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492  if { { ac_try="$ac_cpp conftest.$ac_ext"
2493case "(($ac_try" in
2494  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2495  *) ac_try_echo=$ac_try;;
2496esac
2497eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2498$as_echo "$ac_try_echo"; } >&5
2499  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2500  ac_status=$?
2501  if test -s conftest.err; then
2502    grep -v '^ *+' conftest.err >conftest.er1
2503    cat conftest.er1 >&5
2504    mv -f conftest.er1 conftest.err
2505  fi
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; } > conftest.i && {
2508	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2509	 test ! -s conftest.err
2510       }; then :
2511  ac_retval=0
2512else
2513  $as_echo "$as_me: failed program was:" >&5
2514sed 's/^/| /' conftest.$ac_ext >&5
2515
2516    ac_retval=1
2517fi
2518  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519  as_fn_set_status $ac_retval
2520
2521} # ac_fn_c_try_cpp
2522
2523# ac_fn_cxx_try_cpp LINENO
2524# ------------------------
2525# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2526ac_fn_cxx_try_cpp ()
2527{
2528  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529  if { { ac_try="$ac_cpp conftest.$ac_ext"
2530case "(($ac_try" in
2531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532  *) ac_try_echo=$ac_try;;
2533esac
2534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535$as_echo "$ac_try_echo"; } >&5
2536  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2537  ac_status=$?
2538  if test -s conftest.err; then
2539    grep -v '^ *+' conftest.err >conftest.er1
2540    cat conftest.er1 >&5
2541    mv -f conftest.er1 conftest.err
2542  fi
2543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544  test $ac_status = 0; } > conftest.i && {
2545	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2546	 test ! -s conftest.err
2547       }; then :
2548  ac_retval=0
2549else
2550  $as_echo "$as_me: failed program was:" >&5
2551sed 's/^/| /' conftest.$ac_ext >&5
2552
2553    ac_retval=1
2554fi
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556  as_fn_set_status $ac_retval
2557
2558} # ac_fn_cxx_try_cpp
2559
2560# ac_fn_c_try_link LINENO
2561# -----------------------
2562# Try to link conftest.$ac_ext, and return whether this succeeded.
2563ac_fn_c_try_link ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  rm -f conftest.$ac_objext conftest$ac_exeext
2567  if { { ac_try="$ac_link"
2568case "(($ac_try" in
2569  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2570  *) ac_try_echo=$ac_try;;
2571esac
2572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2573$as_echo "$ac_try_echo"; } >&5
2574  (eval "$ac_link") 2>conftest.err
2575  ac_status=$?
2576  if test -s conftest.err; then
2577    grep -v '^ *+' conftest.err >conftest.er1
2578    cat conftest.er1 >&5
2579    mv -f conftest.er1 conftest.err
2580  fi
2581  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2582  test $ac_status = 0; } && {
2583	 test -z "$ac_c_werror_flag" ||
2584	 test ! -s conftest.err
2585       } && test -s conftest$ac_exeext && {
2586	 test "$cross_compiling" = yes ||
2587	 test -x conftest$ac_exeext
2588       }; then :
2589  ac_retval=0
2590else
2591  $as_echo "$as_me: failed program was:" >&5
2592sed 's/^/| /' conftest.$ac_ext >&5
2593
2594	ac_retval=1
2595fi
2596  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2597  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2598  # interfere with the next link command; also delete a directory that is
2599  # left behind by Apple's compiler.  We do this before executing the actions.
2600  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2601  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602  as_fn_set_status $ac_retval
2603
2604} # ac_fn_c_try_link
2605
2606# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2607# ---------------------------------------------------------
2608# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2609# the include files in INCLUDES and setting the cache variable VAR
2610# accordingly.
2611ac_fn_cxx_check_header_mongrel ()
2612{
2613  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2614  if eval \${$3+:} false; then :
2615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2616$as_echo_n "checking for $2... " >&6; }
2617if eval \${$3+:} false; then :
2618  $as_echo_n "(cached) " >&6
2619fi
2620eval ac_res=\$$3
2621	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2622$as_echo "$ac_res" >&6; }
2623else
2624  # Is the header compilable?
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2626$as_echo_n "checking $2 usability... " >&6; }
2627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628/* end confdefs.h.  */
2629$4
2630#include <$2>
2631_ACEOF
2632if ac_fn_cxx_try_compile "$LINENO"; then :
2633  ac_header_compiler=yes
2634else
2635  ac_header_compiler=no
2636fi
2637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2639$as_echo "$ac_header_compiler" >&6; }
2640
2641# Is the header present?
2642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2643$as_echo_n "checking $2 presence... " >&6; }
2644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2645/* end confdefs.h.  */
2646#include <$2>
2647_ACEOF
2648if ac_fn_cxx_try_cpp "$LINENO"; then :
2649  ac_header_preproc=yes
2650else
2651  ac_header_preproc=no
2652fi
2653rm -f conftest.err conftest.i conftest.$ac_ext
2654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2655$as_echo "$ac_header_preproc" >&6; }
2656
2657# So?  What about this header?
2658case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2659  yes:no: )
2660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2661$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2663$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2664    ;;
2665  no:yes:* )
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2667$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2669$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2671$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2673$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2675$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2676( $as_echo "## ----------------------------------------- ##
2677## Report this to build-dev@openjdk.java.net ##
2678## ----------------------------------------- ##"
2679     ) | sed "s/^/$as_me: WARNING:     /" >&2
2680    ;;
2681esac
2682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2683$as_echo_n "checking for $2... " >&6; }
2684if eval \${$3+:} false; then :
2685  $as_echo_n "(cached) " >&6
2686else
2687  eval "$3=\$ac_header_compiler"
2688fi
2689eval ac_res=\$$3
2690	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2691$as_echo "$ac_res" >&6; }
2692fi
2693  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2694
2695} # ac_fn_cxx_check_header_mongrel
2696
2697# ac_fn_cxx_try_run LINENO
2698# ------------------------
2699# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2700# that executables *can* be run.
2701ac_fn_cxx_try_run ()
2702{
2703  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2704  if { { ac_try="$ac_link"
2705case "(($ac_try" in
2706  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2707  *) ac_try_echo=$ac_try;;
2708esac
2709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2710$as_echo "$ac_try_echo"; } >&5
2711  (eval "$ac_link") 2>&5
2712  ac_status=$?
2713  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2714  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2715  { { case "(($ac_try" in
2716  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2717  *) ac_try_echo=$ac_try;;
2718esac
2719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2720$as_echo "$ac_try_echo"; } >&5
2721  (eval "$ac_try") 2>&5
2722  ac_status=$?
2723  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2724  test $ac_status = 0; }; }; then :
2725  ac_retval=0
2726else
2727  $as_echo "$as_me: program exited with status $ac_status" >&5
2728       $as_echo "$as_me: failed program was:" >&5
2729sed 's/^/| /' conftest.$ac_ext >&5
2730
2731       ac_retval=$ac_status
2732fi
2733  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2734  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2735  as_fn_set_status $ac_retval
2736
2737} # ac_fn_cxx_try_run
2738
2739# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2740# ---------------------------------------------------------
2741# Tests whether HEADER exists and can be compiled using the include files in
2742# INCLUDES, setting the cache variable VAR accordingly.
2743ac_fn_cxx_check_header_compile ()
2744{
2745  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2747$as_echo_n "checking for $2... " >&6; }
2748if eval \${$3+:} false; then :
2749  $as_echo_n "(cached) " >&6
2750else
2751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h.  */
2753$4
2754#include <$2>
2755_ACEOF
2756if ac_fn_cxx_try_compile "$LINENO"; then :
2757  eval "$3=yes"
2758else
2759  eval "$3=no"
2760fi
2761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2762fi
2763eval ac_res=\$$3
2764	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2765$as_echo "$ac_res" >&6; }
2766  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767
2768} # ac_fn_cxx_check_header_compile
2769
2770# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2771# ----------------------------------------------
2772# Tries to find the compile-time value of EXPR in a program that includes
2773# INCLUDES, setting VAR accordingly. Returns whether the value could be
2774# computed
2775ac_fn_cxx_compute_int ()
2776{
2777  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2778  if test "$cross_compiling" = yes; then
2779    # Depending upon the size, compute the lo and hi bounds.
2780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h.  */
2782$4
2783int
2784main ()
2785{
2786static int test_array [1 - 2 * !(($2) >= 0)];
2787test_array [0] = 0;
2788return test_array [0];
2789
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794if ac_fn_cxx_try_compile "$LINENO"; then :
2795  ac_lo=0 ac_mid=0
2796  while :; do
2797    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2798/* end confdefs.h.  */
2799$4
2800int
2801main ()
2802{
2803static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2804test_array [0] = 0;
2805return test_array [0];
2806
2807  ;
2808  return 0;
2809}
2810_ACEOF
2811if ac_fn_cxx_try_compile "$LINENO"; then :
2812  ac_hi=$ac_mid; break
2813else
2814  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2815			if test $ac_lo -le $ac_mid; then
2816			  ac_lo= ac_hi=
2817			  break
2818			fi
2819			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2820fi
2821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2822  done
2823else
2824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826$4
2827int
2828main ()
2829{
2830static int test_array [1 - 2 * !(($2) < 0)];
2831test_array [0] = 0;
2832return test_array [0];
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_compile "$LINENO"; then :
2839  ac_hi=-1 ac_mid=-1
2840  while :; do
2841    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2842/* end confdefs.h.  */
2843$4
2844int
2845main ()
2846{
2847static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2848test_array [0] = 0;
2849return test_array [0];
2850
2851  ;
2852  return 0;
2853}
2854_ACEOF
2855if ac_fn_cxx_try_compile "$LINENO"; then :
2856  ac_lo=$ac_mid; break
2857else
2858  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2859			if test $ac_mid -le $ac_hi; then
2860			  ac_lo= ac_hi=
2861			  break
2862			fi
2863			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2864fi
2865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866  done
2867else
2868  ac_lo= ac_hi=
2869fi
2870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873# Binary search between lo and hi bounds.
2874while test "x$ac_lo" != "x$ac_hi"; do
2875  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877/* end confdefs.h.  */
2878$4
2879int
2880main ()
2881{
2882static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2883test_array [0] = 0;
2884return test_array [0];
2885
2886  ;
2887  return 0;
2888}
2889_ACEOF
2890if ac_fn_cxx_try_compile "$LINENO"; then :
2891  ac_hi=$ac_mid
2892else
2893  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2894fi
2895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2896done
2897case $ac_lo in #((
2898?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2899'') ac_retval=1 ;;
2900esac
2901  else
2902    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903/* end confdefs.h.  */
2904$4
2905static long int longval () { return $2; }
2906static unsigned long int ulongval () { return $2; }
2907#include <stdio.h>
2908#include <stdlib.h>
2909int
2910main ()
2911{
2912
2913  FILE *f = fopen ("conftest.val", "w");
2914  if (! f)
2915    return 1;
2916  if (($2) < 0)
2917    {
2918      long int i = longval ();
2919      if (i != ($2))
2920	return 1;
2921      fprintf (f, "%ld", i);
2922    }
2923  else
2924    {
2925      unsigned long int i = ulongval ();
2926      if (i != ($2))
2927	return 1;
2928      fprintf (f, "%lu", i);
2929    }
2930  /* Do not output a trailing newline, as this causes \r\n confusion
2931     on some platforms.  */
2932  return ferror (f) || fclose (f) != 0;
2933
2934  ;
2935  return 0;
2936}
2937_ACEOF
2938if ac_fn_cxx_try_run "$LINENO"; then :
2939  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2940else
2941  ac_retval=1
2942fi
2943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2944  conftest.$ac_objext conftest.beam conftest.$ac_ext
2945rm -f conftest.val
2946
2947  fi
2948  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2949  as_fn_set_status $ac_retval
2950
2951} # ac_fn_cxx_compute_int
2952
2953# ac_fn_cxx_try_link LINENO
2954# -------------------------
2955# Try to link conftest.$ac_ext, and return whether this succeeded.
2956ac_fn_cxx_try_link ()
2957{
2958  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2959  rm -f conftest.$ac_objext conftest$ac_exeext
2960  if { { ac_try="$ac_link"
2961case "(($ac_try" in
2962  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2963  *) ac_try_echo=$ac_try;;
2964esac
2965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2966$as_echo "$ac_try_echo"; } >&5
2967  (eval "$ac_link") 2>conftest.err
2968  ac_status=$?
2969  if test -s conftest.err; then
2970    grep -v '^ *+' conftest.err >conftest.er1
2971    cat conftest.er1 >&5
2972    mv -f conftest.er1 conftest.err
2973  fi
2974  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2975  test $ac_status = 0; } && {
2976	 test -z "$ac_cxx_werror_flag" ||
2977	 test ! -s conftest.err
2978       } && test -s conftest$ac_exeext && {
2979	 test "$cross_compiling" = yes ||
2980	 test -x conftest$ac_exeext
2981       }; then :
2982  ac_retval=0
2983else
2984  $as_echo "$as_me: failed program was:" >&5
2985sed 's/^/| /' conftest.$ac_ext >&5
2986
2987	ac_retval=1
2988fi
2989  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2990  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2991  # interfere with the next link command; also delete a directory that is
2992  # left behind by Apple's compiler.  We do this before executing the actions.
2993  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2994  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2995  as_fn_set_status $ac_retval
2996
2997} # ac_fn_cxx_try_link
2998
2999# ac_fn_cxx_check_func LINENO FUNC VAR
3000# ------------------------------------
3001# Tests whether FUNC exists, setting the cache variable VAR accordingly
3002ac_fn_cxx_check_func ()
3003{
3004  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3006$as_echo_n "checking for $2... " >&6; }
3007if eval \${$3+:} false; then :
3008  $as_echo_n "(cached) " >&6
3009else
3010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3011/* end confdefs.h.  */
3012/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3013   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3014#define $2 innocuous_$2
3015
3016/* System header to define __stub macros and hopefully few prototypes,
3017    which can conflict with char $2 (); below.
3018    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3019    <limits.h> exists even on freestanding compilers.  */
3020
3021#ifdef __STDC__
3022# include <limits.h>
3023#else
3024# include <assert.h>
3025#endif
3026
3027#undef $2
3028
3029/* Override any GCC internal prototype to avoid an error.
3030   Use char because int might match the return type of a GCC
3031   builtin and then its argument prototype would still apply.  */
3032#ifdef __cplusplus
3033extern "C"
3034#endif
3035char $2 ();
3036/* The GNU C library defines this for functions which it implements
3037    to always fail with ENOSYS.  Some functions are actually named
3038    something starting with __ and the normal name is an alias.  */
3039#if defined __stub_$2 || defined __stub___$2
3040choke me
3041#endif
3042
3043int
3044main ()
3045{
3046return $2 ();
3047  ;
3048  return 0;
3049}
3050_ACEOF
3051if ac_fn_cxx_try_link "$LINENO"; then :
3052  eval "$3=yes"
3053else
3054  eval "$3=no"
3055fi
3056rm -f core conftest.err conftest.$ac_objext \
3057    conftest$ac_exeext conftest.$ac_ext
3058fi
3059eval ac_res=\$$3
3060	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3061$as_echo "$ac_res" >&6; }
3062  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3063
3064} # ac_fn_cxx_check_func
3065
3066# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3067# -------------------------------------------------------
3068# Tests whether HEADER exists and can be compiled using the include files in
3069# INCLUDES, setting the cache variable VAR accordingly.
3070ac_fn_c_check_header_compile ()
3071{
3072  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3074$as_echo_n "checking for $2... " >&6; }
3075if eval \${$3+:} false; then :
3076  $as_echo_n "(cached) " >&6
3077else
3078  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3079/* end confdefs.h.  */
3080$4
3081#include <$2>
3082_ACEOF
3083if ac_fn_c_try_compile "$LINENO"; then :
3084  eval "$3=yes"
3085else
3086  eval "$3=no"
3087fi
3088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3089fi
3090eval ac_res=\$$3
3091	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3092$as_echo "$ac_res" >&6; }
3093  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3094
3095} # ac_fn_c_check_header_compile
3096cat >config.log <<_ACEOF
3097This file contains any messages produced by compilers while
3098running configure, to aid debugging if configure makes a mistake.
3099
3100It was created by OpenJDK $as_me jdk9, which was
3101generated by GNU Autoconf 2.69.  Invocation command line was
3102
3103  $ $0 $@
3104
3105_ACEOF
3106exec 5>>config.log
3107{
3108cat <<_ASUNAME
3109## --------- ##
3110## Platform. ##
3111## --------- ##
3112
3113hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3114uname -m = `(uname -m) 2>/dev/null || echo unknown`
3115uname -r = `(uname -r) 2>/dev/null || echo unknown`
3116uname -s = `(uname -s) 2>/dev/null || echo unknown`
3117uname -v = `(uname -v) 2>/dev/null || echo unknown`
3118
3119/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3120/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3121
3122/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3123/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3124/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3125/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3126/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3127/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3128/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3129
3130_ASUNAME
3131
3132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3133for as_dir in $PATH
3134do
3135  IFS=$as_save_IFS
3136  test -z "$as_dir" && as_dir=.
3137    $as_echo "PATH: $as_dir"
3138  done
3139IFS=$as_save_IFS
3140
3141} >&5
3142
3143cat >&5 <<_ACEOF
3144
3145
3146## ----------- ##
3147## Core tests. ##
3148## ----------- ##
3149
3150_ACEOF
3151
3152
3153# Keep a trace of the command line.
3154# Strip out --no-create and --no-recursion so they do not pile up.
3155# Strip out --silent because we don't want to record it for future runs.
3156# Also quote any args containing shell meta-characters.
3157# Make two passes to allow for proper duplicate-argument suppression.
3158ac_configure_args=
3159ac_configure_args0=
3160ac_configure_args1=
3161ac_must_keep_next=false
3162for ac_pass in 1 2
3163do
3164  for ac_arg
3165  do
3166    case $ac_arg in
3167    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3168    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3169    | -silent | --silent | --silen | --sile | --sil)
3170      continue ;;
3171    *\'*)
3172      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3173    esac
3174    case $ac_pass in
3175    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3176    2)
3177      as_fn_append ac_configure_args1 " '$ac_arg'"
3178      if test $ac_must_keep_next = true; then
3179	ac_must_keep_next=false # Got value, back to normal.
3180      else
3181	case $ac_arg in
3182	  *=* | --config-cache | -C | -disable-* | --disable-* \
3183	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3184	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3185	  | -with-* | --with-* | -without-* | --without-* | --x)
3186	    case "$ac_configure_args0 " in
3187	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3188	    esac
3189	    ;;
3190	  -* ) ac_must_keep_next=true ;;
3191	esac
3192      fi
3193      as_fn_append ac_configure_args " '$ac_arg'"
3194      ;;
3195    esac
3196  done
3197done
3198{ ac_configure_args0=; unset ac_configure_args0;}
3199{ ac_configure_args1=; unset ac_configure_args1;}
3200
3201# When interrupted or exit'd, cleanup temporary files, and complete
3202# config.log.  We remove comments because anyway the quotes in there
3203# would cause problems or look ugly.
3204# WARNING: Use '\'' to represent an apostrophe within the trap.
3205# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3206trap 'exit_status=$?
3207  # Save into config.log some information that might help in debugging.
3208  {
3209    echo
3210
3211    $as_echo "## ---------------- ##
3212## Cache variables. ##
3213## ---------------- ##"
3214    echo
3215    # The following way of writing the cache mishandles newlines in values,
3216(
3217  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3218    eval ac_val=\$$ac_var
3219    case $ac_val in #(
3220    *${as_nl}*)
3221      case $ac_var in #(
3222      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3223$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3224      esac
3225      case $ac_var in #(
3226      _ | IFS | as_nl) ;; #(
3227      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3228      *) { eval $ac_var=; unset $ac_var;} ;;
3229      esac ;;
3230    esac
3231  done
3232  (set) 2>&1 |
3233    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3234    *${as_nl}ac_space=\ *)
3235      sed -n \
3236	"s/'\''/'\''\\\\'\'''\''/g;
3237	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3238      ;; #(
3239    *)
3240      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3241      ;;
3242    esac |
3243    sort
3244)
3245    echo
3246
3247    $as_echo "## ----------------- ##
3248## Output variables. ##
3249## ----------------- ##"
3250    echo
3251    for ac_var in $ac_subst_vars
3252    do
3253      eval ac_val=\$$ac_var
3254      case $ac_val in
3255      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3256      esac
3257      $as_echo "$ac_var='\''$ac_val'\''"
3258    done | sort
3259    echo
3260
3261    if test -n "$ac_subst_files"; then
3262      $as_echo "## ------------------- ##
3263## File substitutions. ##
3264## ------------------- ##"
3265      echo
3266      for ac_var in $ac_subst_files
3267      do
3268	eval ac_val=\$$ac_var
3269	case $ac_val in
3270	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3271	esac
3272	$as_echo "$ac_var='\''$ac_val'\''"
3273      done | sort
3274      echo
3275    fi
3276
3277    if test -s confdefs.h; then
3278      $as_echo "## ----------- ##
3279## confdefs.h. ##
3280## ----------- ##"
3281      echo
3282      cat confdefs.h
3283      echo
3284    fi
3285    test "$ac_signal" != 0 &&
3286      $as_echo "$as_me: caught signal $ac_signal"
3287    $as_echo "$as_me: exit $exit_status"
3288  } >&5
3289  rm -f core *.core core.conftest.* &&
3290    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3291    exit $exit_status
3292' 0
3293for ac_signal in 1 2 13 15; do
3294  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3295done
3296ac_signal=0
3297
3298# confdefs.h avoids OS command line length limits that DEFS can exceed.
3299rm -f -r conftest* confdefs.h
3300
3301$as_echo "/* confdefs.h */" > confdefs.h
3302
3303# Predefined preprocessor variables.
3304
3305cat >>confdefs.h <<_ACEOF
3306#define PACKAGE_NAME "$PACKAGE_NAME"
3307_ACEOF
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_VERSION "$PACKAGE_VERSION"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_STRING "$PACKAGE_STRING"
3319_ACEOF
3320
3321cat >>confdefs.h <<_ACEOF
3322#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3323_ACEOF
3324
3325cat >>confdefs.h <<_ACEOF
3326#define PACKAGE_URL "$PACKAGE_URL"
3327_ACEOF
3328
3329
3330# Let the site file select an alternate cache file if it wants to.
3331# Prefer an explicitly selected file to automatically selected ones.
3332ac_site_file1=NONE
3333ac_site_file2=NONE
3334if test -n "$CONFIG_SITE"; then
3335  # We do not want a PATH search for config.site.
3336  case $CONFIG_SITE in #((
3337    -*)  ac_site_file1=./$CONFIG_SITE;;
3338    */*) ac_site_file1=$CONFIG_SITE;;
3339    *)   ac_site_file1=./$CONFIG_SITE;;
3340  esac
3341elif test "x$prefix" != xNONE; then
3342  ac_site_file1=$prefix/share/config.site
3343  ac_site_file2=$prefix/etc/config.site
3344else
3345  ac_site_file1=$ac_default_prefix/share/config.site
3346  ac_site_file2=$ac_default_prefix/etc/config.site
3347fi
3348for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3349do
3350  test "x$ac_site_file" = xNONE && continue
3351  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3352    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3353$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3354    sed 's/^/| /' "$ac_site_file" >&5
3355    . "$ac_site_file" \
3356      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3358as_fn_error $? "failed to load site script $ac_site_file
3359See \`config.log' for more details" "$LINENO" 5; }
3360  fi
3361done
3362
3363if test -r "$cache_file"; then
3364  # Some versions of bash will fail to source /dev/null (special files
3365  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3366  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3367    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3368$as_echo "$as_me: loading cache $cache_file" >&6;}
3369    case $cache_file in
3370      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3371      *)                      . "./$cache_file";;
3372    esac
3373  fi
3374else
3375  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3376$as_echo "$as_me: creating cache $cache_file" >&6;}
3377  >$cache_file
3378fi
3379
3380# Check that the precious variables saved in the cache have kept the same
3381# value.
3382ac_cache_corrupted=false
3383for ac_var in $ac_precious_vars; do
3384  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3385  eval ac_new_set=\$ac_env_${ac_var}_set
3386  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3387  eval ac_new_val=\$ac_env_${ac_var}_value
3388  case $ac_old_set,$ac_new_set in
3389    set,)
3390      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3391$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3392      ac_cache_corrupted=: ;;
3393    ,set)
3394      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3395$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3396      ac_cache_corrupted=: ;;
3397    ,);;
3398    *)
3399      if test "x$ac_old_val" != "x$ac_new_val"; then
3400	# differences in whitespace do not lead to failure.
3401	ac_old_val_w=`echo x $ac_old_val`
3402	ac_new_val_w=`echo x $ac_new_val`
3403	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3404	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3405$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3406	  ac_cache_corrupted=:
3407	else
3408	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3409$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3410	  eval $ac_var=\$ac_old_val
3411	fi
3412	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3413$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3414	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3415$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3416      fi;;
3417  esac
3418  # Pass precious variables to config.status.
3419  if test "$ac_new_set" = set; then
3420    case $ac_new_val in
3421    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3422    *) ac_arg=$ac_var=$ac_new_val ;;
3423    esac
3424    case " $ac_configure_args " in
3425      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3426      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3427    esac
3428  fi
3429done
3430if $ac_cache_corrupted; then
3431  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3433  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3434$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3435  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3436fi
3437## -------------------- ##
3438## Main body of script. ##
3439## -------------------- ##
3440
3441ac_ext=c
3442ac_cpp='$CPP $CPPFLAGS'
3443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3445ac_compiler_gnu=$ac_cv_c_compiler_gnu
3446
3447
3448
3449ac_aux_dir=
3450for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3451  if test -f "$ac_dir/install-sh"; then
3452    ac_aux_dir=$ac_dir
3453    ac_install_sh="$ac_aux_dir/install-sh -c"
3454    break
3455  elif test -f "$ac_dir/install.sh"; then
3456    ac_aux_dir=$ac_dir
3457    ac_install_sh="$ac_aux_dir/install.sh -c"
3458    break
3459  elif test -f "$ac_dir/shtool"; then
3460    ac_aux_dir=$ac_dir
3461    ac_install_sh="$ac_aux_dir/shtool install -c"
3462    break
3463  fi
3464done
3465if test -z "$ac_aux_dir"; then
3466  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
3467fi
3468
3469# These three variables are undocumented and unsupported,
3470# and are intended to be withdrawn in a future Autoconf release.
3471# They can cause serious problems if a builder's source tree is in a directory
3472# whose full name contains unusual characters.
3473ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3474ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3475ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3476
3477
3478# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3479
3480#
3481# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3482# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3483#
3484# This code is free software; you can redistribute it and/or modify it
3485# under the terms of the GNU General Public License version 2 only, as
3486# published by the Free Software Foundation.  Oracle designates this
3487# particular file as subject to the "Classpath" exception as provided
3488# by Oracle in the LICENSE file that accompanied this code.
3489#
3490# This code is distributed in the hope that it will be useful, but WITHOUT
3491# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3492# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3493# version 2 for more details (a copy is included in the LICENSE file that
3494# accompanied this code).
3495#
3496# You should have received a copy of the GNU General Public License version
3497# 2 along with this work; if not, write to the Free Software Foundation,
3498# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3499#
3500# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3501# or visit www.oracle.com if you need additional information or have any
3502# questions.
3503#
3504
3505#
3506# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3507#
3508# This program is free software; you can redistribute it and/or modify
3509# it under the terms of the GNU General Public License as published by
3510# the Free Software Foundation; either version 2 of the License, or
3511# (at your option) any later version.
3512#
3513# This program is distributed in the hope that it will be useful, but
3514# WITHOUT ANY WARRANTY; without even the implied warranty of
3515# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3516# General Public License for more details.
3517#
3518# You should have received a copy of the GNU General Public License
3519# along with this program; if not, write to the Free Software
3520# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3521#
3522# As a special exception to the GNU General Public License, if you
3523# distribute this file as part of a program that contains a
3524# configuration script generated by Autoconf, you may include it under
3525# the same distribution terms that you use for the rest of that program.
3526
3527# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3528# ----------------------------------
3529# PKG_PROG_PKG_CONFIG
3530
3531# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3532#
3533# Check to see whether a particular set of modules exists.  Similar
3534# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3535#
3536#
3537# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3538# this or PKG_CHECK_MODULES is called, or make sure to call
3539# PKG_CHECK_EXISTS manually
3540# --------------------------------------------------------------
3541
3542
3543
3544# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3545# ---------------------------------------------
3546# _PKG_CONFIG
3547
3548# _PKG_SHORT_ERRORS_SUPPORTED
3549# -----------------------------
3550# _PKG_SHORT_ERRORS_SUPPORTED
3551
3552
3553# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3554# [ACTION-IF-NOT-FOUND])
3555#
3556#
3557# Note that if there is a possibility the first call to
3558# PKG_CHECK_MODULES might not happen, you should be sure to include an
3559# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3560#
3561#
3562# --------------------------------------------------------------
3563# PKG_CHECK_MODULES
3564
3565
3566# Include these first...
3567#
3568# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3569# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3570#
3571# This code is free software; you can redistribute it and/or modify it
3572# under the terms of the GNU General Public License version 2 only, as
3573# published by the Free Software Foundation.  Oracle designates this
3574# particular file as subject to the "Classpath" exception as provided
3575# by Oracle in the LICENSE file that accompanied this code.
3576#
3577# This code is distributed in the hope that it will be useful, but WITHOUT
3578# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3579# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3580# version 2 for more details (a copy is included in the LICENSE file that
3581# accompanied this code).
3582#
3583# You should have received a copy of the GNU General Public License version
3584# 2 along with this work; if not, write to the Free Software Foundation,
3585# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3586#
3587# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3588# or visit www.oracle.com if you need additional information or have any
3589# questions.
3590#
3591
3592# Create a function/macro that takes a series of named arguments. The call is
3593# similar to AC_DEFUN, but the setup of the function looks like this:
3594# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3595# ... do something
3596#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3597# ])
3598# A star (*) in front of a named argument means that it is required and it's
3599# presence will be verified. To pass e.g. the first value as a normal indexed
3600# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3601# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3602# "ARG_FOO".
3603#
3604# The generated function can be called like this:
3605# MYFUNC(FOO: [foo-val],
3606#     BAR: [
3607#         $ECHO hello world
3608#     ])
3609# Note that the argument value must start on the same line as the argument name.
3610#
3611# Argument 1: Name of the function to define
3612# Argument 2: List of legal named arguments, with a * prefix for required arguments
3613# Argument 3: Argument array to treat as named, typically $@
3614# Argument 4: The main function body
3615
3616
3617# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3618# If so, then append $1 to $2 \
3619# Also set JVM_ARG_OK to true/false depending on outcome.
3620
3621
3622# Appends a string to a path variable, only adding the : when needed.
3623
3624
3625# Prepends a string to a path variable, only adding the : when needed.
3626
3627
3628# This will make sure the given variable points to a full and proper
3629# path. This means:
3630# 1) There will be no spaces in the path. On unix platforms,
3631#    spaces in the path will result in an error. On Windows,
3632#    the path will be rewritten using short-style to be space-free.
3633# 2) The path will be absolute, and it will be in unix-style (on
3634#     cygwin).
3635# $1: The name of the variable to fix
3636
3637
3638# This will make sure the given variable points to a executable
3639# with a full and proper path. This means:
3640# 1) There will be no spaces in the path. On unix platforms,
3641#    spaces in the path will result in an error. On Windows,
3642#    the path will be rewritten using short-style to be space-free.
3643# 2) The path will be absolute, and it will be in unix-style (on
3644#     cygwin).
3645# Any arguments given to the executable is preserved.
3646# If the input variable does not have a directory specification, then
3647# it need to be in the PATH.
3648# $1: The name of the variable to fix
3649
3650
3651
3652
3653# Register a --with argument but mark it as deprecated
3654# $1: The name of the with argument to deprecate, not including --with-
3655
3656
3657# Register a --enable argument but mark it as deprecated
3658# $1: The name of the with argument to deprecate, not including --enable-
3659# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3660# $3: Messages to user.
3661
3662
3663
3664
3665# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3666# $1: variable to check
3667
3668
3669# Check that there are no unprocessed overridden variables left.
3670# If so, they are an incorrect argument and we will exit with an error.
3671
3672
3673# Setup a tool for the given variable. If correctly specified by the user,
3674# use that value, otherwise search for the tool using the supplied code snippet.
3675# $1: variable to set
3676# $2: code snippet to call to look for the tool
3677# $3: code snippet to call if variable was used to find tool
3678
3679
3680# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3681# $1: variable to set
3682# $2: executable name (or list of names) to look for
3683# $3: [path]
3684
3685
3686# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3687# $1: variable to set
3688# $2: executable name (or list of names) to look for
3689
3690
3691# Like BASIC_PATH_PROGS but fails if no tool was found.
3692# $1: variable to set
3693# $2: executable name (or list of names) to look for
3694# $3: [path]
3695
3696
3697# Like BASIC_SETUP_TOOL but fails if no tool was found.
3698# $1: variable to set
3699# $2: autoconf macro to call to look for the special tool
3700
3701
3702# Setup the most fundamental tools that relies on not much else to set up,
3703# but is used by much of the early bootstrap code.
3704
3705
3706# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3707
3708
3709# Evaluates platform specific overrides for devkit variables.
3710# $1: Name of variable
3711
3712
3713
3714
3715
3716
3717#%%% Simple tools %%%
3718
3719# Check if we have found a usable version of make
3720# $1: the path to a potential make binary (or empty)
3721# $2: the description on how we found this
3722
3723
3724
3725
3726# Goes looking for a usable version of GNU make.
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737# Check if build directory is on local disk. If not possible to determine,
3738# we prefer to claim it's local.
3739# Argument 1: directory to test
3740# Argument 2: what to do if it is on local disk
3741# Argument 3: what to do otherwise (remote disk or failure)
3742
3743
3744# Check that source files have basic read permissions set. This might
3745# not be the case in cygwin in certain conditions.
3746
3747
3748
3749
3750# Check for support for specific options in bash
3751
3752
3753################################################################################
3754#
3755# Default make target
3756#
3757
3758
3759# Code to run after AC_OUTPUT
3760
3761
3762#
3763# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765#
3766# This code is free software; you can redistribute it and/or modify it
3767# under the terms of the GNU General Public License version 2 only, as
3768# published by the Free Software Foundation.  Oracle designates this
3769# particular file as subject to the "Classpath" exception as provided
3770# by Oracle in the LICENSE file that accompanied this code.
3771#
3772# This code is distributed in the hope that it will be useful, but WITHOUT
3773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775# version 2 for more details (a copy is included in the LICENSE file that
3776# accompanied this code).
3777#
3778# You should have received a copy of the GNU General Public License version
3779# 2 along with this work; if not, write to the Free Software Foundation,
3780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781#
3782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783# or visit www.oracle.com if you need additional information or have any
3784# questions.
3785#
3786
3787
3788
3789
3790
3791# Helper function which possibly converts a path using DOS-style short mode.
3792# If so, the updated path is stored in $new_path.
3793# $1: The path to check
3794
3795
3796# Helper function which possibly converts a path using DOS-style short mode.
3797# If so, the updated path is stored in $new_path.
3798# $1: The path to check
3799
3800
3801# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3802# and could probably be heavily simplified. However, all changes in this
3803# area tend to need lot of testing in different scenarios, and in lack of
3804# proper unit testing, cleaning this up has not been deemed worth the effort
3805# at the moment.
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3816
3817
3818
3819
3820# ... then the rest
3821#
3822# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3824#
3825# This code is free software; you can redistribute it and/or modify it
3826# under the terms of the GNU General Public License version 2 only, as
3827# published by the Free Software Foundation.  Oracle designates this
3828# particular file as subject to the "Classpath" exception as provided
3829# by Oracle in the LICENSE file that accompanied this code.
3830#
3831# This code is distributed in the hope that it will be useful, but WITHOUT
3832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3834# version 2 for more details (a copy is included in the LICENSE file that
3835# accompanied this code).
3836#
3837# You should have received a copy of the GNU General Public License version
3838# 2 along with this work; if not, write to the Free Software Foundation,
3839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3840#
3841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3842# or visit www.oracle.com if you need additional information or have any
3843# questions.
3844#
3845
3846########################################################################
3847# This file handles detection of the Boot JDK. The Boot JDK detection
3848# process has been developed as a response to solve a complex real-world
3849# problem. Initially, it was simple, but it has grown as platform after
3850# platform, idiosyncracy after idiosyncracy has been supported.
3851#
3852# The basic idea is this:
3853# 1) You need an acceptable *) JDK to use as a Boot JDK
3854# 2) There are several ways to locate a JDK, that are mostly platform
3855#    dependent **)
3856# 3) You can have multiple JDKs installed
3857# 4) If possible, configure should try to dig out an acceptable JDK
3858#    automatically, without having to resort to command-line options
3859#
3860# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3861#     javac) and not a JRE, etc.
3862#
3863# **) On Windows we typically use a well-known path.
3864#     On MacOSX we typically use the tool java_home.
3865#     On Linux we typically find javac in the $PATH, and then follow a
3866#     chain of symlinks that often ends up in a real JDK.
3867#
3868# This leads to the code where we check in different ways to locate a
3869# JDK, and if one is found, check if it is acceptable. If not, we print
3870# our reasons for rejecting it (useful when debugging non-working
3871# configure situations) and continue checking the next one.
3872########################################################################
3873
3874# Execute the check given as argument, and verify the result
3875# If the Boot JDK was previously found, do nothing
3876# $1 A command line (typically autoconf macro) to execute
3877
3878
3879# Test: Is bootjdk explicitly set by command line arguments?
3880
3881
3882# Test: Is $JAVA_HOME set?
3883
3884
3885# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3886
3887
3888# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3889# $1: Argument to the java_home binary (optional)
3890
3891
3892# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3893
3894
3895# Look for a jdk in the given path. If there are multiple, try to select the newest.
3896# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3897# $1 = Path to directory containing jdk installations.
3898# $2 = String to append to the found JDK directory to get the proper JDK home
3899
3900
3901# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3902# environmental variable as base for where to look.
3903# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3904
3905
3906# Test: Is there a JDK installed in default, well-known locations?
3907
3908
3909# Check that a command-line tool in the Boot JDK is correct
3910# $1 = name of variable to assign
3911# $2 = name of binary
3912
3913
3914###############################################################################
3915#
3916# We need a Boot JDK to bootstrap the build.
3917#
3918
3919
3920
3921
3922
3923# BUILD_JDK: the location of the latest JDK that can run
3924#   on the host system and supports the target class file version
3925#   generated in this JDK build.  This variable should only be
3926#   used after the launchers are built.
3927#
3928
3929# Execute the check given as argument, and verify the result.
3930# If the JDK was previously found, do nothing.
3931# $1 A command line (typically autoconf macro) to execute
3932
3933
3934# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3935# is different than the host system doing the build (e.g. cross-compilation),
3936# a special BUILD_JDK is built as part of the build process.  An external
3937# prebuilt BUILD_JDK can also be supplied.
3938
3939
3940#
3941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3943#
3944# This code is free software; you can redistribute it and/or modify it
3945# under the terms of the GNU General Public License version 2 only, as
3946# published by the Free Software Foundation.  Oracle designates this
3947# particular file as subject to the "Classpath" exception as provided
3948# by Oracle in the LICENSE file that accompanied this code.
3949#
3950# This code is distributed in the hope that it will be useful, but WITHOUT
3951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3953# version 2 for more details (a copy is included in the LICENSE file that
3954# accompanied this code).
3955#
3956# You should have received a copy of the GNU General Public License version
3957# 2 along with this work; if not, write to the Free Software Foundation,
3958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3959#
3960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3961# or visit www.oracle.com if you need additional information or have any
3962# questions.
3963#
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981################################################################################
3982#
3983# Runs icecc-create-env once and prints the error if it fails
3984#
3985# $1: arguments to icecc-create-env
3986# $2: log file
3987#
3988
3989
3990################################################################################
3991#
3992# Optionally enable distributed compilation of native code using icecc/icecream
3993#
3994
3995
3996
3997
3998
3999
4000
4001#
4002# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4004#
4005# This code is free software; you can redistribute it and/or modify it
4006# under the terms of the GNU General Public License version 2 only, as
4007# published by the Free Software Foundation.  Oracle designates this
4008# particular file as subject to the "Classpath" exception as provided
4009# by Oracle in the LICENSE file that accompanied this code.
4010#
4011# This code is distributed in the hope that it will be useful, but WITHOUT
4012# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4013# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4014# version 2 for more details (a copy is included in the LICENSE file that
4015# accompanied this code).
4016#
4017# You should have received a copy of the GNU General Public License version
4018# 2 along with this work; if not, write to the Free Software Foundation,
4019# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4020#
4021# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4022# or visit www.oracle.com if you need additional information or have any
4023# questions.
4024#
4025
4026################################################################################
4027#
4028# Setup ABI profile (for arm)
4029#
4030
4031
4032# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4033# corresponding configure arguments instead
4034
4035
4036# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4037# that configure can use them while detecting compilers.
4038# TOOLCHAIN_TYPE is available here.
4039# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4040
4041
4042
4043
4044
4045
4046# Documentation on common flags used for solstudio in HIGHEST.
4047#
4048# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4049#          done with care, there are some assumptions below that need to
4050#          be understood about the use of pointers, and IEEE behavior.
4051#
4052# -fns: Use non-standard floating point mode (not IEEE 754)
4053# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4054# -fsingle: Use single precision floating point with 'float'
4055# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4056#   (Source with excessing pointer casting and data access with mixed
4057#    pointer types are not recommended)
4058# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4059#   (If you expect perfect errno behavior, do not use this)
4060# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4061# -xrestrict: Pointer parameters to functions do not overlap
4062#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4063#    If you pass in multiple pointers to the same data, do not use this)
4064# -xlibmil: Inline some library routines
4065#   (If you expect perfect errno behavior, do not use this)
4066# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4067#   (If you expect perfect errno behavior, do not use this)
4068#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4069
4070    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4071    # Bug?
4072    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4073    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4074    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4075    #fi
4076
4077
4078
4079
4080
4081
4082################################################################################
4083# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4084#      conditionals against.
4085# $2 - Optional prefix for each variable defined.
4086
4087
4088# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4089#                                  IF_FALSE: [RUN-IF-FALSE])
4090# ------------------------------------------------------------
4091# Check that the C compiler supports an argument
4092
4093
4094
4095
4096# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4097#                                    IF_FALSE: [RUN-IF-FALSE])
4098# ------------------------------------------------------------
4099# Check that the C++ compiler supports an argument
4100
4101
4102
4103
4104# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4105#                                IF_FALSE: [RUN-IF-FALSE])
4106# ------------------------------------------------------------
4107# Check that the C and C++ compilers support an argument
4108
4109
4110
4111
4112# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4113#                                   IF_FALSE: [RUN-IF-FALSE])
4114# ------------------------------------------------------------
4115# Check that the linker support an argument
4116
4117
4118
4119
4120
4121
4122# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4123# Arguments:
4124# $1 - Optional prefix for each variable defined.
4125
4126
4127#
4128# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4129# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4130#
4131# This code is free software; you can redistribute it and/or modify it
4132# under the terms of the GNU General Public License version 2 only, as
4133# published by the Free Software Foundation.  Oracle designates this
4134# particular file as subject to the "Classpath" exception as provided
4135# by Oracle in the LICENSE file that accompanied this code.
4136#
4137# This code is distributed in the hope that it will be useful, but WITHOUT
4138# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4139# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4140# version 2 for more details (a copy is included in the LICENSE file that
4141# accompanied this code).
4142#
4143# You should have received a copy of the GNU General Public License version
4144# 2 along with this work; if not, write to the Free Software Foundation,
4145# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4146#
4147# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4148# or visit www.oracle.com if you need additional information or have any
4149# questions.
4150#
4151
4152
4153
4154
4155
4156cygwin_help() {
4157  case $1 in
4158    unzip)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    zip)
4163      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165      ;;
4166    make)
4167      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4169      ;;
4170    freetype)
4171      HELP_MSG="
4172The freetype library can now be build during the configure process.
4173Download the freetype sources and unpack them into an arbitrary directory:
4174
4175wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4176tar -xzf freetype-2.5.3.tar.gz
4177
4178Then run configure with '--with-freetype-src=<freetype_src>'. This will
4179automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4180builds or into '<freetype_src>/lib32' for 32-bit builds.
4181Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4182and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4183
4184Alternatively you can unpack the sources like this to use the default directory:
4185
4186tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4187      ;;
4188  esac
4189}
4190
4191msys_help() {
4192  PKGHANDLER_COMMAND=""
4193}
4194
4195apt_help() {
4196  case $1 in
4197    reduced)
4198      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4199    devkit)
4200      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4201    openjdk)
4202      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4203    alsa)
4204      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4205    cups)
4206      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4207    freetype)
4208      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4209    ffi)
4210      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4211    x11)
4212      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4213    ccache)
4214      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4215    dtrace)
4216      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4217    elf)
4218      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4219  esac
4220}
4221
4222yum_help() {
4223  case $1 in
4224    devkit)
4225      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4226    openjdk)
4227      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4228    alsa)
4229      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4230    cups)
4231      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4232    freetype)
4233      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4234    x11)
4235      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4236    ccache)
4237      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4238    elf)
4239      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4240  esac
4241}
4242
4243brew_help() {
4244  case $1 in
4245    openjdk)
4246      PKGHANDLER_COMMAND="brew cask install java" ;;
4247    freetype)
4248      PKGHANDLER_COMMAND="brew install freetype" ;;
4249    ccache)
4250      PKGHANDLER_COMMAND="brew install ccache" ;;
4251  esac
4252}
4253
4254port_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258pkgutil_help() {
4259  PKGHANDLER_COMMAND=""
4260}
4261
4262pkgadd_help() {
4263  PKGHANDLER_COMMAND=""
4264}
4265
4266# This function will check if we're called from the "configure" wrapper while
4267# printing --help. If so, we will print out additional information that can
4268# only be extracted within the autoconf script, and then exit. This must be
4269# called at the very beginning in configure.ac.
4270
4271
4272
4273
4274
4275
4276#
4277# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4279#
4280# This code is free software; you can redistribute it and/or modify it
4281# under the terms of the GNU General Public License version 2 only, as
4282# published by the Free Software Foundation.  Oracle designates this
4283# particular file as subject to the "Classpath" exception as provided
4284# by Oracle in the LICENSE file that accompanied this code.
4285#
4286# This code is distributed in the hope that it will be useful, but WITHOUT
4287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4289# version 2 for more details (a copy is included in the LICENSE file that
4290# accompanied this code).
4291#
4292# You should have received a copy of the GNU General Public License version
4293# 2 along with this work; if not, write to the Free Software Foundation,
4294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4295#
4296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4297# or visit www.oracle.com if you need additional information or have any
4298# questions.
4299#
4300
4301# All valid JVM features, regardless of platform
4302VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4303    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4304    static-build link-time-opt aot"
4305
4306# All valid JVM variants
4307VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4308
4309###############################################################################
4310# Check if the specified JVM variant should be built. To be used in shell if
4311# constructs, like this:
4312# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check if the specified JVM features are explicitly enabled. To be used in
4322# shell if constructs, like this:
4323# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4324#
4325# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4326
4327# Definition kept in one line to allow inlining in if statements.
4328# Additional [] needed to keep m4 from mangling shell constructs.
4329
4330
4331###############################################################################
4332# Check which variants of the JVM that we want to build. Available variants are:
4333#   server: normal interpreter, and a tiered C1/C2 compiler
4334#   client: normal interpreter, and C1 (no C2 compiler)
4335#   minimal: reduced form of client with optional features stripped out
4336#   core: normal interpreter only, no compiler
4337#   zero: C++ based interpreter only, no compiler
4338#   zeroshark: C++ based interpreter, and a llvm-based compiler
4339#   custom: baseline JVM with no default features
4340#
4341
4342
4343###############################################################################
4344# Check if dtrace should be enabled and has all prerequisites present.
4345#
4346
4347
4348################################################################################
4349# Check if AOT should be enabled
4350#
4351
4352
4353###############################################################################
4354# Set up all JVM features for each JVM variant.
4355#
4356
4357
4358###############################################################################
4359# Validate JVM features once all setup is complete, including custom setup.
4360#
4361
4362
4363################################################################################
4364#
4365# Specify which sources will be used to build the 64-bit ARM port
4366#
4367# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4368# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4369#
4370
4371
4372
4373################################################################################
4374# Check if gtest should be built
4375#
4376
4377
4378#
4379# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4381#
4382# This code is free software; you can redistribute it and/or modify it
4383# under the terms of the GNU General Public License version 2 only, as
4384# published by the Free Software Foundation.  Oracle designates this
4385# particular file as subject to the "Classpath" exception as provided
4386# by Oracle in the LICENSE file that accompanied this code.
4387#
4388# This code is distributed in the hope that it will be useful, but WITHOUT
4389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4391# version 2 for more details (a copy is included in the LICENSE file that
4392# accompanied this code).
4393#
4394# You should have received a copy of the GNU General Public License version
4395# 2 along with this work; if not, write to the Free Software Foundation,
4396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4397#
4398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4399# or visit www.oracle.com if you need additional information or have any
4400# questions.
4401#
4402
4403###############################################################################
4404# Check which variant of the JDK that we want to build.
4405# Currently we have:
4406#    normal:   standard edition
4407# but the custom make system may add other variants
4408#
4409# Effectively the JDK variant gives a name to a specific set of
4410# modules to compile into the JDK.
4411
4412
4413###############################################################################
4414# Set the debug level
4415#    release: no debug information, all optimizations, no asserts.
4416#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4417#    fastdebug: debug information (-g), all optimizations, all asserts
4418#    slowdebug: debug information (-g), no optimizations, all asserts
4419
4420
4421###############################################################################
4422#
4423# Should we build only OpenJDK even if closed sources are present?
4424#
4425
4426
4427
4428
4429###############################################################################
4430#
4431# Enable or disable the elliptic curve crypto implementation
4432#
4433
4434
4435
4436
4437################################################################################
4438#
4439# Gcov coverage data for hotspot
4440#
4441
4442
4443################################################################################
4444#
4445# Static build support.  When enabled will generate static
4446# libraries instead of shared libraries for all JDK libs.
4447#
4448
4449
4450################################################################################
4451#
4452# jlink options.
4453# We always keep packaged modules in JDK image.
4454#
4455
4456
4457################################################################################
4458#
4459# Check if building of the jtreg failure handler should be enabled.
4460#
4461
4462
4463################################################################################
4464#
4465# Enable or disable generation of the classlist at build time
4466#
4467
4468
4469#
4470# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4472#
4473# This code is free software; you can redistribute it and/or modify it
4474# under the terms of the GNU General Public License version 2 only, as
4475# published by the Free Software Foundation.  Oracle designates this
4476# particular file as subject to the "Classpath" exception as provided
4477# by Oracle in the LICENSE file that accompanied this code.
4478#
4479# This code is distributed in the hope that it will be useful, but WITHOUT
4480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4482# version 2 for more details (a copy is included in the LICENSE file that
4483# accompanied this code).
4484#
4485# You should have received a copy of the GNU General Public License version
4486# 2 along with this work; if not, write to the Free Software Foundation,
4487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4488#
4489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4490# or visit www.oracle.com if you need additional information or have any
4491# questions.
4492#
4493
4494###############################################################################
4495#
4496# Setup version numbers
4497#
4498
4499# Verify that a given string represents a valid version number, and assign it
4500# to a variable.
4501
4502# Argument 1: the variable to assign to
4503# Argument 2: the value given by the user
4504
4505
4506
4507
4508#
4509# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4510# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4511#
4512# This code is free software; you can redistribute it and/or modify it
4513# under the terms of the GNU General Public License version 2 only, as
4514# published by the Free Software Foundation.  Oracle designates this
4515# particular file as subject to the "Classpath" exception as provided
4516# by Oracle in the LICENSE file that accompanied this code.
4517#
4518# This code is distributed in the hope that it will be useful, but WITHOUT
4519# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4520# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4521# version 2 for more details (a copy is included in the LICENSE file that
4522# accompanied this code).
4523#
4524# You should have received a copy of the GNU General Public License version
4525# 2 along with this work; if not, write to the Free Software Foundation,
4526# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4527#
4528# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4529# or visit www.oracle.com if you need additional information or have any
4530# questions.
4531#
4532
4533# Major library component reside in separate files.
4534#
4535# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4536# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4537#
4538# This code is free software; you can redistribute it and/or modify it
4539# under the terms of the GNU General Public License version 2 only, as
4540# published by the Free Software Foundation.  Oracle designates this
4541# particular file as subject to the "Classpath" exception as provided
4542# by Oracle in the LICENSE file that accompanied this code.
4543#
4544# This code is distributed in the hope that it will be useful, but WITHOUT
4545# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4546# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4547# version 2 for more details (a copy is included in the LICENSE file that
4548# accompanied this code).
4549#
4550# You should have received a copy of the GNU General Public License version
4551# 2 along with this work; if not, write to the Free Software Foundation,
4552# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4553#
4554# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4555# or visit www.oracle.com if you need additional information or have any
4556# questions.
4557#
4558
4559################################################################################
4560# Setup alsa (Advanced Linux Sound Architecture)
4561################################################################################
4562
4563
4564#
4565# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4566# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4567#
4568# This code is free software; you can redistribute it and/or modify it
4569# under the terms of the GNU General Public License version 2 only, as
4570# published by the Free Software Foundation.  Oracle designates this
4571# particular file as subject to the "Classpath" exception as provided
4572# by Oracle in the LICENSE file that accompanied this code.
4573#
4574# This code is distributed in the hope that it will be useful, but WITHOUT
4575# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4576# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4577# version 2 for more details (a copy is included in the LICENSE file that
4578# accompanied this code).
4579#
4580# You should have received a copy of the GNU General Public License version
4581# 2 along with this work; if not, write to the Free Software Foundation,
4582# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4583#
4584# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4585# or visit www.oracle.com if you need additional information or have any
4586# questions.
4587#
4588
4589################################################################################
4590# Setup bundled libraries.
4591#
4592# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4593# OpenJDK repository. Default is to use these libraries as bundled, but they
4594# might be replaced by en external version by the user.
4595################################################################################
4596
4597
4598################################################################################
4599# Setup libjpeg
4600################################################################################
4601
4602
4603################################################################################
4604# Setup giflib
4605################################################################################
4606
4607
4608################################################################################
4609# Setup libpng
4610################################################################################
4611
4612
4613################################################################################
4614# Setup zlib
4615################################################################################
4616
4617
4618################################################################################
4619# Setup lcms (Little CMS)
4620################################################################################
4621
4622
4623#
4624# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4626#
4627# This code is free software; you can redistribute it and/or modify it
4628# under the terms of the GNU General Public License version 2 only, as
4629# published by the Free Software Foundation.  Oracle designates this
4630# particular file as subject to the "Classpath" exception as provided
4631# by Oracle in the LICENSE file that accompanied this code.
4632#
4633# This code is distributed in the hope that it will be useful, but WITHOUT
4634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4636# version 2 for more details (a copy is included in the LICENSE file that
4637# accompanied this code).
4638#
4639# You should have received a copy of the GNU General Public License version
4640# 2 along with this work; if not, write to the Free Software Foundation,
4641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4642#
4643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4644# or visit www.oracle.com if you need additional information or have any
4645# questions.
4646#
4647
4648################################################################################
4649# Setup cups (Common Unix Printing System)
4650################################################################################
4651
4652
4653#
4654# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4655# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4656#
4657# This code is free software; you can redistribute it and/or modify it
4658# under the terms of the GNU General Public License version 2 only, as
4659# published by the Free Software Foundation.  Oracle designates this
4660# particular file as subject to the "Classpath" exception as provided
4661# by Oracle in the LICENSE file that accompanied this code.
4662#
4663# This code is distributed in the hope that it will be useful, but WITHOUT
4664# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4665# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4666# version 2 for more details (a copy is included in the LICENSE file that
4667# accompanied this code).
4668#
4669# You should have received a copy of the GNU General Public License version
4670# 2 along with this work; if not, write to the Free Software Foundation,
4671# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4672#
4673# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4674# or visit www.oracle.com if you need additional information or have any
4675# questions.
4676#
4677
4678################################################################################
4679# Setup libffi (Foreign Function Interface)
4680################################################################################
4681
4682
4683#
4684# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4685# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4686#
4687# This code is free software; you can redistribute it and/or modify it
4688# under the terms of the GNU General Public License version 2 only, as
4689# published by the Free Software Foundation.  Oracle designates this
4690# particular file as subject to the "Classpath" exception as provided
4691# by Oracle in the LICENSE file that accompanied this code.
4692#
4693# This code is distributed in the hope that it will be useful, but WITHOUT
4694# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4695# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4696# version 2 for more details (a copy is included in the LICENSE file that
4697# accompanied this code).
4698#
4699# You should have received a copy of the GNU General Public License version
4700# 2 along with this work; if not, write to the Free Software Foundation,
4701# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4702#
4703# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4704# or visit www.oracle.com if you need additional information or have any
4705# questions.
4706#
4707
4708################################################################################
4709# Build the freetype lib from source
4710################################################################################
4711
4712
4713################################################################################
4714# Check if a potential freeype library match is correct and usable
4715################################################################################
4716
4717
4718################################################################################
4719# Setup freetype (The FreeType2 font rendering library)
4720################################################################################
4721
4722
4723#
4724# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4725# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4726#
4727# This code is free software; you can redistribute it and/or modify it
4728# under the terms of the GNU General Public License version 2 only, as
4729# published by the Free Software Foundation.  Oracle designates this
4730# particular file as subject to the "Classpath" exception as provided
4731# by Oracle in the LICENSE file that accompanied this code.
4732#
4733# This code is distributed in the hope that it will be useful, but WITHOUT
4734# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4735# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4736# version 2 for more details (a copy is included in the LICENSE file that
4737# accompanied this code).
4738#
4739# You should have received a copy of the GNU General Public License version
4740# 2 along with this work; if not, write to the Free Software Foundation,
4741# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4742#
4743# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4744# or visit www.oracle.com if you need additional information or have any
4745# questions.
4746#
4747
4748################################################################################
4749# Setup the standard C/C++ runtime libraries.
4750#
4751# Most importantly, determine if stdc++ should be linked statically or
4752# dynamically.
4753################################################################################
4754
4755
4756#
4757# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4758# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4759#
4760# This code is free software; you can redistribute it and/or modify it
4761# under the terms of the GNU General Public License version 2 only, as
4762# published by the Free Software Foundation.  Oracle designates this
4763# particular file as subject to the "Classpath" exception as provided
4764# by Oracle in the LICENSE file that accompanied this code.
4765#
4766# This code is distributed in the hope that it will be useful, but WITHOUT
4767# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4768# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4769# version 2 for more details (a copy is included in the LICENSE file that
4770# accompanied this code).
4771#
4772# You should have received a copy of the GNU General Public License version
4773# 2 along with this work; if not, write to the Free Software Foundation,
4774# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4775#
4776# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4777# or visit www.oracle.com if you need additional information or have any
4778# questions.
4779#
4780
4781################################################################################
4782# Setup X11 Windows system
4783################################################################################
4784
4785
4786#
4787# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4788# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4789#
4790# This code is free software; you can redistribute it and/or modify it
4791# under the terms of the GNU General Public License version 2 only, as
4792# published by the Free Software Foundation.  Oracle designates this
4793# particular file as subject to the "Classpath" exception as provided
4794# by Oracle in the LICENSE file that accompanied this code.
4795#
4796# This code is distributed in the hope that it will be useful, but WITHOUT
4797# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4798# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4799# version 2 for more details (a copy is included in the LICENSE file that
4800# accompanied this code).
4801#
4802# You should have received a copy of the GNU General Public License version
4803# 2 along with this work; if not, write to the Free Software Foundation,
4804# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4805#
4806# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4807# or visit www.oracle.com if you need additional information or have any
4808# questions.
4809#
4810
4811################################################################################
4812# Setup libelf (ELF library)
4813################################################################################
4814
4815
4816
4817################################################################################
4818# Determine which libraries are needed for this configuration
4819################################################################################
4820
4821
4822################################################################################
4823# Parse library options, and setup needed libraries
4824################################################################################
4825
4826
4827################################################################################
4828# Setup llvm (Low-Level VM)
4829################################################################################
4830
4831
4832################################################################################
4833# Setup various libraries, typically small system libraries
4834################################################################################
4835
4836
4837################################################################################
4838# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4839# redistribute it in the test image.
4840################################################################################
4841
4842
4843
4844#
4845# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4846# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4847#
4848# This code is free software; you can redistribute it and/or modify it
4849# under the terms of the GNU General Public License version 2 only, as
4850# published by the Free Software Foundation.  Oracle designates this
4851# particular file as subject to the "Classpath" exception as provided
4852# by Oracle in the LICENSE file that accompanied this code.
4853#
4854# This code is distributed in the hope that it will be useful, but WITHOUT
4855# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4856# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4857# version 2 for more details (a copy is included in the LICENSE file that
4858# accompanied this code).
4859#
4860# You should have received a copy of the GNU General Public License version
4861# 2 along with this work; if not, write to the Free Software Foundation,
4862# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4863#
4864# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4865# or visit www.oracle.com if you need additional information or have any
4866# questions.
4867#
4868
4869# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4870# Converts autoconf style CPU name to OpenJDK style, into
4871# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4872
4873
4874# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4875# Converts autoconf style OS name to OpenJDK style, into
4876# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4877
4878
4879# Expects $host_os $host_cpu $build_os and $build_cpu
4880# and $with_target_bits to have been setup!
4881#
4882# Translate the standard triplet(quadruplet) definition
4883# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4884# OPENJDK_BUILD_OS, etc.
4885
4886
4887# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4888# accordingly. Must be done after setting up build and target system, but before
4889# doing anything else with these values.
4890
4891
4892# Setup the legacy variables, for controlling the old makefiles.
4893#
4894
4895
4896# $1 - Either TARGET or BUILD to setup the variables for.
4897
4898
4899
4900
4901
4902
4903#%%% Build and target systems %%%
4904
4905
4906
4907
4908# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4909# Add -mX to various FLAGS variables.
4910
4911
4912
4913
4914
4915
4916#
4917# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4918# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4919#
4920# This code is free software; you can redistribute it and/or modify it
4921# under the terms of the GNU General Public License version 2 only, as
4922# published by the Free Software Foundation.  Oracle designates this
4923# particular file as subject to the "Classpath" exception as provided
4924# by Oracle in the LICENSE file that accompanied this code.
4925#
4926# This code is distributed in the hope that it will be useful, but WITHOUT
4927# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4928# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4929# version 2 for more details (a copy is included in the LICENSE file that
4930# accompanied this code).
4931#
4932# You should have received a copy of the GNU General Public License version
4933# 2 along with this work; if not, write to the Free Software Foundation,
4934# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4935#
4936# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4937# or visit www.oracle.com if you need additional information or have any
4938# questions.
4939#
4940
4941
4942
4943
4944
4945
4946
4947################################################################################
4948# Define a mechanism for importing extra prebuilt modules
4949#
4950
4951
4952
4953#
4954# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4956#
4957# This code is free software; you can redistribute it and/or modify it
4958# under the terms of the GNU General Public License version 2 only, as
4959# published by the Free Software Foundation.  Oracle designates this
4960# particular file as subject to the "Classpath" exception as provided
4961# by Oracle in the LICENSE file that accompanied this code.
4962#
4963# This code is distributed in the hope that it will be useful, but WITHOUT
4964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4966# version 2 for more details (a copy is included in the LICENSE file that
4967# accompanied this code).
4968#
4969# You should have received a copy of the GNU General Public License version
4970# 2 along with this work; if not, write to the Free Software Foundation,
4971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4972#
4973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4974# or visit www.oracle.com if you need additional information or have any
4975# questions.
4976#
4977
4978########################################################################
4979# This file is responsible for detecting, verifying and setting up the
4980# toolchain, i.e. the compiler, linker and related utilities. It will setup
4981# proper paths to the binaries, but it will not setup any flags.
4982#
4983# The binaries used is determined by the toolchain type, which is the family of
4984# compilers and related tools that are used.
4985########################################################################
4986
4987
4988# All valid toolchains, regardless of platform (used by help.m4)
4989VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4990
4991# These toolchains are valid on different platforms
4992VALID_TOOLCHAINS_linux="gcc clang"
4993VALID_TOOLCHAINS_solaris="solstudio"
4994VALID_TOOLCHAINS_macosx="gcc clang"
4995VALID_TOOLCHAINS_aix="xlc"
4996VALID_TOOLCHAINS_windows="microsoft"
4997
4998# Toolchain descriptions
4999TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
5000TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
5001TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
5002TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5003TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5004
5005# Minimum supported versions, empty means unspecified
5006TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5007TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5008TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5009TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5010TOOLCHAIN_MINIMUM_VERSION_xlc=""
5011
5012# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5013# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5014# $1 - optional variable prefix for compiler and version variables (BUILD_)
5015# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5016
5017
5018# Check if the configured compiler (C and C++) is of a specific version or
5019# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5020#
5021# Arguments:
5022#   VERSION:   The version string to check against the found version
5023#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5024#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5025#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5026
5027
5028
5029
5030# Setup a number of variables describing how native output files are
5031# named on this platform/toolchain.
5032
5033
5034# Determine which toolchain type to use, and make sure it is valid for this
5035# platform. Setup various information about the selected toolchain.
5036
5037
5038# Before we start detecting the toolchain executables, we might need some
5039# special setup, e.g. additional paths etc.
5040
5041
5042# Restore path, etc
5043
5044
5045# Check if a compiler is of the toolchain type we expect, and save the version
5046# information from it. If the compiler does not match the expected type,
5047# this function will abort using AC_MSG_ERROR. If it matches, the version will
5048# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5049# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5050#
5051# $1 = compiler to test (CC or CXX)
5052# $2 = human readable name of compiler (C or C++)
5053
5054
5055# Try to locate the given C or C++ compiler in the path, or otherwise.
5056#
5057# $1 = compiler to test (CC or CXX)
5058# $2 = human readable name of compiler (C or C++)
5059# $3 = compiler name to search for
5060
5061
5062# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5063# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5064# archiver (AR). Verify that the compilers are correct according to the
5065# toolchain type.
5066
5067
5068# Setup additional tools that is considered a part of the toolchain, but not the
5069# core part. Many of these are highly platform-specific and do not exist,
5070# and/or are not needed on all platforms.
5071
5072
5073# Setup the build tools (i.e, the compiler and linker used to build programs
5074# that should be run on the build platform, not the target platform, as a build
5075# helper). Since the non-cross-compile case uses the normal, target compilers
5076# for this, we can only do this after these have been setup.
5077
5078
5079# Do some additional checks on the detected tools.
5080
5081
5082# Setup the JTReg Regression Test Harness.
5083
5084
5085#
5086# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5088#
5089# This code is free software; you can redistribute it and/or modify it
5090# under the terms of the GNU General Public License version 2 only, as
5091# published by the Free Software Foundation.  Oracle designates this
5092# particular file as subject to the "Classpath" exception as provided
5093# by Oracle in the LICENSE file that accompanied this code.
5094#
5095# This code is distributed in the hope that it will be useful, but WITHOUT
5096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5098# version 2 for more details (a copy is included in the LICENSE file that
5099# accompanied this code).
5100#
5101# You should have received a copy of the GNU General Public License version
5102# 2 along with this work; if not, write to the Free Software Foundation,
5103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5104#
5105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5106# or visit www.oracle.com if you need additional information or have any
5107# questions.
5108#
5109
5110################################################################################
5111# The order of these defines the priority by which we try to find them.
5112VALID_VS_VERSIONS="2013 2012 2010"
5113
5114VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5115VS_VERSION_INTERNAL_2010=100
5116VS_MSVCR_2010=msvcr100.dll
5117# We don't use msvcp on Visual Studio 2010
5118#VS_MSVCP_2010=msvcp100.dll
5119VS_ENVVAR_2010="VS100COMNTOOLS"
5120VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5121VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5122VS_VS_PLATFORM_NAME_2010="v100"
5123VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5124
5125VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5126VS_VERSION_INTERNAL_2012=110
5127VS_MSVCR_2012=msvcr110.dll
5128VS_MSVCP_2012=msvcp110.dll
5129VS_ENVVAR_2012="VS110COMNTOOLS"
5130VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5131VS_SDK_INSTALLDIR_2012=
5132VS_VS_PLATFORM_NAME_2012="v110"
5133VS_SDK_PLATFORM_NAME_2012=
5134
5135VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5136VS_VERSION_INTERNAL_2013=120
5137VS_MSVCR_2013=msvcr120.dll
5138VS_MSVCP_2013=msvcp120.dll
5139VS_ENVVAR_2013="VS120COMNTOOLS"
5140VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5141VS_SDK_INSTALLDIR_2013=
5142VS_VS_PLATFORM_NAME_2013="v120"
5143VS_SDK_PLATFORM_NAME_2013=
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150
5151
5152
5153################################################################################
5154# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5155# build environment and assigns it to VS_ENV_CMD
5156
5157
5158################################################################################
5159
5160
5161
5162################################################################################
5163# Check if the VS env variables were setup prior to running configure.
5164# If not, then find vcvarsall.bat and run it automatically, and integrate
5165# the set env variables into the spec file.
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180# This line needs to be here, verbatim, after all includes and the dummy hook
5181# definitions. It is replaced with custom functionality when building
5182# custom sources.
5183#CUSTOM_AUTOCONF_INCLUDE
5184
5185# Do not change or remove the following line, it is needed for consistency checks:
5186DATE_WHEN_GENERATED=1494609053
5187
5188###############################################################################
5189#
5190# Initialization / Boot-strapping
5191#
5192# The bootstrapping process needs to solve the "chicken or the egg" problem,
5193# thus it jumps back and forth, each time gaining something needed later on.
5194#
5195###############################################################################
5196
5197# If we are requested to print additional help, do that and then exit.
5198# This must be the very first call.
5199
5200  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5201
5202    # Print available toolchains
5203    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5204    $PRINTF "Which are valid to use depends on the build platform.\n"
5205    for toolchain in $VALID_TOOLCHAINS_all; do
5206      # Use indirect variable referencing
5207      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5208      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5209      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5210    done
5211    $PRINTF "\n"
5212
5213    # Print available jvm features
5214    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5215    $PRINTF "Which are valid to use depends on the target platform.\n  "
5216    $PRINTF "%s " $VALID_JVM_FEATURES
5217    $PRINTF "\n"
5218
5219    # And now exit directly
5220    exit 0
5221  fi
5222
5223
5224# Basic initialization that must happen first of all in the normal process.
5225
5226  # Save the original command line. This is passed to us by the wrapper configure script.
5227
5228  # Save the path variable before it gets changed
5229  ORIGINAL_PATH="$PATH"
5230
5231  DATE_WHEN_CONFIGURED=`LANG=C date`
5232
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5234$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5236$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5237
5238
5239  # Start with tools that do not need have cross compilation support
5240  # and can be expected to be found in the default PATH. These tools are
5241  # used by configure.
5242
5243  # First are all the simple required tools.
5244
5245
5246
5247  # Publish this variable in the help.
5248
5249
5250  if [ -z "${BASENAME+x}" ]; then
5251    # The variable is not set by user, try to locate tool using the code snippet
5252    for ac_prog in basename
5253do
5254  # Extract the first word of "$ac_prog", so it can be a program name with args.
5255set dummy $ac_prog; ac_word=$2
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5257$as_echo_n "checking for $ac_word... " >&6; }
5258if ${ac_cv_path_BASENAME+:} false; then :
5259  $as_echo_n "(cached) " >&6
5260else
5261  case $BASENAME in
5262  [\\/]* | ?:[\\/]*)
5263  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5264  ;;
5265  *)
5266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269  IFS=$as_save_IFS
5270  test -z "$as_dir" && as_dir=.
5271    for ac_exec_ext in '' $ac_executable_extensions; do
5272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5273    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275    break 2
5276  fi
5277done
5278  done
5279IFS=$as_save_IFS
5280
5281  ;;
5282esac
5283fi
5284BASENAME=$ac_cv_path_BASENAME
5285if test -n "$BASENAME"; then
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5287$as_echo "$BASENAME" >&6; }
5288else
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290$as_echo "no" >&6; }
5291fi
5292
5293
5294  test -n "$BASENAME" && break
5295done
5296
5297  else
5298    # The variable is set, but is it from the command line or the environment?
5299
5300    # Try to remove the string !BASENAME! from our list.
5301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5303      # If it failed, the variable was not from the command line. Ignore it,
5304      # but warn the user (except for BASH, which is always set by the calling BASH).
5305      if test "xBASENAME" != xBASH; then
5306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5307$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5308      fi
5309      # Try to locate tool using the code snippet
5310      for ac_prog in basename
5311do
5312  # Extract the first word of "$ac_prog", so it can be a program name with args.
5313set dummy $ac_prog; ac_word=$2
5314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5315$as_echo_n "checking for $ac_word... " >&6; }
5316if ${ac_cv_path_BASENAME+:} false; then :
5317  $as_echo_n "(cached) " >&6
5318else
5319  case $BASENAME in
5320  [\\/]* | ?:[\\/]*)
5321  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5322  ;;
5323  *)
5324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5325for as_dir in $PATH
5326do
5327  IFS=$as_save_IFS
5328  test -z "$as_dir" && as_dir=.
5329    for ac_exec_ext in '' $ac_executable_extensions; do
5330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5331    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5333    break 2
5334  fi
5335done
5336  done
5337IFS=$as_save_IFS
5338
5339  ;;
5340esac
5341fi
5342BASENAME=$ac_cv_path_BASENAME
5343if test -n "$BASENAME"; then
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5345$as_echo "$BASENAME" >&6; }
5346else
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5348$as_echo "no" >&6; }
5349fi
5350
5351
5352  test -n "$BASENAME" && break
5353done
5354
5355    else
5356      # If it succeeded, then it was overridden by the user. We will use it
5357      # for the tool.
5358
5359      # First remove it from the list of overridden variables, so we can test
5360      # for unknown variables in the end.
5361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5362
5363      # Check if we try to supply an empty value
5364      if test "x$BASENAME" = x; then
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5366$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5368$as_echo_n "checking for BASENAME... " >&6; }
5369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5370$as_echo "disabled" >&6; }
5371      else
5372        # Check if the provided tool contains a complete path.
5373        tool_specified="$BASENAME"
5374        tool_basename="${tool_specified##*/}"
5375        if test "x$tool_basename" = "x$tool_specified"; then
5376          # A command without a complete path is provided, search $PATH.
5377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5378$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5379          # Extract the first word of "$tool_basename", so it can be a program name with args.
5380set dummy $tool_basename; ac_word=$2
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5382$as_echo_n "checking for $ac_word... " >&6; }
5383if ${ac_cv_path_BASENAME+:} false; then :
5384  $as_echo_n "(cached) " >&6
5385else
5386  case $BASENAME in
5387  [\\/]* | ?:[\\/]*)
5388  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5389  ;;
5390  *)
5391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5392for as_dir in $PATH
5393do
5394  IFS=$as_save_IFS
5395  test -z "$as_dir" && as_dir=.
5396    for ac_exec_ext in '' $ac_executable_extensions; do
5397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5398    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5400    break 2
5401  fi
5402done
5403  done
5404IFS=$as_save_IFS
5405
5406  ;;
5407esac
5408fi
5409BASENAME=$ac_cv_path_BASENAME
5410if test -n "$BASENAME"; then
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5412$as_echo "$BASENAME" >&6; }
5413else
5414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5416fi
5417
5418
5419          if test "x$BASENAME" = x; then
5420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5421          fi
5422        else
5423          # Otherwise we believe it is a complete path. Use it as it is.
5424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5425$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5427$as_echo_n "checking for BASENAME... " >&6; }
5428          if test ! -x "$tool_specified"; then
5429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5430$as_echo "not found" >&6; }
5431            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5432          fi
5433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5434$as_echo "$tool_specified" >&6; }
5435        fi
5436      fi
5437    fi
5438
5439  fi
5440
5441
5442
5443  if test "x$BASENAME" = x; then
5444    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5445  fi
5446
5447
5448
5449
5450
5451  # Publish this variable in the help.
5452
5453
5454  if [ -z "${BASH+x}" ]; then
5455    # The variable is not set by user, try to locate tool using the code snippet
5456    for ac_prog in bash
5457do
5458  # Extract the first word of "$ac_prog", so it can be a program name with args.
5459set dummy $ac_prog; ac_word=$2
5460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5461$as_echo_n "checking for $ac_word... " >&6; }
5462if ${ac_cv_path_BASH+:} false; then :
5463  $as_echo_n "(cached) " >&6
5464else
5465  case $BASH in
5466  [\\/]* | ?:[\\/]*)
5467  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5468  ;;
5469  *)
5470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5471for as_dir in $PATH
5472do
5473  IFS=$as_save_IFS
5474  test -z "$as_dir" && as_dir=.
5475    for ac_exec_ext in '' $ac_executable_extensions; do
5476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5477    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5479    break 2
5480  fi
5481done
5482  done
5483IFS=$as_save_IFS
5484
5485  ;;
5486esac
5487fi
5488BASH=$ac_cv_path_BASH
5489if test -n "$BASH"; then
5490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5491$as_echo "$BASH" >&6; }
5492else
5493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5494$as_echo "no" >&6; }
5495fi
5496
5497
5498  test -n "$BASH" && break
5499done
5500
5501  else
5502    # The variable is set, but is it from the command line or the environment?
5503
5504    # Try to remove the string !BASH! from our list.
5505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5507      # If it failed, the variable was not from the command line. Ignore it,
5508      # but warn the user (except for BASH, which is always set by the calling BASH).
5509      if test "xBASH" != xBASH; then
5510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5511$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5512      fi
5513      # Try to locate tool using the code snippet
5514      for ac_prog in bash
5515do
5516  # Extract the first word of "$ac_prog", so it can be a program name with args.
5517set dummy $ac_prog; ac_word=$2
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5519$as_echo_n "checking for $ac_word... " >&6; }
5520if ${ac_cv_path_BASH+:} false; then :
5521  $as_echo_n "(cached) " >&6
5522else
5523  case $BASH in
5524  [\\/]* | ?:[\\/]*)
5525  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5526  ;;
5527  *)
5528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5529for as_dir in $PATH
5530do
5531  IFS=$as_save_IFS
5532  test -z "$as_dir" && as_dir=.
5533    for ac_exec_ext in '' $ac_executable_extensions; do
5534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5535    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5537    break 2
5538  fi
5539done
5540  done
5541IFS=$as_save_IFS
5542
5543  ;;
5544esac
5545fi
5546BASH=$ac_cv_path_BASH
5547if test -n "$BASH"; then
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5549$as_echo "$BASH" >&6; }
5550else
5551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5552$as_echo "no" >&6; }
5553fi
5554
5555
5556  test -n "$BASH" && break
5557done
5558
5559    else
5560      # If it succeeded, then it was overridden by the user. We will use it
5561      # for the tool.
5562
5563      # First remove it from the list of overridden variables, so we can test
5564      # for unknown variables in the end.
5565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5566
5567      # Check if we try to supply an empty value
5568      if test "x$BASH" = x; then
5569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5570$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5572$as_echo_n "checking for BASH... " >&6; }
5573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5574$as_echo "disabled" >&6; }
5575      else
5576        # Check if the provided tool contains a complete path.
5577        tool_specified="$BASH"
5578        tool_basename="${tool_specified##*/}"
5579        if test "x$tool_basename" = "x$tool_specified"; then
5580          # A command without a complete path is provided, search $PATH.
5581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5582$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5583          # Extract the first word of "$tool_basename", so it can be a program name with args.
5584set dummy $tool_basename; ac_word=$2
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586$as_echo_n "checking for $ac_word... " >&6; }
5587if ${ac_cv_path_BASH+:} false; then :
5588  $as_echo_n "(cached) " >&6
5589else
5590  case $BASH in
5591  [\\/]* | ?:[\\/]*)
5592  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5593  ;;
5594  *)
5595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598  IFS=$as_save_IFS
5599  test -z "$as_dir" && as_dir=.
5600    for ac_exec_ext in '' $ac_executable_extensions; do
5601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604    break 2
5605  fi
5606done
5607  done
5608IFS=$as_save_IFS
5609
5610  ;;
5611esac
5612fi
5613BASH=$ac_cv_path_BASH
5614if test -n "$BASH"; then
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5616$as_echo "$BASH" >&6; }
5617else
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623          if test "x$BASH" = x; then
5624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5625          fi
5626        else
5627          # Otherwise we believe it is a complete path. Use it as it is.
5628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5629$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5631$as_echo_n "checking for BASH... " >&6; }
5632          if test ! -x "$tool_specified"; then
5633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5634$as_echo "not found" >&6; }
5635            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5636          fi
5637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5638$as_echo "$tool_specified" >&6; }
5639        fi
5640      fi
5641    fi
5642
5643  fi
5644
5645
5646
5647  if test "x$BASH" = x; then
5648    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5649  fi
5650
5651
5652
5653
5654
5655  # Publish this variable in the help.
5656
5657
5658  if [ -z "${CAT+x}" ]; then
5659    # The variable is not set by user, try to locate tool using the code snippet
5660    for ac_prog in cat
5661do
5662  # Extract the first word of "$ac_prog", so it can be a program name with args.
5663set dummy $ac_prog; ac_word=$2
5664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5665$as_echo_n "checking for $ac_word... " >&6; }
5666if ${ac_cv_path_CAT+:} false; then :
5667  $as_echo_n "(cached) " >&6
5668else
5669  case $CAT in
5670  [\\/]* | ?:[\\/]*)
5671  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5672  ;;
5673  *)
5674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677  IFS=$as_save_IFS
5678  test -z "$as_dir" && as_dir=.
5679    for ac_exec_ext in '' $ac_executable_extensions; do
5680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5681    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5683    break 2
5684  fi
5685done
5686  done
5687IFS=$as_save_IFS
5688
5689  ;;
5690esac
5691fi
5692CAT=$ac_cv_path_CAT
5693if test -n "$CAT"; then
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5695$as_echo "$CAT" >&6; }
5696else
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
5699fi
5700
5701
5702  test -n "$CAT" && break
5703done
5704
5705  else
5706    # The variable is set, but is it from the command line or the environment?
5707
5708    # Try to remove the string !CAT! from our list.
5709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5711      # If it failed, the variable was not from the command line. Ignore it,
5712      # but warn the user (except for BASH, which is always set by the calling BASH).
5713      if test "xCAT" != xBASH; then
5714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5715$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5716      fi
5717      # Try to locate tool using the code snippet
5718      for ac_prog in cat
5719do
5720  # Extract the first word of "$ac_prog", so it can be a program name with args.
5721set dummy $ac_prog; ac_word=$2
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5723$as_echo_n "checking for $ac_word... " >&6; }
5724if ${ac_cv_path_CAT+:} false; then :
5725  $as_echo_n "(cached) " >&6
5726else
5727  case $CAT in
5728  [\\/]* | ?:[\\/]*)
5729  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5730  ;;
5731  *)
5732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733for as_dir in $PATH
5734do
5735  IFS=$as_save_IFS
5736  test -z "$as_dir" && as_dir=.
5737    for ac_exec_ext in '' $ac_executable_extensions; do
5738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5739    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741    break 2
5742  fi
5743done
5744  done
5745IFS=$as_save_IFS
5746
5747  ;;
5748esac
5749fi
5750CAT=$ac_cv_path_CAT
5751if test -n "$CAT"; then
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5753$as_echo "$CAT" >&6; }
5754else
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756$as_echo "no" >&6; }
5757fi
5758
5759
5760  test -n "$CAT" && break
5761done
5762
5763    else
5764      # If it succeeded, then it was overridden by the user. We will use it
5765      # for the tool.
5766
5767      # First remove it from the list of overridden variables, so we can test
5768      # for unknown variables in the end.
5769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5770
5771      # Check if we try to supply an empty value
5772      if test "x$CAT" = x; then
5773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5774$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5776$as_echo_n "checking for CAT... " >&6; }
5777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5778$as_echo "disabled" >&6; }
5779      else
5780        # Check if the provided tool contains a complete path.
5781        tool_specified="$CAT"
5782        tool_basename="${tool_specified##*/}"
5783        if test "x$tool_basename" = "x$tool_specified"; then
5784          # A command without a complete path is provided, search $PATH.
5785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5786$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5787          # Extract the first word of "$tool_basename", so it can be a program name with args.
5788set dummy $tool_basename; ac_word=$2
5789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790$as_echo_n "checking for $ac_word... " >&6; }
5791if ${ac_cv_path_CAT+:} false; then :
5792  $as_echo_n "(cached) " >&6
5793else
5794  case $CAT in
5795  [\\/]* | ?:[\\/]*)
5796  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5797  ;;
5798  *)
5799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5800for as_dir in $PATH
5801do
5802  IFS=$as_save_IFS
5803  test -z "$as_dir" && as_dir=.
5804    for ac_exec_ext in '' $ac_executable_extensions; do
5805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5806    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5808    break 2
5809  fi
5810done
5811  done
5812IFS=$as_save_IFS
5813
5814  ;;
5815esac
5816fi
5817CAT=$ac_cv_path_CAT
5818if test -n "$CAT"; then
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5820$as_echo "$CAT" >&6; }
5821else
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
5824fi
5825
5826
5827          if test "x$CAT" = x; then
5828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5829          fi
5830        else
5831          # Otherwise we believe it is a complete path. Use it as it is.
5832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5833$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5835$as_echo_n "checking for CAT... " >&6; }
5836          if test ! -x "$tool_specified"; then
5837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5838$as_echo "not found" >&6; }
5839            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5840          fi
5841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5842$as_echo "$tool_specified" >&6; }
5843        fi
5844      fi
5845    fi
5846
5847  fi
5848
5849
5850
5851  if test "x$CAT" = x; then
5852    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5853  fi
5854
5855
5856
5857
5858
5859  # Publish this variable in the help.
5860
5861
5862  if [ -z "${CHMOD+x}" ]; then
5863    # The variable is not set by user, try to locate tool using the code snippet
5864    for ac_prog in chmod
5865do
5866  # Extract the first word of "$ac_prog", so it can be a program name with args.
5867set dummy $ac_prog; ac_word=$2
5868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5869$as_echo_n "checking for $ac_word... " >&6; }
5870if ${ac_cv_path_CHMOD+:} false; then :
5871  $as_echo_n "(cached) " >&6
5872else
5873  case $CHMOD in
5874  [\\/]* | ?:[\\/]*)
5875  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5876  ;;
5877  *)
5878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5879for as_dir in $PATH
5880do
5881  IFS=$as_save_IFS
5882  test -z "$as_dir" && as_dir=.
5883    for ac_exec_ext in '' $ac_executable_extensions; do
5884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5885    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5887    break 2
5888  fi
5889done
5890  done
5891IFS=$as_save_IFS
5892
5893  ;;
5894esac
5895fi
5896CHMOD=$ac_cv_path_CHMOD
5897if test -n "$CHMOD"; then
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5899$as_echo "$CHMOD" >&6; }
5900else
5901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902$as_echo "no" >&6; }
5903fi
5904
5905
5906  test -n "$CHMOD" && break
5907done
5908
5909  else
5910    # The variable is set, but is it from the command line or the environment?
5911
5912    # Try to remove the string !CHMOD! from our list.
5913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5915      # If it failed, the variable was not from the command line. Ignore it,
5916      # but warn the user (except for BASH, which is always set by the calling BASH).
5917      if test "xCHMOD" != xBASH; then
5918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5919$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5920      fi
5921      # Try to locate tool using the code snippet
5922      for ac_prog in chmod
5923do
5924  # Extract the first word of "$ac_prog", so it can be a program name with args.
5925set dummy $ac_prog; ac_word=$2
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
5928if ${ac_cv_path_CHMOD+:} false; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931  case $CHMOD in
5932  [\\/]* | ?:[\\/]*)
5933  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5934  ;;
5935  *)
5936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939  IFS=$as_save_IFS
5940  test -z "$as_dir" && as_dir=.
5941    for ac_exec_ext in '' $ac_executable_extensions; do
5942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945    break 2
5946  fi
5947done
5948  done
5949IFS=$as_save_IFS
5950
5951  ;;
5952esac
5953fi
5954CHMOD=$ac_cv_path_CHMOD
5955if test -n "$CHMOD"; then
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5957$as_echo "$CHMOD" >&6; }
5958else
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
5961fi
5962
5963
5964  test -n "$CHMOD" && break
5965done
5966
5967    else
5968      # If it succeeded, then it was overridden by the user. We will use it
5969      # for the tool.
5970
5971      # First remove it from the list of overridden variables, so we can test
5972      # for unknown variables in the end.
5973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5974
5975      # Check if we try to supply an empty value
5976      if test "x$CHMOD" = x; then
5977        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5978$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5980$as_echo_n "checking for CHMOD... " >&6; }
5981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5982$as_echo "disabled" >&6; }
5983      else
5984        # Check if the provided tool contains a complete path.
5985        tool_specified="$CHMOD"
5986        tool_basename="${tool_specified##*/}"
5987        if test "x$tool_basename" = "x$tool_specified"; then
5988          # A command without a complete path is provided, search $PATH.
5989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5990$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5991          # Extract the first word of "$tool_basename", so it can be a program name with args.
5992set dummy $tool_basename; ac_word=$2
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994$as_echo_n "checking for $ac_word... " >&6; }
5995if ${ac_cv_path_CHMOD+:} false; then :
5996  $as_echo_n "(cached) " >&6
5997else
5998  case $CHMOD in
5999  [\\/]* | ?:[\\/]*)
6000  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
6001  ;;
6002  *)
6003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006  IFS=$as_save_IFS
6007  test -z "$as_dir" && as_dir=.
6008    for ac_exec_ext in '' $ac_executable_extensions; do
6009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6010    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012    break 2
6013  fi
6014done
6015  done
6016IFS=$as_save_IFS
6017
6018  ;;
6019esac
6020fi
6021CHMOD=$ac_cv_path_CHMOD
6022if test -n "$CHMOD"; then
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6024$as_echo "$CHMOD" >&6; }
6025else
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028fi
6029
6030
6031          if test "x$CHMOD" = x; then
6032            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6033          fi
6034        else
6035          # Otherwise we believe it is a complete path. Use it as it is.
6036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6037$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6038          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6039$as_echo_n "checking for CHMOD... " >&6; }
6040          if test ! -x "$tool_specified"; then
6041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6042$as_echo "not found" >&6; }
6043            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6044          fi
6045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6046$as_echo "$tool_specified" >&6; }
6047        fi
6048      fi
6049    fi
6050
6051  fi
6052
6053
6054
6055  if test "x$CHMOD" = x; then
6056    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6057  fi
6058
6059
6060
6061
6062
6063  # Publish this variable in the help.
6064
6065
6066  if [ -z "${CMP+x}" ]; then
6067    # The variable is not set by user, try to locate tool using the code snippet
6068    for ac_prog in cmp
6069do
6070  # Extract the first word of "$ac_prog", so it can be a program name with args.
6071set dummy $ac_prog; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_path_CMP+:} false; then :
6075  $as_echo_n "(cached) " >&6
6076else
6077  case $CMP in
6078  [\\/]* | ?:[\\/]*)
6079  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6080  ;;
6081  *)
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_exec_ext in '' $ac_executable_extensions; do
6088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6089    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6091    break 2
6092  fi
6093done
6094  done
6095IFS=$as_save_IFS
6096
6097  ;;
6098esac
6099fi
6100CMP=$ac_cv_path_CMP
6101if test -n "$CMP"; then
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6103$as_echo "$CMP" >&6; }
6104else
6105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6106$as_echo "no" >&6; }
6107fi
6108
6109
6110  test -n "$CMP" && break
6111done
6112
6113  else
6114    # The variable is set, but is it from the command line or the environment?
6115
6116    # Try to remove the string !CMP! from our list.
6117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6119      # If it failed, the variable was not from the command line. Ignore it,
6120      # but warn the user (except for BASH, which is always set by the calling BASH).
6121      if test "xCMP" != xBASH; then
6122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6123$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6124      fi
6125      # Try to locate tool using the code snippet
6126      for ac_prog in cmp
6127do
6128  # Extract the first word of "$ac_prog", so it can be a program name with args.
6129set dummy $ac_prog; ac_word=$2
6130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6131$as_echo_n "checking for $ac_word... " >&6; }
6132if ${ac_cv_path_CMP+:} false; then :
6133  $as_echo_n "(cached) " >&6
6134else
6135  case $CMP in
6136  [\\/]* | ?:[\\/]*)
6137  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6138  ;;
6139  *)
6140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143  IFS=$as_save_IFS
6144  test -z "$as_dir" && as_dir=.
6145    for ac_exec_ext in '' $ac_executable_extensions; do
6146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6147    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149    break 2
6150  fi
6151done
6152  done
6153IFS=$as_save_IFS
6154
6155  ;;
6156esac
6157fi
6158CMP=$ac_cv_path_CMP
6159if test -n "$CMP"; then
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6161$as_echo "$CMP" >&6; }
6162else
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164$as_echo "no" >&6; }
6165fi
6166
6167
6168  test -n "$CMP" && break
6169done
6170
6171    else
6172      # If it succeeded, then it was overridden by the user. We will use it
6173      # for the tool.
6174
6175      # First remove it from the list of overridden variables, so we can test
6176      # for unknown variables in the end.
6177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6178
6179      # Check if we try to supply an empty value
6180      if test "x$CMP" = x; then
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6182$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6184$as_echo_n "checking for CMP... " >&6; }
6185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6186$as_echo "disabled" >&6; }
6187      else
6188        # Check if the provided tool contains a complete path.
6189        tool_specified="$CMP"
6190        tool_basename="${tool_specified##*/}"
6191        if test "x$tool_basename" = "x$tool_specified"; then
6192          # A command without a complete path is provided, search $PATH.
6193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6194$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6195          # Extract the first word of "$tool_basename", so it can be a program name with args.
6196set dummy $tool_basename; ac_word=$2
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198$as_echo_n "checking for $ac_word... " >&6; }
6199if ${ac_cv_path_CMP+:} false; then :
6200  $as_echo_n "(cached) " >&6
6201else
6202  case $CMP in
6203  [\\/]* | ?:[\\/]*)
6204  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6205  ;;
6206  *)
6207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6208for as_dir in $PATH
6209do
6210  IFS=$as_save_IFS
6211  test -z "$as_dir" && as_dir=.
6212    for ac_exec_ext in '' $ac_executable_extensions; do
6213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6214    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6216    break 2
6217  fi
6218done
6219  done
6220IFS=$as_save_IFS
6221
6222  ;;
6223esac
6224fi
6225CMP=$ac_cv_path_CMP
6226if test -n "$CMP"; then
6227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6228$as_echo "$CMP" >&6; }
6229else
6230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6231$as_echo "no" >&6; }
6232fi
6233
6234
6235          if test "x$CMP" = x; then
6236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6237          fi
6238        else
6239          # Otherwise we believe it is a complete path. Use it as it is.
6240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6241$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6243$as_echo_n "checking for CMP... " >&6; }
6244          if test ! -x "$tool_specified"; then
6245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6246$as_echo "not found" >&6; }
6247            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6248          fi
6249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6250$as_echo "$tool_specified" >&6; }
6251        fi
6252      fi
6253    fi
6254
6255  fi
6256
6257
6258
6259  if test "x$CMP" = x; then
6260    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6261  fi
6262
6263
6264
6265
6266
6267  # Publish this variable in the help.
6268
6269
6270  if [ -z "${COMM+x}" ]; then
6271    # The variable is not set by user, try to locate tool using the code snippet
6272    for ac_prog in comm
6273do
6274  # Extract the first word of "$ac_prog", so it can be a program name with args.
6275set dummy $ac_prog; ac_word=$2
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6277$as_echo_n "checking for $ac_word... " >&6; }
6278if ${ac_cv_path_COMM+:} false; then :
6279  $as_echo_n "(cached) " >&6
6280else
6281  case $COMM in
6282  [\\/]* | ?:[\\/]*)
6283  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6284  ;;
6285  *)
6286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289  IFS=$as_save_IFS
6290  test -z "$as_dir" && as_dir=.
6291    for ac_exec_ext in '' $ac_executable_extensions; do
6292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295    break 2
6296  fi
6297done
6298  done
6299IFS=$as_save_IFS
6300
6301  ;;
6302esac
6303fi
6304COMM=$ac_cv_path_COMM
6305if test -n "$COMM"; then
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6307$as_echo "$COMM" >&6; }
6308else
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310$as_echo "no" >&6; }
6311fi
6312
6313
6314  test -n "$COMM" && break
6315done
6316
6317  else
6318    # The variable is set, but is it from the command line or the environment?
6319
6320    # Try to remove the string !COMM! from our list.
6321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6323      # If it failed, the variable was not from the command line. Ignore it,
6324      # but warn the user (except for BASH, which is always set by the calling BASH).
6325      if test "xCOMM" != xBASH; then
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6327$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6328      fi
6329      # Try to locate tool using the code snippet
6330      for ac_prog in comm
6331do
6332  # Extract the first word of "$ac_prog", so it can be a program name with args.
6333set dummy $ac_prog; ac_word=$2
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6335$as_echo_n "checking for $ac_word... " >&6; }
6336if ${ac_cv_path_COMM+:} false; then :
6337  $as_echo_n "(cached) " >&6
6338else
6339  case $COMM in
6340  [\\/]* | ?:[\\/]*)
6341  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6342  ;;
6343  *)
6344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345for as_dir in $PATH
6346do
6347  IFS=$as_save_IFS
6348  test -z "$as_dir" && as_dir=.
6349    for ac_exec_ext in '' $ac_executable_extensions; do
6350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6351    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353    break 2
6354  fi
6355done
6356  done
6357IFS=$as_save_IFS
6358
6359  ;;
6360esac
6361fi
6362COMM=$ac_cv_path_COMM
6363if test -n "$COMM"; then
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6365$as_echo "$COMM" >&6; }
6366else
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368$as_echo "no" >&6; }
6369fi
6370
6371
6372  test -n "$COMM" && break
6373done
6374
6375    else
6376      # If it succeeded, then it was overridden by the user. We will use it
6377      # for the tool.
6378
6379      # First remove it from the list of overridden variables, so we can test
6380      # for unknown variables in the end.
6381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6382
6383      # Check if we try to supply an empty value
6384      if test "x$COMM" = x; then
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6386$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6388$as_echo_n "checking for COMM... " >&6; }
6389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6390$as_echo "disabled" >&6; }
6391      else
6392        # Check if the provided tool contains a complete path.
6393        tool_specified="$COMM"
6394        tool_basename="${tool_specified##*/}"
6395        if test "x$tool_basename" = "x$tool_specified"; then
6396          # A command without a complete path is provided, search $PATH.
6397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6398$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6399          # Extract the first word of "$tool_basename", so it can be a program name with args.
6400set dummy $tool_basename; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if ${ac_cv_path_COMM+:} false; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  case $COMM in
6407  [\\/]* | ?:[\\/]*)
6408  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6409  ;;
6410  *)
6411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414  IFS=$as_save_IFS
6415  test -z "$as_dir" && as_dir=.
6416    for ac_exec_ext in '' $ac_executable_extensions; do
6417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420    break 2
6421  fi
6422done
6423  done
6424IFS=$as_save_IFS
6425
6426  ;;
6427esac
6428fi
6429COMM=$ac_cv_path_COMM
6430if test -n "$COMM"; then
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6432$as_echo "$COMM" >&6; }
6433else
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; }
6436fi
6437
6438
6439          if test "x$COMM" = x; then
6440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6441          fi
6442        else
6443          # Otherwise we believe it is a complete path. Use it as it is.
6444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6445$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6447$as_echo_n "checking for COMM... " >&6; }
6448          if test ! -x "$tool_specified"; then
6449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6450$as_echo "not found" >&6; }
6451            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6452          fi
6453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6454$as_echo "$tool_specified" >&6; }
6455        fi
6456      fi
6457    fi
6458
6459  fi
6460
6461
6462
6463  if test "x$COMM" = x; then
6464    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6465  fi
6466
6467
6468
6469
6470
6471  # Publish this variable in the help.
6472
6473
6474  if [ -z "${CP+x}" ]; then
6475    # The variable is not set by user, try to locate tool using the code snippet
6476    for ac_prog in cp
6477do
6478  # Extract the first word of "$ac_prog", so it can be a program name with args.
6479set dummy $ac_prog; ac_word=$2
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6481$as_echo_n "checking for $ac_word... " >&6; }
6482if ${ac_cv_path_CP+:} false; then :
6483  $as_echo_n "(cached) " >&6
6484else
6485  case $CP in
6486  [\\/]* | ?:[\\/]*)
6487  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6488  ;;
6489  *)
6490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in $PATH
6492do
6493  IFS=$as_save_IFS
6494  test -z "$as_dir" && as_dir=.
6495    for ac_exec_ext in '' $ac_executable_extensions; do
6496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6497    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6499    break 2
6500  fi
6501done
6502  done
6503IFS=$as_save_IFS
6504
6505  ;;
6506esac
6507fi
6508CP=$ac_cv_path_CP
6509if test -n "$CP"; then
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6511$as_echo "$CP" >&6; }
6512else
6513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
6515fi
6516
6517
6518  test -n "$CP" && break
6519done
6520
6521  else
6522    # The variable is set, but is it from the command line or the environment?
6523
6524    # Try to remove the string !CP! from our list.
6525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6527      # If it failed, the variable was not from the command line. Ignore it,
6528      # but warn the user (except for BASH, which is always set by the calling BASH).
6529      if test "xCP" != xBASH; then
6530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6531$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6532      fi
6533      # Try to locate tool using the code snippet
6534      for ac_prog in cp
6535do
6536  # Extract the first word of "$ac_prog", so it can be a program name with args.
6537set dummy $ac_prog; ac_word=$2
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6539$as_echo_n "checking for $ac_word... " >&6; }
6540if ${ac_cv_path_CP+:} false; then :
6541  $as_echo_n "(cached) " >&6
6542else
6543  case $CP in
6544  [\\/]* | ?:[\\/]*)
6545  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6546  ;;
6547  *)
6548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6549for as_dir in $PATH
6550do
6551  IFS=$as_save_IFS
6552  test -z "$as_dir" && as_dir=.
6553    for ac_exec_ext in '' $ac_executable_extensions; do
6554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6555    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6557    break 2
6558  fi
6559done
6560  done
6561IFS=$as_save_IFS
6562
6563  ;;
6564esac
6565fi
6566CP=$ac_cv_path_CP
6567if test -n "$CP"; then
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6569$as_echo "$CP" >&6; }
6570else
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6572$as_echo "no" >&6; }
6573fi
6574
6575
6576  test -n "$CP" && break
6577done
6578
6579    else
6580      # If it succeeded, then it was overridden by the user. We will use it
6581      # for the tool.
6582
6583      # First remove it from the list of overridden variables, so we can test
6584      # for unknown variables in the end.
6585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6586
6587      # Check if we try to supply an empty value
6588      if test "x$CP" = x; then
6589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6590$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6592$as_echo_n "checking for CP... " >&6; }
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6594$as_echo "disabled" >&6; }
6595      else
6596        # Check if the provided tool contains a complete path.
6597        tool_specified="$CP"
6598        tool_basename="${tool_specified##*/}"
6599        if test "x$tool_basename" = "x$tool_specified"; then
6600          # A command without a complete path is provided, search $PATH.
6601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6602$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6603          # Extract the first word of "$tool_basename", so it can be a program name with args.
6604set dummy $tool_basename; ac_word=$2
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6606$as_echo_n "checking for $ac_word... " >&6; }
6607if ${ac_cv_path_CP+:} false; then :
6608  $as_echo_n "(cached) " >&6
6609else
6610  case $CP in
6611  [\\/]* | ?:[\\/]*)
6612  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6613  ;;
6614  *)
6615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6616for as_dir in $PATH
6617do
6618  IFS=$as_save_IFS
6619  test -z "$as_dir" && as_dir=.
6620    for ac_exec_ext in '' $ac_executable_extensions; do
6621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6622    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6624    break 2
6625  fi
6626done
6627  done
6628IFS=$as_save_IFS
6629
6630  ;;
6631esac
6632fi
6633CP=$ac_cv_path_CP
6634if test -n "$CP"; then
6635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6636$as_echo "$CP" >&6; }
6637else
6638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6639$as_echo "no" >&6; }
6640fi
6641
6642
6643          if test "x$CP" = x; then
6644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6645          fi
6646        else
6647          # Otherwise we believe it is a complete path. Use it as it is.
6648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6649$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6651$as_echo_n "checking for CP... " >&6; }
6652          if test ! -x "$tool_specified"; then
6653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6654$as_echo "not found" >&6; }
6655            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6656          fi
6657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6658$as_echo "$tool_specified" >&6; }
6659        fi
6660      fi
6661    fi
6662
6663  fi
6664
6665
6666
6667  if test "x$CP" = x; then
6668    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6669  fi
6670
6671
6672
6673
6674
6675  # Publish this variable in the help.
6676
6677
6678  if [ -z "${CUT+x}" ]; then
6679    # The variable is not set by user, try to locate tool using the code snippet
6680    for ac_prog in cut
6681do
6682  # Extract the first word of "$ac_prog", so it can be a program name with args.
6683set dummy $ac_prog; ac_word=$2
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6685$as_echo_n "checking for $ac_word... " >&6; }
6686if ${ac_cv_path_CUT+:} false; then :
6687  $as_echo_n "(cached) " >&6
6688else
6689  case $CUT in
6690  [\\/]* | ?:[\\/]*)
6691  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6692  ;;
6693  *)
6694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6695for as_dir in $PATH
6696do
6697  IFS=$as_save_IFS
6698  test -z "$as_dir" && as_dir=.
6699    for ac_exec_ext in '' $ac_executable_extensions; do
6700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6701    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6703    break 2
6704  fi
6705done
6706  done
6707IFS=$as_save_IFS
6708
6709  ;;
6710esac
6711fi
6712CUT=$ac_cv_path_CUT
6713if test -n "$CUT"; then
6714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6715$as_echo "$CUT" >&6; }
6716else
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6718$as_echo "no" >&6; }
6719fi
6720
6721
6722  test -n "$CUT" && break
6723done
6724
6725  else
6726    # The variable is set, but is it from the command line or the environment?
6727
6728    # Try to remove the string !CUT! from our list.
6729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6731      # If it failed, the variable was not from the command line. Ignore it,
6732      # but warn the user (except for BASH, which is always set by the calling BASH).
6733      if test "xCUT" != xBASH; then
6734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6735$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6736      fi
6737      # Try to locate tool using the code snippet
6738      for ac_prog in cut
6739do
6740  # Extract the first word of "$ac_prog", so it can be a program name with args.
6741set dummy $ac_prog; ac_word=$2
6742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743$as_echo_n "checking for $ac_word... " >&6; }
6744if ${ac_cv_path_CUT+:} false; then :
6745  $as_echo_n "(cached) " >&6
6746else
6747  case $CUT in
6748  [\\/]* | ?:[\\/]*)
6749  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6750  ;;
6751  *)
6752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in $PATH
6754do
6755  IFS=$as_save_IFS
6756  test -z "$as_dir" && as_dir=.
6757    for ac_exec_ext in '' $ac_executable_extensions; do
6758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761    break 2
6762  fi
6763done
6764  done
6765IFS=$as_save_IFS
6766
6767  ;;
6768esac
6769fi
6770CUT=$ac_cv_path_CUT
6771if test -n "$CUT"; then
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6773$as_echo "$CUT" >&6; }
6774else
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776$as_echo "no" >&6; }
6777fi
6778
6779
6780  test -n "$CUT" && break
6781done
6782
6783    else
6784      # If it succeeded, then it was overridden by the user. We will use it
6785      # for the tool.
6786
6787      # First remove it from the list of overridden variables, so we can test
6788      # for unknown variables in the end.
6789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6790
6791      # Check if we try to supply an empty value
6792      if test "x$CUT" = x; then
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6794$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6796$as_echo_n "checking for CUT... " >&6; }
6797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6798$as_echo "disabled" >&6; }
6799      else
6800        # Check if the provided tool contains a complete path.
6801        tool_specified="$CUT"
6802        tool_basename="${tool_specified##*/}"
6803        if test "x$tool_basename" = "x$tool_specified"; then
6804          # A command without a complete path is provided, search $PATH.
6805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6806$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6807          # Extract the first word of "$tool_basename", so it can be a program name with args.
6808set dummy $tool_basename; ac_word=$2
6809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6810$as_echo_n "checking for $ac_word... " >&6; }
6811if ${ac_cv_path_CUT+:} false; then :
6812  $as_echo_n "(cached) " >&6
6813else
6814  case $CUT in
6815  [\\/]* | ?:[\\/]*)
6816  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6817  ;;
6818  *)
6819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6820for as_dir in $PATH
6821do
6822  IFS=$as_save_IFS
6823  test -z "$as_dir" && as_dir=.
6824    for ac_exec_ext in '' $ac_executable_extensions; do
6825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6826    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6828    break 2
6829  fi
6830done
6831  done
6832IFS=$as_save_IFS
6833
6834  ;;
6835esac
6836fi
6837CUT=$ac_cv_path_CUT
6838if test -n "$CUT"; then
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6840$as_echo "$CUT" >&6; }
6841else
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6843$as_echo "no" >&6; }
6844fi
6845
6846
6847          if test "x$CUT" = x; then
6848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6849          fi
6850        else
6851          # Otherwise we believe it is a complete path. Use it as it is.
6852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6853$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6855$as_echo_n "checking for CUT... " >&6; }
6856          if test ! -x "$tool_specified"; then
6857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6858$as_echo "not found" >&6; }
6859            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6860          fi
6861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6862$as_echo "$tool_specified" >&6; }
6863        fi
6864      fi
6865    fi
6866
6867  fi
6868
6869
6870
6871  if test "x$CUT" = x; then
6872    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6873  fi
6874
6875
6876
6877
6878
6879  # Publish this variable in the help.
6880
6881
6882  if [ -z "${DATE+x}" ]; then
6883    # The variable is not set by user, try to locate tool using the code snippet
6884    for ac_prog in date
6885do
6886  # Extract the first word of "$ac_prog", so it can be a program name with args.
6887set dummy $ac_prog; ac_word=$2
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6889$as_echo_n "checking for $ac_word... " >&6; }
6890if ${ac_cv_path_DATE+:} false; then :
6891  $as_echo_n "(cached) " >&6
6892else
6893  case $DATE in
6894  [\\/]* | ?:[\\/]*)
6895  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6896  ;;
6897  *)
6898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6899for as_dir in $PATH
6900do
6901  IFS=$as_save_IFS
6902  test -z "$as_dir" && as_dir=.
6903    for ac_exec_ext in '' $ac_executable_extensions; do
6904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6905    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6907    break 2
6908  fi
6909done
6910  done
6911IFS=$as_save_IFS
6912
6913  ;;
6914esac
6915fi
6916DATE=$ac_cv_path_DATE
6917if test -n "$DATE"; then
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6919$as_echo "$DATE" >&6; }
6920else
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6922$as_echo "no" >&6; }
6923fi
6924
6925
6926  test -n "$DATE" && break
6927done
6928
6929  else
6930    # The variable is set, but is it from the command line or the environment?
6931
6932    # Try to remove the string !DATE! from our list.
6933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6935      # If it failed, the variable was not from the command line. Ignore it,
6936      # but warn the user (except for BASH, which is always set by the calling BASH).
6937      if test "xDATE" != xBASH; then
6938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6939$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6940      fi
6941      # Try to locate tool using the code snippet
6942      for ac_prog in date
6943do
6944  # Extract the first word of "$ac_prog", so it can be a program name with args.
6945set dummy $ac_prog; ac_word=$2
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6947$as_echo_n "checking for $ac_word... " >&6; }
6948if ${ac_cv_path_DATE+:} false; then :
6949  $as_echo_n "(cached) " >&6
6950else
6951  case $DATE in
6952  [\\/]* | ?:[\\/]*)
6953  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6954  ;;
6955  *)
6956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6957for as_dir in $PATH
6958do
6959  IFS=$as_save_IFS
6960  test -z "$as_dir" && as_dir=.
6961    for ac_exec_ext in '' $ac_executable_extensions; do
6962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6963    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6965    break 2
6966  fi
6967done
6968  done
6969IFS=$as_save_IFS
6970
6971  ;;
6972esac
6973fi
6974DATE=$ac_cv_path_DATE
6975if test -n "$DATE"; then
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6977$as_echo "$DATE" >&6; }
6978else
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6980$as_echo "no" >&6; }
6981fi
6982
6983
6984  test -n "$DATE" && break
6985done
6986
6987    else
6988      # If it succeeded, then it was overridden by the user. We will use it
6989      # for the tool.
6990
6991      # First remove it from the list of overridden variables, so we can test
6992      # for unknown variables in the end.
6993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6994
6995      # Check if we try to supply an empty value
6996      if test "x$DATE" = x; then
6997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6998$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7000$as_echo_n "checking for DATE... " >&6; }
7001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7002$as_echo "disabled" >&6; }
7003      else
7004        # Check if the provided tool contains a complete path.
7005        tool_specified="$DATE"
7006        tool_basename="${tool_specified##*/}"
7007        if test "x$tool_basename" = "x$tool_specified"; then
7008          # A command without a complete path is provided, search $PATH.
7009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7010$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7011          # Extract the first word of "$tool_basename", so it can be a program name with args.
7012set dummy $tool_basename; ac_word=$2
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014$as_echo_n "checking for $ac_word... " >&6; }
7015if ${ac_cv_path_DATE+:} false; then :
7016  $as_echo_n "(cached) " >&6
7017else
7018  case $DATE in
7019  [\\/]* | ?:[\\/]*)
7020  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7021  ;;
7022  *)
7023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026  IFS=$as_save_IFS
7027  test -z "$as_dir" && as_dir=.
7028    for ac_exec_ext in '' $ac_executable_extensions; do
7029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7030    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032    break 2
7033  fi
7034done
7035  done
7036IFS=$as_save_IFS
7037
7038  ;;
7039esac
7040fi
7041DATE=$ac_cv_path_DATE
7042if test -n "$DATE"; then
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7044$as_echo "$DATE" >&6; }
7045else
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047$as_echo "no" >&6; }
7048fi
7049
7050
7051          if test "x$DATE" = x; then
7052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7053          fi
7054        else
7055          # Otherwise we believe it is a complete path. Use it as it is.
7056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7057$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7059$as_echo_n "checking for DATE... " >&6; }
7060          if test ! -x "$tool_specified"; then
7061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7062$as_echo "not found" >&6; }
7063            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7064          fi
7065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7066$as_echo "$tool_specified" >&6; }
7067        fi
7068      fi
7069    fi
7070
7071  fi
7072
7073
7074
7075  if test "x$DATE" = x; then
7076    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7077  fi
7078
7079
7080
7081
7082
7083  # Publish this variable in the help.
7084
7085
7086  if [ -z "${DIFF+x}" ]; then
7087    # The variable is not set by user, try to locate tool using the code snippet
7088    for ac_prog in gdiff diff
7089do
7090  # Extract the first word of "$ac_prog", so it can be a program name with args.
7091set dummy $ac_prog; ac_word=$2
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7093$as_echo_n "checking for $ac_word... " >&6; }
7094if ${ac_cv_path_DIFF+:} false; then :
7095  $as_echo_n "(cached) " >&6
7096else
7097  case $DIFF in
7098  [\\/]* | ?:[\\/]*)
7099  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7100  ;;
7101  *)
7102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103for as_dir in $PATH
7104do
7105  IFS=$as_save_IFS
7106  test -z "$as_dir" && as_dir=.
7107    for ac_exec_ext in '' $ac_executable_extensions; do
7108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7109    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7111    break 2
7112  fi
7113done
7114  done
7115IFS=$as_save_IFS
7116
7117  ;;
7118esac
7119fi
7120DIFF=$ac_cv_path_DIFF
7121if test -n "$DIFF"; then
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7123$as_echo "$DIFF" >&6; }
7124else
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7126$as_echo "no" >&6; }
7127fi
7128
7129
7130  test -n "$DIFF" && break
7131done
7132
7133  else
7134    # The variable is set, but is it from the command line or the environment?
7135
7136    # Try to remove the string !DIFF! from our list.
7137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7139      # If it failed, the variable was not from the command line. Ignore it,
7140      # but warn the user (except for BASH, which is always set by the calling BASH).
7141      if test "xDIFF" != xBASH; then
7142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7143$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7144      fi
7145      # Try to locate tool using the code snippet
7146      for ac_prog in gdiff diff
7147do
7148  # Extract the first word of "$ac_prog", so it can be a program name with args.
7149set dummy $ac_prog; ac_word=$2
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151$as_echo_n "checking for $ac_word... " >&6; }
7152if ${ac_cv_path_DIFF+:} false; then :
7153  $as_echo_n "(cached) " >&6
7154else
7155  case $DIFF in
7156  [\\/]* | ?:[\\/]*)
7157  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7158  ;;
7159  *)
7160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7161for as_dir in $PATH
7162do
7163  IFS=$as_save_IFS
7164  test -z "$as_dir" && as_dir=.
7165    for ac_exec_ext in '' $ac_executable_extensions; do
7166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7167    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7169    break 2
7170  fi
7171done
7172  done
7173IFS=$as_save_IFS
7174
7175  ;;
7176esac
7177fi
7178DIFF=$ac_cv_path_DIFF
7179if test -n "$DIFF"; then
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7181$as_echo "$DIFF" >&6; }
7182else
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184$as_echo "no" >&6; }
7185fi
7186
7187
7188  test -n "$DIFF" && break
7189done
7190
7191    else
7192      # If it succeeded, then it was overridden by the user. We will use it
7193      # for the tool.
7194
7195      # First remove it from the list of overridden variables, so we can test
7196      # for unknown variables in the end.
7197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7198
7199      # Check if we try to supply an empty value
7200      if test "x$DIFF" = x; then
7201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7202$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7204$as_echo_n "checking for DIFF... " >&6; }
7205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7206$as_echo "disabled" >&6; }
7207      else
7208        # Check if the provided tool contains a complete path.
7209        tool_specified="$DIFF"
7210        tool_basename="${tool_specified##*/}"
7211        if test "x$tool_basename" = "x$tool_specified"; then
7212          # A command without a complete path is provided, search $PATH.
7213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7214$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7215          # Extract the first word of "$tool_basename", so it can be a program name with args.
7216set dummy $tool_basename; ac_word=$2
7217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7218$as_echo_n "checking for $ac_word... " >&6; }
7219if ${ac_cv_path_DIFF+:} false; then :
7220  $as_echo_n "(cached) " >&6
7221else
7222  case $DIFF in
7223  [\\/]* | ?:[\\/]*)
7224  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7225  ;;
7226  *)
7227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7228for as_dir in $PATH
7229do
7230  IFS=$as_save_IFS
7231  test -z "$as_dir" && as_dir=.
7232    for ac_exec_ext in '' $ac_executable_extensions; do
7233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7234    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7236    break 2
7237  fi
7238done
7239  done
7240IFS=$as_save_IFS
7241
7242  ;;
7243esac
7244fi
7245DIFF=$ac_cv_path_DIFF
7246if test -n "$DIFF"; then
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7248$as_echo "$DIFF" >&6; }
7249else
7250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7251$as_echo "no" >&6; }
7252fi
7253
7254
7255          if test "x$DIFF" = x; then
7256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7257          fi
7258        else
7259          # Otherwise we believe it is a complete path. Use it as it is.
7260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7261$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7263$as_echo_n "checking for DIFF... " >&6; }
7264          if test ! -x "$tool_specified"; then
7265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7266$as_echo "not found" >&6; }
7267            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7268          fi
7269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7270$as_echo "$tool_specified" >&6; }
7271        fi
7272      fi
7273    fi
7274
7275  fi
7276
7277
7278
7279  if test "x$DIFF" = x; then
7280    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7281  fi
7282
7283
7284
7285
7286
7287  # Publish this variable in the help.
7288
7289
7290  if [ -z "${DIRNAME+x}" ]; then
7291    # The variable is not set by user, try to locate tool using the code snippet
7292    for ac_prog in dirname
7293do
7294  # Extract the first word of "$ac_prog", so it can be a program name with args.
7295set dummy $ac_prog; ac_word=$2
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297$as_echo_n "checking for $ac_word... " >&6; }
7298if ${ac_cv_path_DIRNAME+:} false; then :
7299  $as_echo_n "(cached) " >&6
7300else
7301  case $DIRNAME in
7302  [\\/]* | ?:[\\/]*)
7303  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7304  ;;
7305  *)
7306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7307for as_dir in $PATH
7308do
7309  IFS=$as_save_IFS
7310  test -z "$as_dir" && as_dir=.
7311    for ac_exec_ext in '' $ac_executable_extensions; do
7312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7313    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7315    break 2
7316  fi
7317done
7318  done
7319IFS=$as_save_IFS
7320
7321  ;;
7322esac
7323fi
7324DIRNAME=$ac_cv_path_DIRNAME
7325if test -n "$DIRNAME"; then
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7327$as_echo "$DIRNAME" >&6; }
7328else
7329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7330$as_echo "no" >&6; }
7331fi
7332
7333
7334  test -n "$DIRNAME" && break
7335done
7336
7337  else
7338    # The variable is set, but is it from the command line or the environment?
7339
7340    # Try to remove the string !DIRNAME! from our list.
7341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7343      # If it failed, the variable was not from the command line. Ignore it,
7344      # but warn the user (except for BASH, which is always set by the calling BASH).
7345      if test "xDIRNAME" != xBASH; then
7346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7347$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7348      fi
7349      # Try to locate tool using the code snippet
7350      for ac_prog in dirname
7351do
7352  # Extract the first word of "$ac_prog", so it can be a program name with args.
7353set dummy $ac_prog; ac_word=$2
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355$as_echo_n "checking for $ac_word... " >&6; }
7356if ${ac_cv_path_DIRNAME+:} false; then :
7357  $as_echo_n "(cached) " >&6
7358else
7359  case $DIRNAME in
7360  [\\/]* | ?:[\\/]*)
7361  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7362  ;;
7363  *)
7364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365for as_dir in $PATH
7366do
7367  IFS=$as_save_IFS
7368  test -z "$as_dir" && as_dir=.
7369    for ac_exec_ext in '' $ac_executable_extensions; do
7370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373    break 2
7374  fi
7375done
7376  done
7377IFS=$as_save_IFS
7378
7379  ;;
7380esac
7381fi
7382DIRNAME=$ac_cv_path_DIRNAME
7383if test -n "$DIRNAME"; then
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7385$as_echo "$DIRNAME" >&6; }
7386else
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
7389fi
7390
7391
7392  test -n "$DIRNAME" && break
7393done
7394
7395    else
7396      # If it succeeded, then it was overridden by the user. We will use it
7397      # for the tool.
7398
7399      # First remove it from the list of overridden variables, so we can test
7400      # for unknown variables in the end.
7401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7402
7403      # Check if we try to supply an empty value
7404      if test "x$DIRNAME" = x; then
7405        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7406$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7408$as_echo_n "checking for DIRNAME... " >&6; }
7409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7410$as_echo "disabled" >&6; }
7411      else
7412        # Check if the provided tool contains a complete path.
7413        tool_specified="$DIRNAME"
7414        tool_basename="${tool_specified##*/}"
7415        if test "x$tool_basename" = "x$tool_specified"; then
7416          # A command without a complete path is provided, search $PATH.
7417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7418$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7419          # Extract the first word of "$tool_basename", so it can be a program name with args.
7420set dummy $tool_basename; ac_word=$2
7421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7422$as_echo_n "checking for $ac_word... " >&6; }
7423if ${ac_cv_path_DIRNAME+:} false; then :
7424  $as_echo_n "(cached) " >&6
7425else
7426  case $DIRNAME in
7427  [\\/]* | ?:[\\/]*)
7428  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7429  ;;
7430  *)
7431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7432for as_dir in $PATH
7433do
7434  IFS=$as_save_IFS
7435  test -z "$as_dir" && as_dir=.
7436    for ac_exec_ext in '' $ac_executable_extensions; do
7437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7438    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7440    break 2
7441  fi
7442done
7443  done
7444IFS=$as_save_IFS
7445
7446  ;;
7447esac
7448fi
7449DIRNAME=$ac_cv_path_DIRNAME
7450if test -n "$DIRNAME"; then
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7452$as_echo "$DIRNAME" >&6; }
7453else
7454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7455$as_echo "no" >&6; }
7456fi
7457
7458
7459          if test "x$DIRNAME" = x; then
7460            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7461          fi
7462        else
7463          # Otherwise we believe it is a complete path. Use it as it is.
7464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7465$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7466          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7467$as_echo_n "checking for DIRNAME... " >&6; }
7468          if test ! -x "$tool_specified"; then
7469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7470$as_echo "not found" >&6; }
7471            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7472          fi
7473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7474$as_echo "$tool_specified" >&6; }
7475        fi
7476      fi
7477    fi
7478
7479  fi
7480
7481
7482
7483  if test "x$DIRNAME" = x; then
7484    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7485  fi
7486
7487
7488
7489
7490
7491  # Publish this variable in the help.
7492
7493
7494  if [ -z "${ECHO+x}" ]; then
7495    # The variable is not set by user, try to locate tool using the code snippet
7496    for ac_prog in echo
7497do
7498  # Extract the first word of "$ac_prog", so it can be a program name with args.
7499set dummy $ac_prog; ac_word=$2
7500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7501$as_echo_n "checking for $ac_word... " >&6; }
7502if ${ac_cv_path_ECHO+:} false; then :
7503  $as_echo_n "(cached) " >&6
7504else
7505  case $ECHO in
7506  [\\/]* | ?:[\\/]*)
7507  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7508  ;;
7509  *)
7510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513  IFS=$as_save_IFS
7514  test -z "$as_dir" && as_dir=.
7515    for ac_exec_ext in '' $ac_executable_extensions; do
7516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7517    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519    break 2
7520  fi
7521done
7522  done
7523IFS=$as_save_IFS
7524
7525  ;;
7526esac
7527fi
7528ECHO=$ac_cv_path_ECHO
7529if test -n "$ECHO"; then
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7531$as_echo "$ECHO" >&6; }
7532else
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
7535fi
7536
7537
7538  test -n "$ECHO" && break
7539done
7540
7541  else
7542    # The variable is set, but is it from the command line or the environment?
7543
7544    # Try to remove the string !ECHO! from our list.
7545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7547      # If it failed, the variable was not from the command line. Ignore it,
7548      # but warn the user (except for BASH, which is always set by the calling BASH).
7549      if test "xECHO" != xBASH; then
7550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7551$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7552      fi
7553      # Try to locate tool using the code snippet
7554      for ac_prog in echo
7555do
7556  # Extract the first word of "$ac_prog", so it can be a program name with args.
7557set dummy $ac_prog; ac_word=$2
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559$as_echo_n "checking for $ac_word... " >&6; }
7560if ${ac_cv_path_ECHO+:} false; then :
7561  $as_echo_n "(cached) " >&6
7562else
7563  case $ECHO in
7564  [\\/]* | ?:[\\/]*)
7565  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7566  ;;
7567  *)
7568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7569for as_dir in $PATH
7570do
7571  IFS=$as_save_IFS
7572  test -z "$as_dir" && as_dir=.
7573    for ac_exec_ext in '' $ac_executable_extensions; do
7574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7575    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7577    break 2
7578  fi
7579done
7580  done
7581IFS=$as_save_IFS
7582
7583  ;;
7584esac
7585fi
7586ECHO=$ac_cv_path_ECHO
7587if test -n "$ECHO"; then
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7589$as_echo "$ECHO" >&6; }
7590else
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592$as_echo "no" >&6; }
7593fi
7594
7595
7596  test -n "$ECHO" && break
7597done
7598
7599    else
7600      # If it succeeded, then it was overridden by the user. We will use it
7601      # for the tool.
7602
7603      # First remove it from the list of overridden variables, so we can test
7604      # for unknown variables in the end.
7605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7606
7607      # Check if we try to supply an empty value
7608      if test "x$ECHO" = x; then
7609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7610$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7612$as_echo_n "checking for ECHO... " >&6; }
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7614$as_echo "disabled" >&6; }
7615      else
7616        # Check if the provided tool contains a complete path.
7617        tool_specified="$ECHO"
7618        tool_basename="${tool_specified##*/}"
7619        if test "x$tool_basename" = "x$tool_specified"; then
7620          # A command without a complete path is provided, search $PATH.
7621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7622$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7623          # Extract the first word of "$tool_basename", so it can be a program name with args.
7624set dummy $tool_basename; ac_word=$2
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7626$as_echo_n "checking for $ac_word... " >&6; }
7627if ${ac_cv_path_ECHO+:} false; then :
7628  $as_echo_n "(cached) " >&6
7629else
7630  case $ECHO in
7631  [\\/]* | ?:[\\/]*)
7632  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7633  ;;
7634  *)
7635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7636for as_dir in $PATH
7637do
7638  IFS=$as_save_IFS
7639  test -z "$as_dir" && as_dir=.
7640    for ac_exec_ext in '' $ac_executable_extensions; do
7641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7642    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7644    break 2
7645  fi
7646done
7647  done
7648IFS=$as_save_IFS
7649
7650  ;;
7651esac
7652fi
7653ECHO=$ac_cv_path_ECHO
7654if test -n "$ECHO"; then
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7656$as_echo "$ECHO" >&6; }
7657else
7658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7659$as_echo "no" >&6; }
7660fi
7661
7662
7663          if test "x$ECHO" = x; then
7664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7665          fi
7666        else
7667          # Otherwise we believe it is a complete path. Use it as it is.
7668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7669$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7671$as_echo_n "checking for ECHO... " >&6; }
7672          if test ! -x "$tool_specified"; then
7673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7674$as_echo "not found" >&6; }
7675            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7676          fi
7677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7678$as_echo "$tool_specified" >&6; }
7679        fi
7680      fi
7681    fi
7682
7683  fi
7684
7685
7686
7687  if test "x$ECHO" = x; then
7688    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7689  fi
7690
7691
7692
7693
7694
7695  # Publish this variable in the help.
7696
7697
7698  if [ -z "${EXPR+x}" ]; then
7699    # The variable is not set by user, try to locate tool using the code snippet
7700    for ac_prog in expr
7701do
7702  # Extract the first word of "$ac_prog", so it can be a program name with args.
7703set dummy $ac_prog; ac_word=$2
7704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7705$as_echo_n "checking for $ac_word... " >&6; }
7706if ${ac_cv_path_EXPR+:} false; then :
7707  $as_echo_n "(cached) " >&6
7708else
7709  case $EXPR in
7710  [\\/]* | ?:[\\/]*)
7711  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7712  ;;
7713  *)
7714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715for as_dir in $PATH
7716do
7717  IFS=$as_save_IFS
7718  test -z "$as_dir" && as_dir=.
7719    for ac_exec_ext in '' $ac_executable_extensions; do
7720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7721    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723    break 2
7724  fi
7725done
7726  done
7727IFS=$as_save_IFS
7728
7729  ;;
7730esac
7731fi
7732EXPR=$ac_cv_path_EXPR
7733if test -n "$EXPR"; then
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7735$as_echo "$EXPR" >&6; }
7736else
7737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7738$as_echo "no" >&6; }
7739fi
7740
7741
7742  test -n "$EXPR" && break
7743done
7744
7745  else
7746    # The variable is set, but is it from the command line or the environment?
7747
7748    # Try to remove the string !EXPR! from our list.
7749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7751      # If it failed, the variable was not from the command line. Ignore it,
7752      # but warn the user (except for BASH, which is always set by the calling BASH).
7753      if test "xEXPR" != xBASH; then
7754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7755$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7756      fi
7757      # Try to locate tool using the code snippet
7758      for ac_prog in expr
7759do
7760  # Extract the first word of "$ac_prog", so it can be a program name with args.
7761set dummy $ac_prog; ac_word=$2
7762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7763$as_echo_n "checking for $ac_word... " >&6; }
7764if ${ac_cv_path_EXPR+:} false; then :
7765  $as_echo_n "(cached) " >&6
7766else
7767  case $EXPR in
7768  [\\/]* | ?:[\\/]*)
7769  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7770  ;;
7771  *)
7772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7773for as_dir in $PATH
7774do
7775  IFS=$as_save_IFS
7776  test -z "$as_dir" && as_dir=.
7777    for ac_exec_ext in '' $ac_executable_extensions; do
7778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7779    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7781    break 2
7782  fi
7783done
7784  done
7785IFS=$as_save_IFS
7786
7787  ;;
7788esac
7789fi
7790EXPR=$ac_cv_path_EXPR
7791if test -n "$EXPR"; then
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7793$as_echo "$EXPR" >&6; }
7794else
7795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7796$as_echo "no" >&6; }
7797fi
7798
7799
7800  test -n "$EXPR" && break
7801done
7802
7803    else
7804      # If it succeeded, then it was overridden by the user. We will use it
7805      # for the tool.
7806
7807      # First remove it from the list of overridden variables, so we can test
7808      # for unknown variables in the end.
7809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7810
7811      # Check if we try to supply an empty value
7812      if test "x$EXPR" = x; then
7813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7814$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7816$as_echo_n "checking for EXPR... " >&6; }
7817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7818$as_echo "disabled" >&6; }
7819      else
7820        # Check if the provided tool contains a complete path.
7821        tool_specified="$EXPR"
7822        tool_basename="${tool_specified##*/}"
7823        if test "x$tool_basename" = "x$tool_specified"; then
7824          # A command without a complete path is provided, search $PATH.
7825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7826$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7827          # Extract the first word of "$tool_basename", so it can be a program name with args.
7828set dummy $tool_basename; ac_word=$2
7829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7830$as_echo_n "checking for $ac_word... " >&6; }
7831if ${ac_cv_path_EXPR+:} false; then :
7832  $as_echo_n "(cached) " >&6
7833else
7834  case $EXPR in
7835  [\\/]* | ?:[\\/]*)
7836  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7837  ;;
7838  *)
7839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7840for as_dir in $PATH
7841do
7842  IFS=$as_save_IFS
7843  test -z "$as_dir" && as_dir=.
7844    for ac_exec_ext in '' $ac_executable_extensions; do
7845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7846    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7848    break 2
7849  fi
7850done
7851  done
7852IFS=$as_save_IFS
7853
7854  ;;
7855esac
7856fi
7857EXPR=$ac_cv_path_EXPR
7858if test -n "$EXPR"; then
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7860$as_echo "$EXPR" >&6; }
7861else
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7863$as_echo "no" >&6; }
7864fi
7865
7866
7867          if test "x$EXPR" = x; then
7868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7869          fi
7870        else
7871          # Otherwise we believe it is a complete path. Use it as it is.
7872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7873$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7875$as_echo_n "checking for EXPR... " >&6; }
7876          if test ! -x "$tool_specified"; then
7877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7878$as_echo "not found" >&6; }
7879            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7880          fi
7881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7882$as_echo "$tool_specified" >&6; }
7883        fi
7884      fi
7885    fi
7886
7887  fi
7888
7889
7890
7891  if test "x$EXPR" = x; then
7892    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7893  fi
7894
7895
7896
7897
7898
7899  # Publish this variable in the help.
7900
7901
7902  if [ -z "${FILE+x}" ]; then
7903    # The variable is not set by user, try to locate tool using the code snippet
7904    for ac_prog in file
7905do
7906  # Extract the first word of "$ac_prog", so it can be a program name with args.
7907set dummy $ac_prog; ac_word=$2
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909$as_echo_n "checking for $ac_word... " >&6; }
7910if ${ac_cv_path_FILE+:} false; then :
7911  $as_echo_n "(cached) " >&6
7912else
7913  case $FILE in
7914  [\\/]* | ?:[\\/]*)
7915  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7916  ;;
7917  *)
7918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919for as_dir in $PATH
7920do
7921  IFS=$as_save_IFS
7922  test -z "$as_dir" && as_dir=.
7923    for ac_exec_ext in '' $ac_executable_extensions; do
7924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7925    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7927    break 2
7928  fi
7929done
7930  done
7931IFS=$as_save_IFS
7932
7933  ;;
7934esac
7935fi
7936FILE=$ac_cv_path_FILE
7937if test -n "$FILE"; then
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7939$as_echo "$FILE" >&6; }
7940else
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942$as_echo "no" >&6; }
7943fi
7944
7945
7946  test -n "$FILE" && break
7947done
7948
7949  else
7950    # The variable is set, but is it from the command line or the environment?
7951
7952    # Try to remove the string !FILE! from our list.
7953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7955      # If it failed, the variable was not from the command line. Ignore it,
7956      # but warn the user (except for BASH, which is always set by the calling BASH).
7957      if test "xFILE" != xBASH; then
7958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7959$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7960      fi
7961      # Try to locate tool using the code snippet
7962      for ac_prog in file
7963do
7964  # Extract the first word of "$ac_prog", so it can be a program name with args.
7965set dummy $ac_prog; ac_word=$2
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7967$as_echo_n "checking for $ac_word... " >&6; }
7968if ${ac_cv_path_FILE+:} false; then :
7969  $as_echo_n "(cached) " >&6
7970else
7971  case $FILE in
7972  [\\/]* | ?:[\\/]*)
7973  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7974  ;;
7975  *)
7976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977for as_dir in $PATH
7978do
7979  IFS=$as_save_IFS
7980  test -z "$as_dir" && as_dir=.
7981    for ac_exec_ext in '' $ac_executable_extensions; do
7982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7983    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7985    break 2
7986  fi
7987done
7988  done
7989IFS=$as_save_IFS
7990
7991  ;;
7992esac
7993fi
7994FILE=$ac_cv_path_FILE
7995if test -n "$FILE"; then
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7997$as_echo "$FILE" >&6; }
7998else
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8000$as_echo "no" >&6; }
8001fi
8002
8003
8004  test -n "$FILE" && break
8005done
8006
8007    else
8008      # If it succeeded, then it was overridden by the user. We will use it
8009      # for the tool.
8010
8011      # First remove it from the list of overridden variables, so we can test
8012      # for unknown variables in the end.
8013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8014
8015      # Check if we try to supply an empty value
8016      if test "x$FILE" = x; then
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8018$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8020$as_echo_n "checking for FILE... " >&6; }
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8022$as_echo "disabled" >&6; }
8023      else
8024        # Check if the provided tool contains a complete path.
8025        tool_specified="$FILE"
8026        tool_basename="${tool_specified##*/}"
8027        if test "x$tool_basename" = "x$tool_specified"; then
8028          # A command without a complete path is provided, search $PATH.
8029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8030$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8031          # Extract the first word of "$tool_basename", so it can be a program name with args.
8032set dummy $tool_basename; ac_word=$2
8033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8034$as_echo_n "checking for $ac_word... " >&6; }
8035if ${ac_cv_path_FILE+:} false; then :
8036  $as_echo_n "(cached) " >&6
8037else
8038  case $FILE in
8039  [\\/]* | ?:[\\/]*)
8040  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8041  ;;
8042  *)
8043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8044for as_dir in $PATH
8045do
8046  IFS=$as_save_IFS
8047  test -z "$as_dir" && as_dir=.
8048    for ac_exec_ext in '' $ac_executable_extensions; do
8049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8050    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8052    break 2
8053  fi
8054done
8055  done
8056IFS=$as_save_IFS
8057
8058  ;;
8059esac
8060fi
8061FILE=$ac_cv_path_FILE
8062if test -n "$FILE"; then
8063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8064$as_echo "$FILE" >&6; }
8065else
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8067$as_echo "no" >&6; }
8068fi
8069
8070
8071          if test "x$FILE" = x; then
8072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8073          fi
8074        else
8075          # Otherwise we believe it is a complete path. Use it as it is.
8076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8077$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8079$as_echo_n "checking for FILE... " >&6; }
8080          if test ! -x "$tool_specified"; then
8081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8082$as_echo "not found" >&6; }
8083            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8084          fi
8085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8086$as_echo "$tool_specified" >&6; }
8087        fi
8088      fi
8089    fi
8090
8091  fi
8092
8093
8094
8095  if test "x$FILE" = x; then
8096    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8097  fi
8098
8099
8100
8101
8102
8103  # Publish this variable in the help.
8104
8105
8106  if [ -z "${FIND+x}" ]; then
8107    # The variable is not set by user, try to locate tool using the code snippet
8108    for ac_prog in find
8109do
8110  # Extract the first word of "$ac_prog", so it can be a program name with args.
8111set dummy $ac_prog; ac_word=$2
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8113$as_echo_n "checking for $ac_word... " >&6; }
8114if ${ac_cv_path_FIND+:} false; then :
8115  $as_echo_n "(cached) " >&6
8116else
8117  case $FIND in
8118  [\\/]* | ?:[\\/]*)
8119  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8120  ;;
8121  *)
8122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8123for as_dir in $PATH
8124do
8125  IFS=$as_save_IFS
8126  test -z "$as_dir" && as_dir=.
8127    for ac_exec_ext in '' $ac_executable_extensions; do
8128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8129    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8131    break 2
8132  fi
8133done
8134  done
8135IFS=$as_save_IFS
8136
8137  ;;
8138esac
8139fi
8140FIND=$ac_cv_path_FIND
8141if test -n "$FIND"; then
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8143$as_echo "$FIND" >&6; }
8144else
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8146$as_echo "no" >&6; }
8147fi
8148
8149
8150  test -n "$FIND" && break
8151done
8152
8153  else
8154    # The variable is set, but is it from the command line or the environment?
8155
8156    # Try to remove the string !FIND! from our list.
8157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8159      # If it failed, the variable was not from the command line. Ignore it,
8160      # but warn the user (except for BASH, which is always set by the calling BASH).
8161      if test "xFIND" != xBASH; then
8162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8163$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8164      fi
8165      # Try to locate tool using the code snippet
8166      for ac_prog in find
8167do
8168  # Extract the first word of "$ac_prog", so it can be a program name with args.
8169set dummy $ac_prog; ac_word=$2
8170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171$as_echo_n "checking for $ac_word... " >&6; }
8172if ${ac_cv_path_FIND+:} false; then :
8173  $as_echo_n "(cached) " >&6
8174else
8175  case $FIND in
8176  [\\/]* | ?:[\\/]*)
8177  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8178  ;;
8179  *)
8180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8181for as_dir in $PATH
8182do
8183  IFS=$as_save_IFS
8184  test -z "$as_dir" && as_dir=.
8185    for ac_exec_ext in '' $ac_executable_extensions; do
8186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8187    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8189    break 2
8190  fi
8191done
8192  done
8193IFS=$as_save_IFS
8194
8195  ;;
8196esac
8197fi
8198FIND=$ac_cv_path_FIND
8199if test -n "$FIND"; then
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8201$as_echo "$FIND" >&6; }
8202else
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204$as_echo "no" >&6; }
8205fi
8206
8207
8208  test -n "$FIND" && break
8209done
8210
8211    else
8212      # If it succeeded, then it was overridden by the user. We will use it
8213      # for the tool.
8214
8215      # First remove it from the list of overridden variables, so we can test
8216      # for unknown variables in the end.
8217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8218
8219      # Check if we try to supply an empty value
8220      if test "x$FIND" = x; then
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8222$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8224$as_echo_n "checking for FIND... " >&6; }
8225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8226$as_echo "disabled" >&6; }
8227      else
8228        # Check if the provided tool contains a complete path.
8229        tool_specified="$FIND"
8230        tool_basename="${tool_specified##*/}"
8231        if test "x$tool_basename" = "x$tool_specified"; then
8232          # A command without a complete path is provided, search $PATH.
8233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8234$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8235          # Extract the first word of "$tool_basename", so it can be a program name with args.
8236set dummy $tool_basename; ac_word=$2
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238$as_echo_n "checking for $ac_word... " >&6; }
8239if ${ac_cv_path_FIND+:} false; then :
8240  $as_echo_n "(cached) " >&6
8241else
8242  case $FIND in
8243  [\\/]* | ?:[\\/]*)
8244  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8245  ;;
8246  *)
8247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248for as_dir in $PATH
8249do
8250  IFS=$as_save_IFS
8251  test -z "$as_dir" && as_dir=.
8252    for ac_exec_ext in '' $ac_executable_extensions; do
8253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8254    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256    break 2
8257  fi
8258done
8259  done
8260IFS=$as_save_IFS
8261
8262  ;;
8263esac
8264fi
8265FIND=$ac_cv_path_FIND
8266if test -n "$FIND"; then
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8268$as_echo "$FIND" >&6; }
8269else
8270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271$as_echo "no" >&6; }
8272fi
8273
8274
8275          if test "x$FIND" = x; then
8276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8277          fi
8278        else
8279          # Otherwise we believe it is a complete path. Use it as it is.
8280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8281$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8283$as_echo_n "checking for FIND... " >&6; }
8284          if test ! -x "$tool_specified"; then
8285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8286$as_echo "not found" >&6; }
8287            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8288          fi
8289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8290$as_echo "$tool_specified" >&6; }
8291        fi
8292      fi
8293    fi
8294
8295  fi
8296
8297
8298
8299  if test "x$FIND" = x; then
8300    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8301  fi
8302
8303
8304
8305
8306
8307  # Publish this variable in the help.
8308
8309
8310  if [ -z "${HEAD+x}" ]; then
8311    # The variable is not set by user, try to locate tool using the code snippet
8312    for ac_prog in head
8313do
8314  # Extract the first word of "$ac_prog", so it can be a program name with args.
8315set dummy $ac_prog; ac_word=$2
8316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8317$as_echo_n "checking for $ac_word... " >&6; }
8318if ${ac_cv_path_HEAD+:} false; then :
8319  $as_echo_n "(cached) " >&6
8320else
8321  case $HEAD in
8322  [\\/]* | ?:[\\/]*)
8323  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8324  ;;
8325  *)
8326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8327for as_dir in $PATH
8328do
8329  IFS=$as_save_IFS
8330  test -z "$as_dir" && as_dir=.
8331    for ac_exec_ext in '' $ac_executable_extensions; do
8332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8333    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8335    break 2
8336  fi
8337done
8338  done
8339IFS=$as_save_IFS
8340
8341  ;;
8342esac
8343fi
8344HEAD=$ac_cv_path_HEAD
8345if test -n "$HEAD"; then
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8347$as_echo "$HEAD" >&6; }
8348else
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8350$as_echo "no" >&6; }
8351fi
8352
8353
8354  test -n "$HEAD" && break
8355done
8356
8357  else
8358    # The variable is set, but is it from the command line or the environment?
8359
8360    # Try to remove the string !HEAD! from our list.
8361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8363      # If it failed, the variable was not from the command line. Ignore it,
8364      # but warn the user (except for BASH, which is always set by the calling BASH).
8365      if test "xHEAD" != xBASH; then
8366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8367$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8368      fi
8369      # Try to locate tool using the code snippet
8370      for ac_prog in head
8371do
8372  # Extract the first word of "$ac_prog", so it can be a program name with args.
8373set dummy $ac_prog; ac_word=$2
8374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8375$as_echo_n "checking for $ac_word... " >&6; }
8376if ${ac_cv_path_HEAD+:} false; then :
8377  $as_echo_n "(cached) " >&6
8378else
8379  case $HEAD in
8380  [\\/]* | ?:[\\/]*)
8381  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8382  ;;
8383  *)
8384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385for as_dir in $PATH
8386do
8387  IFS=$as_save_IFS
8388  test -z "$as_dir" && as_dir=.
8389    for ac_exec_ext in '' $ac_executable_extensions; do
8390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8391    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8393    break 2
8394  fi
8395done
8396  done
8397IFS=$as_save_IFS
8398
8399  ;;
8400esac
8401fi
8402HEAD=$ac_cv_path_HEAD
8403if test -n "$HEAD"; then
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8405$as_echo "$HEAD" >&6; }
8406else
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408$as_echo "no" >&6; }
8409fi
8410
8411
8412  test -n "$HEAD" && break
8413done
8414
8415    else
8416      # If it succeeded, then it was overridden by the user. We will use it
8417      # for the tool.
8418
8419      # First remove it from the list of overridden variables, so we can test
8420      # for unknown variables in the end.
8421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8422
8423      # Check if we try to supply an empty value
8424      if test "x$HEAD" = x; then
8425        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8426$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8428$as_echo_n "checking for HEAD... " >&6; }
8429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8430$as_echo "disabled" >&6; }
8431      else
8432        # Check if the provided tool contains a complete path.
8433        tool_specified="$HEAD"
8434        tool_basename="${tool_specified##*/}"
8435        if test "x$tool_basename" = "x$tool_specified"; then
8436          # A command without a complete path is provided, search $PATH.
8437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8438$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8439          # Extract the first word of "$tool_basename", so it can be a program name with args.
8440set dummy $tool_basename; ac_word=$2
8441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8442$as_echo_n "checking for $ac_word... " >&6; }
8443if ${ac_cv_path_HEAD+:} false; then :
8444  $as_echo_n "(cached) " >&6
8445else
8446  case $HEAD in
8447  [\\/]* | ?:[\\/]*)
8448  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8449  ;;
8450  *)
8451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8452for as_dir in $PATH
8453do
8454  IFS=$as_save_IFS
8455  test -z "$as_dir" && as_dir=.
8456    for ac_exec_ext in '' $ac_executable_extensions; do
8457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8458    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8460    break 2
8461  fi
8462done
8463  done
8464IFS=$as_save_IFS
8465
8466  ;;
8467esac
8468fi
8469HEAD=$ac_cv_path_HEAD
8470if test -n "$HEAD"; then
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8472$as_echo "$HEAD" >&6; }
8473else
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8475$as_echo "no" >&6; }
8476fi
8477
8478
8479          if test "x$HEAD" = x; then
8480            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8481          fi
8482        else
8483          # Otherwise we believe it is a complete path. Use it as it is.
8484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8485$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8486          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8487$as_echo_n "checking for HEAD... " >&6; }
8488          if test ! -x "$tool_specified"; then
8489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8490$as_echo "not found" >&6; }
8491            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8492          fi
8493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8494$as_echo "$tool_specified" >&6; }
8495        fi
8496      fi
8497    fi
8498
8499  fi
8500
8501
8502
8503  if test "x$HEAD" = x; then
8504    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8505  fi
8506
8507
8508
8509
8510
8511  # Publish this variable in the help.
8512
8513
8514  if [ -z "${GUNZIP+x}" ]; then
8515    # The variable is not set by user, try to locate tool using the code snippet
8516    for ac_prog in gunzip
8517do
8518  # Extract the first word of "$ac_prog", so it can be a program name with args.
8519set dummy $ac_prog; ac_word=$2
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8521$as_echo_n "checking for $ac_word... " >&6; }
8522if ${ac_cv_path_GUNZIP+:} false; then :
8523  $as_echo_n "(cached) " >&6
8524else
8525  case $GUNZIP in
8526  [\\/]* | ?:[\\/]*)
8527  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8528  ;;
8529  *)
8530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8531for as_dir in $PATH
8532do
8533  IFS=$as_save_IFS
8534  test -z "$as_dir" && as_dir=.
8535    for ac_exec_ext in '' $ac_executable_extensions; do
8536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8537    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8539    break 2
8540  fi
8541done
8542  done
8543IFS=$as_save_IFS
8544
8545  ;;
8546esac
8547fi
8548GUNZIP=$ac_cv_path_GUNZIP
8549if test -n "$GUNZIP"; then
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8551$as_echo "$GUNZIP" >&6; }
8552else
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554$as_echo "no" >&6; }
8555fi
8556
8557
8558  test -n "$GUNZIP" && break
8559done
8560
8561  else
8562    # The variable is set, but is it from the command line or the environment?
8563
8564    # Try to remove the string !GUNZIP! from our list.
8565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8567      # If it failed, the variable was not from the command line. Ignore it,
8568      # but warn the user (except for BASH, which is always set by the calling BASH).
8569      if test "xGUNZIP" != xBASH; then
8570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8571$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8572      fi
8573      # Try to locate tool using the code snippet
8574      for ac_prog in gunzip
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_GUNZIP+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $GUNZIP in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606GUNZIP=$ac_cv_path_GUNZIP
8607if test -n "$GUNZIP"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8609$as_echo "$GUNZIP" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$GUNZIP" && break
8617done
8618
8619    else
8620      # If it succeeded, then it was overridden by the user. We will use it
8621      # for the tool.
8622
8623      # First remove it from the list of overridden variables, so we can test
8624      # for unknown variables in the end.
8625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8626
8627      # Check if we try to supply an empty value
8628      if test "x$GUNZIP" = x; then
8629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8630$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8632$as_echo_n "checking for GUNZIP... " >&6; }
8633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8634$as_echo "disabled" >&6; }
8635      else
8636        # Check if the provided tool contains a complete path.
8637        tool_specified="$GUNZIP"
8638        tool_basename="${tool_specified##*/}"
8639        if test "x$tool_basename" = "x$tool_specified"; then
8640          # A command without a complete path is provided, search $PATH.
8641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8642$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8643          # Extract the first word of "$tool_basename", so it can be a program name with args.
8644set dummy $tool_basename; ac_word=$2
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8646$as_echo_n "checking for $ac_word... " >&6; }
8647if ${ac_cv_path_GUNZIP+:} false; then :
8648  $as_echo_n "(cached) " >&6
8649else
8650  case $GUNZIP in
8651  [\\/]* | ?:[\\/]*)
8652  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8653  ;;
8654  *)
8655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656for as_dir in $PATH
8657do
8658  IFS=$as_save_IFS
8659  test -z "$as_dir" && as_dir=.
8660    for ac_exec_ext in '' $ac_executable_extensions; do
8661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8662    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664    break 2
8665  fi
8666done
8667  done
8668IFS=$as_save_IFS
8669
8670  ;;
8671esac
8672fi
8673GUNZIP=$ac_cv_path_GUNZIP
8674if test -n "$GUNZIP"; then
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8676$as_echo "$GUNZIP" >&6; }
8677else
8678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8679$as_echo "no" >&6; }
8680fi
8681
8682
8683          if test "x$GUNZIP" = x; then
8684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8685          fi
8686        else
8687          # Otherwise we believe it is a complete path. Use it as it is.
8688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8689$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8691$as_echo_n "checking for GUNZIP... " >&6; }
8692          if test ! -x "$tool_specified"; then
8693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8694$as_echo "not found" >&6; }
8695            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8696          fi
8697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8698$as_echo "$tool_specified" >&6; }
8699        fi
8700      fi
8701    fi
8702
8703  fi
8704
8705
8706
8707  if test "x$GUNZIP" = x; then
8708    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8709  fi
8710
8711
8712
8713
8714
8715  # Publish this variable in the help.
8716
8717
8718  if [ -z "${GZIP+x}" ]; then
8719    # The variable is not set by user, try to locate tool using the code snippet
8720    for ac_prog in pigz gzip
8721do
8722  # Extract the first word of "$ac_prog", so it can be a program name with args.
8723set dummy $ac_prog; ac_word=$2
8724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8725$as_echo_n "checking for $ac_word... " >&6; }
8726if ${ac_cv_path_GZIP+:} false; then :
8727  $as_echo_n "(cached) " >&6
8728else
8729  case $GZIP in
8730  [\\/]* | ?:[\\/]*)
8731  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8732  ;;
8733  *)
8734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8735for as_dir in $PATH
8736do
8737  IFS=$as_save_IFS
8738  test -z "$as_dir" && as_dir=.
8739    for ac_exec_ext in '' $ac_executable_extensions; do
8740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8741    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8743    break 2
8744  fi
8745done
8746  done
8747IFS=$as_save_IFS
8748
8749  ;;
8750esac
8751fi
8752GZIP=$ac_cv_path_GZIP
8753if test -n "$GZIP"; then
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8755$as_echo "$GZIP" >&6; }
8756else
8757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8758$as_echo "no" >&6; }
8759fi
8760
8761
8762  test -n "$GZIP" && break
8763done
8764
8765  else
8766    # The variable is set, but is it from the command line or the environment?
8767
8768    # Try to remove the string !GZIP! from our list.
8769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8771      # If it failed, the variable was not from the command line. Ignore it,
8772      # but warn the user (except for BASH, which is always set by the calling BASH).
8773      if test "xGZIP" != xBASH; then
8774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8775$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8776      fi
8777      # Try to locate tool using the code snippet
8778      for ac_prog in pigz gzip
8779do
8780  # Extract the first word of "$ac_prog", so it can be a program name with args.
8781set dummy $ac_prog; ac_word=$2
8782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783$as_echo_n "checking for $ac_word... " >&6; }
8784if ${ac_cv_path_GZIP+:} false; then :
8785  $as_echo_n "(cached) " >&6
8786else
8787  case $GZIP in
8788  [\\/]* | ?:[\\/]*)
8789  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8790  ;;
8791  *)
8792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8793for as_dir in $PATH
8794do
8795  IFS=$as_save_IFS
8796  test -z "$as_dir" && as_dir=.
8797    for ac_exec_ext in '' $ac_executable_extensions; do
8798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8799    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8801    break 2
8802  fi
8803done
8804  done
8805IFS=$as_save_IFS
8806
8807  ;;
8808esac
8809fi
8810GZIP=$ac_cv_path_GZIP
8811if test -n "$GZIP"; then
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8813$as_echo "$GZIP" >&6; }
8814else
8815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
8817fi
8818
8819
8820  test -n "$GZIP" && break
8821done
8822
8823    else
8824      # If it succeeded, then it was overridden by the user. We will use it
8825      # for the tool.
8826
8827      # First remove it from the list of overridden variables, so we can test
8828      # for unknown variables in the end.
8829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8830
8831      # Check if we try to supply an empty value
8832      if test "x$GZIP" = x; then
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8834$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8836$as_echo_n "checking for GZIP... " >&6; }
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8838$as_echo "disabled" >&6; }
8839      else
8840        # Check if the provided tool contains a complete path.
8841        tool_specified="$GZIP"
8842        tool_basename="${tool_specified##*/}"
8843        if test "x$tool_basename" = "x$tool_specified"; then
8844          # A command without a complete path is provided, search $PATH.
8845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8846$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8847          # Extract the first word of "$tool_basename", so it can be a program name with args.
8848set dummy $tool_basename; ac_word=$2
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8850$as_echo_n "checking for $ac_word... " >&6; }
8851if ${ac_cv_path_GZIP+:} false; then :
8852  $as_echo_n "(cached) " >&6
8853else
8854  case $GZIP in
8855  [\\/]* | ?:[\\/]*)
8856  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8857  ;;
8858  *)
8859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8860for as_dir in $PATH
8861do
8862  IFS=$as_save_IFS
8863  test -z "$as_dir" && as_dir=.
8864    for ac_exec_ext in '' $ac_executable_extensions; do
8865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8866    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8868    break 2
8869  fi
8870done
8871  done
8872IFS=$as_save_IFS
8873
8874  ;;
8875esac
8876fi
8877GZIP=$ac_cv_path_GZIP
8878if test -n "$GZIP"; then
8879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8880$as_echo "$GZIP" >&6; }
8881else
8882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883$as_echo "no" >&6; }
8884fi
8885
8886
8887          if test "x$GZIP" = x; then
8888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8889          fi
8890        else
8891          # Otherwise we believe it is a complete path. Use it as it is.
8892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8893$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8895$as_echo_n "checking for GZIP... " >&6; }
8896          if test ! -x "$tool_specified"; then
8897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8898$as_echo "not found" >&6; }
8899            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8900          fi
8901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8902$as_echo "$tool_specified" >&6; }
8903        fi
8904      fi
8905    fi
8906
8907  fi
8908
8909
8910
8911  if test "x$GZIP" = x; then
8912    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8913  fi
8914
8915
8916
8917
8918
8919  # Publish this variable in the help.
8920
8921
8922  if [ -z "${LN+x}" ]; then
8923    # The variable is not set by user, try to locate tool using the code snippet
8924    for ac_prog in ln
8925do
8926  # Extract the first word of "$ac_prog", so it can be a program name with args.
8927set dummy $ac_prog; ac_word=$2
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8929$as_echo_n "checking for $ac_word... " >&6; }
8930if ${ac_cv_path_LN+:} false; then :
8931  $as_echo_n "(cached) " >&6
8932else
8933  case $LN in
8934  [\\/]* | ?:[\\/]*)
8935  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8936  ;;
8937  *)
8938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8939for as_dir in $PATH
8940do
8941  IFS=$as_save_IFS
8942  test -z "$as_dir" && as_dir=.
8943    for ac_exec_ext in '' $ac_executable_extensions; do
8944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8945    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8947    break 2
8948  fi
8949done
8950  done
8951IFS=$as_save_IFS
8952
8953  ;;
8954esac
8955fi
8956LN=$ac_cv_path_LN
8957if test -n "$LN"; then
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8959$as_echo "$LN" >&6; }
8960else
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
8963fi
8964
8965
8966  test -n "$LN" && break
8967done
8968
8969  else
8970    # The variable is set, but is it from the command line or the environment?
8971
8972    # Try to remove the string !LN! from our list.
8973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8975      # If it failed, the variable was not from the command line. Ignore it,
8976      # but warn the user (except for BASH, which is always set by the calling BASH).
8977      if test "xLN" != xBASH; then
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8979$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8980      fi
8981      # Try to locate tool using the code snippet
8982      for ac_prog in ln
8983do
8984  # Extract the first word of "$ac_prog", so it can be a program name with args.
8985set dummy $ac_prog; ac_word=$2
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987$as_echo_n "checking for $ac_word... " >&6; }
8988if ${ac_cv_path_LN+:} false; then :
8989  $as_echo_n "(cached) " >&6
8990else
8991  case $LN in
8992  [\\/]* | ?:[\\/]*)
8993  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8994  ;;
8995  *)
8996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997for as_dir in $PATH
8998do
8999  IFS=$as_save_IFS
9000  test -z "$as_dir" && as_dir=.
9001    for ac_exec_ext in '' $ac_executable_extensions; do
9002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005    break 2
9006  fi
9007done
9008  done
9009IFS=$as_save_IFS
9010
9011  ;;
9012esac
9013fi
9014LN=$ac_cv_path_LN
9015if test -n "$LN"; then
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9017$as_echo "$LN" >&6; }
9018else
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020$as_echo "no" >&6; }
9021fi
9022
9023
9024  test -n "$LN" && break
9025done
9026
9027    else
9028      # If it succeeded, then it was overridden by the user. We will use it
9029      # for the tool.
9030
9031      # First remove it from the list of overridden variables, so we can test
9032      # for unknown variables in the end.
9033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9034
9035      # Check if we try to supply an empty value
9036      if test "x$LN" = x; then
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9038$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9040$as_echo_n "checking for LN... " >&6; }
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9042$as_echo "disabled" >&6; }
9043      else
9044        # Check if the provided tool contains a complete path.
9045        tool_specified="$LN"
9046        tool_basename="${tool_specified##*/}"
9047        if test "x$tool_basename" = "x$tool_specified"; then
9048          # A command without a complete path is provided, search $PATH.
9049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9050$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9051          # Extract the first word of "$tool_basename", so it can be a program name with args.
9052set dummy $tool_basename; ac_word=$2
9053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9054$as_echo_n "checking for $ac_word... " >&6; }
9055if ${ac_cv_path_LN+:} false; then :
9056  $as_echo_n "(cached) " >&6
9057else
9058  case $LN in
9059  [\\/]* | ?:[\\/]*)
9060  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9061  ;;
9062  *)
9063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9064for as_dir in $PATH
9065do
9066  IFS=$as_save_IFS
9067  test -z "$as_dir" && as_dir=.
9068    for ac_exec_ext in '' $ac_executable_extensions; do
9069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9070    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9072    break 2
9073  fi
9074done
9075  done
9076IFS=$as_save_IFS
9077
9078  ;;
9079esac
9080fi
9081LN=$ac_cv_path_LN
9082if test -n "$LN"; then
9083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9084$as_echo "$LN" >&6; }
9085else
9086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9087$as_echo "no" >&6; }
9088fi
9089
9090
9091          if test "x$LN" = x; then
9092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9093          fi
9094        else
9095          # Otherwise we believe it is a complete path. Use it as it is.
9096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9097$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9099$as_echo_n "checking for LN... " >&6; }
9100          if test ! -x "$tool_specified"; then
9101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9102$as_echo "not found" >&6; }
9103            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9104          fi
9105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9106$as_echo "$tool_specified" >&6; }
9107        fi
9108      fi
9109    fi
9110
9111  fi
9112
9113
9114
9115  if test "x$LN" = x; then
9116    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9117  fi
9118
9119
9120
9121
9122
9123  # Publish this variable in the help.
9124
9125
9126  if [ -z "${LS+x}" ]; then
9127    # The variable is not set by user, try to locate tool using the code snippet
9128    for ac_prog in ls
9129do
9130  # Extract the first word of "$ac_prog", so it can be a program name with args.
9131set dummy $ac_prog; ac_word=$2
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9133$as_echo_n "checking for $ac_word... " >&6; }
9134if ${ac_cv_path_LS+:} false; then :
9135  $as_echo_n "(cached) " >&6
9136else
9137  case $LS in
9138  [\\/]* | ?:[\\/]*)
9139  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9140  ;;
9141  *)
9142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143for as_dir in $PATH
9144do
9145  IFS=$as_save_IFS
9146  test -z "$as_dir" && as_dir=.
9147    for ac_exec_ext in '' $ac_executable_extensions; do
9148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9149    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9151    break 2
9152  fi
9153done
9154  done
9155IFS=$as_save_IFS
9156
9157  ;;
9158esac
9159fi
9160LS=$ac_cv_path_LS
9161if test -n "$LS"; then
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9163$as_echo "$LS" >&6; }
9164else
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166$as_echo "no" >&6; }
9167fi
9168
9169
9170  test -n "$LS" && break
9171done
9172
9173  else
9174    # The variable is set, but is it from the command line or the environment?
9175
9176    # Try to remove the string !LS! from our list.
9177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9179      # If it failed, the variable was not from the command line. Ignore it,
9180      # but warn the user (except for BASH, which is always set by the calling BASH).
9181      if test "xLS" != xBASH; then
9182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9183$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9184      fi
9185      # Try to locate tool using the code snippet
9186      for ac_prog in ls
9187do
9188  # Extract the first word of "$ac_prog", so it can be a program name with args.
9189set dummy $ac_prog; ac_word=$2
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9191$as_echo_n "checking for $ac_word... " >&6; }
9192if ${ac_cv_path_LS+:} false; then :
9193  $as_echo_n "(cached) " >&6
9194else
9195  case $LS in
9196  [\\/]* | ?:[\\/]*)
9197  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9198  ;;
9199  *)
9200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9201for as_dir in $PATH
9202do
9203  IFS=$as_save_IFS
9204  test -z "$as_dir" && as_dir=.
9205    for ac_exec_ext in '' $ac_executable_extensions; do
9206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9207    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9209    break 2
9210  fi
9211done
9212  done
9213IFS=$as_save_IFS
9214
9215  ;;
9216esac
9217fi
9218LS=$ac_cv_path_LS
9219if test -n "$LS"; then
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9221$as_echo "$LS" >&6; }
9222else
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9224$as_echo "no" >&6; }
9225fi
9226
9227
9228  test -n "$LS" && break
9229done
9230
9231    else
9232      # If it succeeded, then it was overridden by the user. We will use it
9233      # for the tool.
9234
9235      # First remove it from the list of overridden variables, so we can test
9236      # for unknown variables in the end.
9237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9238
9239      # Check if we try to supply an empty value
9240      if test "x$LS" = x; then
9241        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9242$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9244$as_echo_n "checking for LS... " >&6; }
9245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9246$as_echo "disabled" >&6; }
9247      else
9248        # Check if the provided tool contains a complete path.
9249        tool_specified="$LS"
9250        tool_basename="${tool_specified##*/}"
9251        if test "x$tool_basename" = "x$tool_specified"; then
9252          # A command without a complete path is provided, search $PATH.
9253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9254$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9255          # Extract the first word of "$tool_basename", so it can be a program name with args.
9256set dummy $tool_basename; ac_word=$2
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9258$as_echo_n "checking for $ac_word... " >&6; }
9259if ${ac_cv_path_LS+:} false; then :
9260  $as_echo_n "(cached) " >&6
9261else
9262  case $LS in
9263  [\\/]* | ?:[\\/]*)
9264  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9265  ;;
9266  *)
9267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9268for as_dir in $PATH
9269do
9270  IFS=$as_save_IFS
9271  test -z "$as_dir" && as_dir=.
9272    for ac_exec_ext in '' $ac_executable_extensions; do
9273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9274    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9276    break 2
9277  fi
9278done
9279  done
9280IFS=$as_save_IFS
9281
9282  ;;
9283esac
9284fi
9285LS=$ac_cv_path_LS
9286if test -n "$LS"; then
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9288$as_echo "$LS" >&6; }
9289else
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
9292fi
9293
9294
9295          if test "x$LS" = x; then
9296            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9297          fi
9298        else
9299          # Otherwise we believe it is a complete path. Use it as it is.
9300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9301$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9302          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9303$as_echo_n "checking for LS... " >&6; }
9304          if test ! -x "$tool_specified"; then
9305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9306$as_echo "not found" >&6; }
9307            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9308          fi
9309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9310$as_echo "$tool_specified" >&6; }
9311        fi
9312      fi
9313    fi
9314
9315  fi
9316
9317
9318
9319  if test "x$LS" = x; then
9320    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9321  fi
9322
9323
9324
9325
9326
9327  # Publish this variable in the help.
9328
9329
9330  if [ -z "${MKDIR+x}" ]; then
9331    # The variable is not set by user, try to locate tool using the code snippet
9332    for ac_prog in mkdir
9333do
9334  # Extract the first word of "$ac_prog", so it can be a program name with args.
9335set dummy $ac_prog; ac_word=$2
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9337$as_echo_n "checking for $ac_word... " >&6; }
9338if ${ac_cv_path_MKDIR+:} false; then :
9339  $as_echo_n "(cached) " >&6
9340else
9341  case $MKDIR in
9342  [\\/]* | ?:[\\/]*)
9343  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9344  ;;
9345  *)
9346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9347for as_dir in $PATH
9348do
9349  IFS=$as_save_IFS
9350  test -z "$as_dir" && as_dir=.
9351    for ac_exec_ext in '' $ac_executable_extensions; do
9352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9353    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9355    break 2
9356  fi
9357done
9358  done
9359IFS=$as_save_IFS
9360
9361  ;;
9362esac
9363fi
9364MKDIR=$ac_cv_path_MKDIR
9365if test -n "$MKDIR"; then
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9367$as_echo "$MKDIR" >&6; }
9368else
9369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
9371fi
9372
9373
9374  test -n "$MKDIR" && break
9375done
9376
9377  else
9378    # The variable is set, but is it from the command line or the environment?
9379
9380    # Try to remove the string !MKDIR! from our list.
9381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9383      # If it failed, the variable was not from the command line. Ignore it,
9384      # but warn the user (except for BASH, which is always set by the calling BASH).
9385      if test "xMKDIR" != xBASH; then
9386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9387$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9388      fi
9389      # Try to locate tool using the code snippet
9390      for ac_prog in mkdir
9391do
9392  # Extract the first word of "$ac_prog", so it can be a program name with args.
9393set dummy $ac_prog; ac_word=$2
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395$as_echo_n "checking for $ac_word... " >&6; }
9396if ${ac_cv_path_MKDIR+:} false; then :
9397  $as_echo_n "(cached) " >&6
9398else
9399  case $MKDIR in
9400  [\\/]* | ?:[\\/]*)
9401  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9402  ;;
9403  *)
9404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9405for as_dir in $PATH
9406do
9407  IFS=$as_save_IFS
9408  test -z "$as_dir" && as_dir=.
9409    for ac_exec_ext in '' $ac_executable_extensions; do
9410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9411    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9413    break 2
9414  fi
9415done
9416  done
9417IFS=$as_save_IFS
9418
9419  ;;
9420esac
9421fi
9422MKDIR=$ac_cv_path_MKDIR
9423if test -n "$MKDIR"; then
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9425$as_echo "$MKDIR" >&6; }
9426else
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
9429fi
9430
9431
9432  test -n "$MKDIR" && break
9433done
9434
9435    else
9436      # If it succeeded, then it was overridden by the user. We will use it
9437      # for the tool.
9438
9439      # First remove it from the list of overridden variables, so we can test
9440      # for unknown variables in the end.
9441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9442
9443      # Check if we try to supply an empty value
9444      if test "x$MKDIR" = x; then
9445        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9446$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9448$as_echo_n "checking for MKDIR... " >&6; }
9449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9450$as_echo "disabled" >&6; }
9451      else
9452        # Check if the provided tool contains a complete path.
9453        tool_specified="$MKDIR"
9454        tool_basename="${tool_specified##*/}"
9455        if test "x$tool_basename" = "x$tool_specified"; then
9456          # A command without a complete path is provided, search $PATH.
9457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9458$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9459          # Extract the first word of "$tool_basename", so it can be a program name with args.
9460set dummy $tool_basename; ac_word=$2
9461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9462$as_echo_n "checking for $ac_word... " >&6; }
9463if ${ac_cv_path_MKDIR+:} false; then :
9464  $as_echo_n "(cached) " >&6
9465else
9466  case $MKDIR in
9467  [\\/]* | ?:[\\/]*)
9468  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9469  ;;
9470  *)
9471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9472for as_dir in $PATH
9473do
9474  IFS=$as_save_IFS
9475  test -z "$as_dir" && as_dir=.
9476    for ac_exec_ext in '' $ac_executable_extensions; do
9477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9478    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9480    break 2
9481  fi
9482done
9483  done
9484IFS=$as_save_IFS
9485
9486  ;;
9487esac
9488fi
9489MKDIR=$ac_cv_path_MKDIR
9490if test -n "$MKDIR"; then
9491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9492$as_echo "$MKDIR" >&6; }
9493else
9494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
9496fi
9497
9498
9499          if test "x$MKDIR" = x; then
9500            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9501          fi
9502        else
9503          # Otherwise we believe it is a complete path. Use it as it is.
9504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9505$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9507$as_echo_n "checking for MKDIR... " >&6; }
9508          if test ! -x "$tool_specified"; then
9509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9510$as_echo "not found" >&6; }
9511            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9512          fi
9513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9514$as_echo "$tool_specified" >&6; }
9515        fi
9516      fi
9517    fi
9518
9519  fi
9520
9521
9522
9523  if test "x$MKDIR" = x; then
9524    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9525  fi
9526
9527
9528
9529
9530
9531  # Publish this variable in the help.
9532
9533
9534  if [ -z "${MKTEMP+x}" ]; then
9535    # The variable is not set by user, try to locate tool using the code snippet
9536    for ac_prog in mktemp
9537do
9538  # Extract the first word of "$ac_prog", so it can be a program name with args.
9539set dummy $ac_prog; ac_word=$2
9540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9541$as_echo_n "checking for $ac_word... " >&6; }
9542if ${ac_cv_path_MKTEMP+:} false; then :
9543  $as_echo_n "(cached) " >&6
9544else
9545  case $MKTEMP in
9546  [\\/]* | ?:[\\/]*)
9547  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9548  ;;
9549  *)
9550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9551for as_dir in $PATH
9552do
9553  IFS=$as_save_IFS
9554  test -z "$as_dir" && as_dir=.
9555    for ac_exec_ext in '' $ac_executable_extensions; do
9556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9557    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9559    break 2
9560  fi
9561done
9562  done
9563IFS=$as_save_IFS
9564
9565  ;;
9566esac
9567fi
9568MKTEMP=$ac_cv_path_MKTEMP
9569if test -n "$MKTEMP"; then
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9571$as_echo "$MKTEMP" >&6; }
9572else
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9574$as_echo "no" >&6; }
9575fi
9576
9577
9578  test -n "$MKTEMP" && break
9579done
9580
9581  else
9582    # The variable is set, but is it from the command line or the environment?
9583
9584    # Try to remove the string !MKTEMP! from our list.
9585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9587      # If it failed, the variable was not from the command line. Ignore it,
9588      # but warn the user (except for BASH, which is always set by the calling BASH).
9589      if test "xMKTEMP" != xBASH; then
9590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9591$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9592      fi
9593      # Try to locate tool using the code snippet
9594      for ac_prog in mktemp
9595do
9596  # Extract the first word of "$ac_prog", so it can be a program name with args.
9597set dummy $ac_prog; ac_word=$2
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9599$as_echo_n "checking for $ac_word... " >&6; }
9600if ${ac_cv_path_MKTEMP+:} false; then :
9601  $as_echo_n "(cached) " >&6
9602else
9603  case $MKTEMP in
9604  [\\/]* | ?:[\\/]*)
9605  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9606  ;;
9607  *)
9608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9609for as_dir in $PATH
9610do
9611  IFS=$as_save_IFS
9612  test -z "$as_dir" && as_dir=.
9613    for ac_exec_ext in '' $ac_executable_extensions; do
9614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9615    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9617    break 2
9618  fi
9619done
9620  done
9621IFS=$as_save_IFS
9622
9623  ;;
9624esac
9625fi
9626MKTEMP=$ac_cv_path_MKTEMP
9627if test -n "$MKTEMP"; then
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9629$as_echo "$MKTEMP" >&6; }
9630else
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632$as_echo "no" >&6; }
9633fi
9634
9635
9636  test -n "$MKTEMP" && break
9637done
9638
9639    else
9640      # If it succeeded, then it was overridden by the user. We will use it
9641      # for the tool.
9642
9643      # First remove it from the list of overridden variables, so we can test
9644      # for unknown variables in the end.
9645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9646
9647      # Check if we try to supply an empty value
9648      if test "x$MKTEMP" = x; then
9649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9650$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9652$as_echo_n "checking for MKTEMP... " >&6; }
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9654$as_echo "disabled" >&6; }
9655      else
9656        # Check if the provided tool contains a complete path.
9657        tool_specified="$MKTEMP"
9658        tool_basename="${tool_specified##*/}"
9659        if test "x$tool_basename" = "x$tool_specified"; then
9660          # A command without a complete path is provided, search $PATH.
9661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9662$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9663          # Extract the first word of "$tool_basename", so it can be a program name with args.
9664set dummy $tool_basename; ac_word=$2
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9666$as_echo_n "checking for $ac_word... " >&6; }
9667if ${ac_cv_path_MKTEMP+:} false; then :
9668  $as_echo_n "(cached) " >&6
9669else
9670  case $MKTEMP in
9671  [\\/]* | ?:[\\/]*)
9672  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9673  ;;
9674  *)
9675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9676for as_dir in $PATH
9677do
9678  IFS=$as_save_IFS
9679  test -z "$as_dir" && as_dir=.
9680    for ac_exec_ext in '' $ac_executable_extensions; do
9681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9682    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9684    break 2
9685  fi
9686done
9687  done
9688IFS=$as_save_IFS
9689
9690  ;;
9691esac
9692fi
9693MKTEMP=$ac_cv_path_MKTEMP
9694if test -n "$MKTEMP"; then
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9696$as_echo "$MKTEMP" >&6; }
9697else
9698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699$as_echo "no" >&6; }
9700fi
9701
9702
9703          if test "x$MKTEMP" = x; then
9704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9705          fi
9706        else
9707          # Otherwise we believe it is a complete path. Use it as it is.
9708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9709$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9711$as_echo_n "checking for MKTEMP... " >&6; }
9712          if test ! -x "$tool_specified"; then
9713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9714$as_echo "not found" >&6; }
9715            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9716          fi
9717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9718$as_echo "$tool_specified" >&6; }
9719        fi
9720      fi
9721    fi
9722
9723  fi
9724
9725
9726
9727  if test "x$MKTEMP" = x; then
9728    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9729  fi
9730
9731
9732
9733
9734
9735  # Publish this variable in the help.
9736
9737
9738  if [ -z "${MV+x}" ]; then
9739    # The variable is not set by user, try to locate tool using the code snippet
9740    for ac_prog in mv
9741do
9742  # Extract the first word of "$ac_prog", so it can be a program name with args.
9743set dummy $ac_prog; ac_word=$2
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9745$as_echo_n "checking for $ac_word... " >&6; }
9746if ${ac_cv_path_MV+:} false; then :
9747  $as_echo_n "(cached) " >&6
9748else
9749  case $MV in
9750  [\\/]* | ?:[\\/]*)
9751  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9752  ;;
9753  *)
9754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9755for as_dir in $PATH
9756do
9757  IFS=$as_save_IFS
9758  test -z "$as_dir" && as_dir=.
9759    for ac_exec_ext in '' $ac_executable_extensions; do
9760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9761    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9763    break 2
9764  fi
9765done
9766  done
9767IFS=$as_save_IFS
9768
9769  ;;
9770esac
9771fi
9772MV=$ac_cv_path_MV
9773if test -n "$MV"; then
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9775$as_echo "$MV" >&6; }
9776else
9777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779fi
9780
9781
9782  test -n "$MV" && break
9783done
9784
9785  else
9786    # The variable is set, but is it from the command line or the environment?
9787
9788    # Try to remove the string !MV! from our list.
9789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9791      # If it failed, the variable was not from the command line. Ignore it,
9792      # but warn the user (except for BASH, which is always set by the calling BASH).
9793      if test "xMV" != xBASH; then
9794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9795$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9796      fi
9797      # Try to locate tool using the code snippet
9798      for ac_prog in mv
9799do
9800  # Extract the first word of "$ac_prog", so it can be a program name with args.
9801set dummy $ac_prog; ac_word=$2
9802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9803$as_echo_n "checking for $ac_word... " >&6; }
9804if ${ac_cv_path_MV+:} false; then :
9805  $as_echo_n "(cached) " >&6
9806else
9807  case $MV in
9808  [\\/]* | ?:[\\/]*)
9809  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9810  ;;
9811  *)
9812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9813for as_dir in $PATH
9814do
9815  IFS=$as_save_IFS
9816  test -z "$as_dir" && as_dir=.
9817    for ac_exec_ext in '' $ac_executable_extensions; do
9818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9819    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9821    break 2
9822  fi
9823done
9824  done
9825IFS=$as_save_IFS
9826
9827  ;;
9828esac
9829fi
9830MV=$ac_cv_path_MV
9831if test -n "$MV"; then
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9833$as_echo "$MV" >&6; }
9834else
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836$as_echo "no" >&6; }
9837fi
9838
9839
9840  test -n "$MV" && break
9841done
9842
9843    else
9844      # If it succeeded, then it was overridden by the user. We will use it
9845      # for the tool.
9846
9847      # First remove it from the list of overridden variables, so we can test
9848      # for unknown variables in the end.
9849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9850
9851      # Check if we try to supply an empty value
9852      if test "x$MV" = x; then
9853        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9854$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9856$as_echo_n "checking for MV... " >&6; }
9857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9858$as_echo "disabled" >&6; }
9859      else
9860        # Check if the provided tool contains a complete path.
9861        tool_specified="$MV"
9862        tool_basename="${tool_specified##*/}"
9863        if test "x$tool_basename" = "x$tool_specified"; then
9864          # A command without a complete path is provided, search $PATH.
9865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9866$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9867          # Extract the first word of "$tool_basename", so it can be a program name with args.
9868set dummy $tool_basename; ac_word=$2
9869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9870$as_echo_n "checking for $ac_word... " >&6; }
9871if ${ac_cv_path_MV+:} false; then :
9872  $as_echo_n "(cached) " >&6
9873else
9874  case $MV in
9875  [\\/]* | ?:[\\/]*)
9876  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9877  ;;
9878  *)
9879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9880for as_dir in $PATH
9881do
9882  IFS=$as_save_IFS
9883  test -z "$as_dir" && as_dir=.
9884    for ac_exec_ext in '' $ac_executable_extensions; do
9885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9886    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9888    break 2
9889  fi
9890done
9891  done
9892IFS=$as_save_IFS
9893
9894  ;;
9895esac
9896fi
9897MV=$ac_cv_path_MV
9898if test -n "$MV"; then
9899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9900$as_echo "$MV" >&6; }
9901else
9902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9903$as_echo "no" >&6; }
9904fi
9905
9906
9907          if test "x$MV" = x; then
9908            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9909          fi
9910        else
9911          # Otherwise we believe it is a complete path. Use it as it is.
9912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9913$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9914          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9915$as_echo_n "checking for MV... " >&6; }
9916          if test ! -x "$tool_specified"; then
9917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9918$as_echo "not found" >&6; }
9919            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9920          fi
9921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9922$as_echo "$tool_specified" >&6; }
9923        fi
9924      fi
9925    fi
9926
9927  fi
9928
9929
9930
9931  if test "x$MV" = x; then
9932    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9933  fi
9934
9935
9936
9937
9938
9939  # Publish this variable in the help.
9940
9941
9942  if [ -z "${NAWK+x}" ]; then
9943    # The variable is not set by user, try to locate tool using the code snippet
9944    for ac_prog in nawk gawk awk
9945do
9946  # Extract the first word of "$ac_prog", so it can be a program name with args.
9947set dummy $ac_prog; ac_word=$2
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949$as_echo_n "checking for $ac_word... " >&6; }
9950if ${ac_cv_path_NAWK+:} false; then :
9951  $as_echo_n "(cached) " >&6
9952else
9953  case $NAWK in
9954  [\\/]* | ?:[\\/]*)
9955  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9956  ;;
9957  *)
9958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961  IFS=$as_save_IFS
9962  test -z "$as_dir" && as_dir=.
9963    for ac_exec_ext in '' $ac_executable_extensions; do
9964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967    break 2
9968  fi
9969done
9970  done
9971IFS=$as_save_IFS
9972
9973  ;;
9974esac
9975fi
9976NAWK=$ac_cv_path_NAWK
9977if test -n "$NAWK"; then
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9979$as_echo "$NAWK" >&6; }
9980else
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983fi
9984
9985
9986  test -n "$NAWK" && break
9987done
9988
9989  else
9990    # The variable is set, but is it from the command line or the environment?
9991
9992    # Try to remove the string !NAWK! from our list.
9993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9995      # If it failed, the variable was not from the command line. Ignore it,
9996      # but warn the user (except for BASH, which is always set by the calling BASH).
9997      if test "xNAWK" != xBASH; then
9998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9999$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
10000      fi
10001      # Try to locate tool using the code snippet
10002      for ac_prog in nawk gawk awk
10003do
10004  # Extract the first word of "$ac_prog", so it can be a program name with args.
10005set dummy $ac_prog; ac_word=$2
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10007$as_echo_n "checking for $ac_word... " >&6; }
10008if ${ac_cv_path_NAWK+:} false; then :
10009  $as_echo_n "(cached) " >&6
10010else
10011  case $NAWK in
10012  [\\/]* | ?:[\\/]*)
10013  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10014  ;;
10015  *)
10016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10017for as_dir in $PATH
10018do
10019  IFS=$as_save_IFS
10020  test -z "$as_dir" && as_dir=.
10021    for ac_exec_ext in '' $ac_executable_extensions; do
10022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10023    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10025    break 2
10026  fi
10027done
10028  done
10029IFS=$as_save_IFS
10030
10031  ;;
10032esac
10033fi
10034NAWK=$ac_cv_path_NAWK
10035if test -n "$NAWK"; then
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10037$as_echo "$NAWK" >&6; }
10038else
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
10041fi
10042
10043
10044  test -n "$NAWK" && break
10045done
10046
10047    else
10048      # If it succeeded, then it was overridden by the user. We will use it
10049      # for the tool.
10050
10051      # First remove it from the list of overridden variables, so we can test
10052      # for unknown variables in the end.
10053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10054
10055      # Check if we try to supply an empty value
10056      if test "x$NAWK" = x; then
10057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10058$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10060$as_echo_n "checking for NAWK... " >&6; }
10061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10062$as_echo "disabled" >&6; }
10063      else
10064        # Check if the provided tool contains a complete path.
10065        tool_specified="$NAWK"
10066        tool_basename="${tool_specified##*/}"
10067        if test "x$tool_basename" = "x$tool_specified"; then
10068          # A command without a complete path is provided, search $PATH.
10069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10070$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10071          # Extract the first word of "$tool_basename", so it can be a program name with args.
10072set dummy $tool_basename; ac_word=$2
10073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10074$as_echo_n "checking for $ac_word... " >&6; }
10075if ${ac_cv_path_NAWK+:} false; then :
10076  $as_echo_n "(cached) " >&6
10077else
10078  case $NAWK in
10079  [\\/]* | ?:[\\/]*)
10080  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10081  ;;
10082  *)
10083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10084for as_dir in $PATH
10085do
10086  IFS=$as_save_IFS
10087  test -z "$as_dir" && as_dir=.
10088    for ac_exec_ext in '' $ac_executable_extensions; do
10089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10090    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10092    break 2
10093  fi
10094done
10095  done
10096IFS=$as_save_IFS
10097
10098  ;;
10099esac
10100fi
10101NAWK=$ac_cv_path_NAWK
10102if test -n "$NAWK"; then
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10104$as_echo "$NAWK" >&6; }
10105else
10106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
10108fi
10109
10110
10111          if test "x$NAWK" = x; then
10112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10113          fi
10114        else
10115          # Otherwise we believe it is a complete path. Use it as it is.
10116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10117$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10119$as_echo_n "checking for NAWK... " >&6; }
10120          if test ! -x "$tool_specified"; then
10121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10122$as_echo "not found" >&6; }
10123            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10124          fi
10125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10126$as_echo "$tool_specified" >&6; }
10127        fi
10128      fi
10129    fi
10130
10131  fi
10132
10133
10134
10135  if test "x$NAWK" = x; then
10136    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10137  fi
10138
10139
10140
10141
10142
10143  # Publish this variable in the help.
10144
10145
10146  if [ -z "${PRINTF+x}" ]; then
10147    # The variable is not set by user, try to locate tool using the code snippet
10148    for ac_prog in printf
10149do
10150  # Extract the first word of "$ac_prog", so it can be a program name with args.
10151set dummy $ac_prog; ac_word=$2
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if ${ac_cv_path_PRINTF+:} false; then :
10155  $as_echo_n "(cached) " >&6
10156else
10157  case $PRINTF in
10158  [\\/]* | ?:[\\/]*)
10159  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10160  ;;
10161  *)
10162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  test -z "$as_dir" && as_dir=.
10167    for ac_exec_ext in '' $ac_executable_extensions; do
10168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10169    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10171    break 2
10172  fi
10173done
10174  done
10175IFS=$as_save_IFS
10176
10177  ;;
10178esac
10179fi
10180PRINTF=$ac_cv_path_PRINTF
10181if test -n "$PRINTF"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10183$as_echo "$PRINTF" >&6; }
10184else
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190  test -n "$PRINTF" && break
10191done
10192
10193  else
10194    # The variable is set, but is it from the command line or the environment?
10195
10196    # Try to remove the string !PRINTF! from our list.
10197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10199      # If it failed, the variable was not from the command line. Ignore it,
10200      # but warn the user (except for BASH, which is always set by the calling BASH).
10201      if test "xPRINTF" != xBASH; then
10202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10203$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10204      fi
10205      # Try to locate tool using the code snippet
10206      for ac_prog in printf
10207do
10208  # Extract the first word of "$ac_prog", so it can be a program name with args.
10209set dummy $ac_prog; ac_word=$2
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211$as_echo_n "checking for $ac_word... " >&6; }
10212if ${ac_cv_path_PRINTF+:} false; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  case $PRINTF in
10216  [\\/]* | ?:[\\/]*)
10217  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10218  ;;
10219  *)
10220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221for as_dir in $PATH
10222do
10223  IFS=$as_save_IFS
10224  test -z "$as_dir" && as_dir=.
10225    for ac_exec_ext in '' $ac_executable_extensions; do
10226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10227    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229    break 2
10230  fi
10231done
10232  done
10233IFS=$as_save_IFS
10234
10235  ;;
10236esac
10237fi
10238PRINTF=$ac_cv_path_PRINTF
10239if test -n "$PRINTF"; then
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10241$as_echo "$PRINTF" >&6; }
10242else
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245fi
10246
10247
10248  test -n "$PRINTF" && break
10249done
10250
10251    else
10252      # If it succeeded, then it was overridden by the user. We will use it
10253      # for the tool.
10254
10255      # First remove it from the list of overridden variables, so we can test
10256      # for unknown variables in the end.
10257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10258
10259      # Check if we try to supply an empty value
10260      if test "x$PRINTF" = x; then
10261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10262$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10264$as_echo_n "checking for PRINTF... " >&6; }
10265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10266$as_echo "disabled" >&6; }
10267      else
10268        # Check if the provided tool contains a complete path.
10269        tool_specified="$PRINTF"
10270        tool_basename="${tool_specified##*/}"
10271        if test "x$tool_basename" = "x$tool_specified"; then
10272          # A command without a complete path is provided, search $PATH.
10273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10274$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10275          # Extract the first word of "$tool_basename", so it can be a program name with args.
10276set dummy $tool_basename; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_PRINTF+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $PRINTF in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305PRINTF=$ac_cv_path_PRINTF
10306if test -n "$PRINTF"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10308$as_echo "$PRINTF" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315          if test "x$PRINTF" = x; then
10316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10317          fi
10318        else
10319          # Otherwise we believe it is a complete path. Use it as it is.
10320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10321$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10323$as_echo_n "checking for PRINTF... " >&6; }
10324          if test ! -x "$tool_specified"; then
10325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10326$as_echo "not found" >&6; }
10327            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10328          fi
10329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10330$as_echo "$tool_specified" >&6; }
10331        fi
10332      fi
10333    fi
10334
10335  fi
10336
10337
10338
10339  if test "x$PRINTF" = x; then
10340    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10341  fi
10342
10343
10344
10345
10346
10347  # Publish this variable in the help.
10348
10349
10350  if [ -z "${RM+x}" ]; then
10351    # The variable is not set by user, try to locate tool using the code snippet
10352    for ac_prog in rm
10353do
10354  # Extract the first word of "$ac_prog", so it can be a program name with args.
10355set dummy $ac_prog; ac_word=$2
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357$as_echo_n "checking for $ac_word... " >&6; }
10358if ${ac_cv_path_RM+:} false; then :
10359  $as_echo_n "(cached) " >&6
10360else
10361  case $RM in
10362  [\\/]* | ?:[\\/]*)
10363  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10364  ;;
10365  *)
10366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367for as_dir in $PATH
10368do
10369  IFS=$as_save_IFS
10370  test -z "$as_dir" && as_dir=.
10371    for ac_exec_ext in '' $ac_executable_extensions; do
10372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375    break 2
10376  fi
10377done
10378  done
10379IFS=$as_save_IFS
10380
10381  ;;
10382esac
10383fi
10384RM=$ac_cv_path_RM
10385if test -n "$RM"; then
10386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10387$as_echo "$RM" >&6; }
10388else
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393
10394  test -n "$RM" && break
10395done
10396
10397  else
10398    # The variable is set, but is it from the command line or the environment?
10399
10400    # Try to remove the string !RM! from our list.
10401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10403      # If it failed, the variable was not from the command line. Ignore it,
10404      # but warn the user (except for BASH, which is always set by the calling BASH).
10405      if test "xRM" != xBASH; then
10406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10407$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10408      fi
10409      # Try to locate tool using the code snippet
10410      for ac_prog in rm
10411do
10412  # Extract the first word of "$ac_prog", so it can be a program name with args.
10413set dummy $ac_prog; ac_word=$2
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415$as_echo_n "checking for $ac_word... " >&6; }
10416if ${ac_cv_path_RM+:} false; then :
10417  $as_echo_n "(cached) " >&6
10418else
10419  case $RM in
10420  [\\/]* | ?:[\\/]*)
10421  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10422  ;;
10423  *)
10424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425for as_dir in $PATH
10426do
10427  IFS=$as_save_IFS
10428  test -z "$as_dir" && as_dir=.
10429    for ac_exec_ext in '' $ac_executable_extensions; do
10430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10431    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433    break 2
10434  fi
10435done
10436  done
10437IFS=$as_save_IFS
10438
10439  ;;
10440esac
10441fi
10442RM=$ac_cv_path_RM
10443if test -n "$RM"; then
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10445$as_echo "$RM" >&6; }
10446else
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
10449fi
10450
10451
10452  test -n "$RM" && break
10453done
10454
10455    else
10456      # If it succeeded, then it was overridden by the user. We will use it
10457      # for the tool.
10458
10459      # First remove it from the list of overridden variables, so we can test
10460      # for unknown variables in the end.
10461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10462
10463      # Check if we try to supply an empty value
10464      if test "x$RM" = x; then
10465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10466$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10468$as_echo_n "checking for RM... " >&6; }
10469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10470$as_echo "disabled" >&6; }
10471      else
10472        # Check if the provided tool contains a complete path.
10473        tool_specified="$RM"
10474        tool_basename="${tool_specified##*/}"
10475        if test "x$tool_basename" = "x$tool_specified"; then
10476          # A command without a complete path is provided, search $PATH.
10477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10478$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10479          # Extract the first word of "$tool_basename", so it can be a program name with args.
10480set dummy $tool_basename; ac_word=$2
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10482$as_echo_n "checking for $ac_word... " >&6; }
10483if ${ac_cv_path_RM+:} false; then :
10484  $as_echo_n "(cached) " >&6
10485else
10486  case $RM in
10487  [\\/]* | ?:[\\/]*)
10488  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10489  ;;
10490  *)
10491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10492for as_dir in $PATH
10493do
10494  IFS=$as_save_IFS
10495  test -z "$as_dir" && as_dir=.
10496    for ac_exec_ext in '' $ac_executable_extensions; do
10497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10498    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10500    break 2
10501  fi
10502done
10503  done
10504IFS=$as_save_IFS
10505
10506  ;;
10507esac
10508fi
10509RM=$ac_cv_path_RM
10510if test -n "$RM"; then
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10512$as_echo "$RM" >&6; }
10513else
10514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515$as_echo "no" >&6; }
10516fi
10517
10518
10519          if test "x$RM" = x; then
10520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10521          fi
10522        else
10523          # Otherwise we believe it is a complete path. Use it as it is.
10524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10525$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10527$as_echo_n "checking for RM... " >&6; }
10528          if test ! -x "$tool_specified"; then
10529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10530$as_echo "not found" >&6; }
10531            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10532          fi
10533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10534$as_echo "$tool_specified" >&6; }
10535        fi
10536      fi
10537    fi
10538
10539  fi
10540
10541
10542
10543  if test "x$RM" = x; then
10544    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10545  fi
10546
10547
10548
10549
10550
10551  # Publish this variable in the help.
10552
10553
10554  if [ -z "${RMDIR+x}" ]; then
10555    # The variable is not set by user, try to locate tool using the code snippet
10556    for ac_prog in rmdir
10557do
10558  # Extract the first word of "$ac_prog", so it can be a program name with args.
10559set dummy $ac_prog; ac_word=$2
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10561$as_echo_n "checking for $ac_word... " >&6; }
10562if ${ac_cv_path_RMDIR+:} false; then :
10563  $as_echo_n "(cached) " >&6
10564else
10565  case $RMDIR in
10566  [\\/]* | ?:[\\/]*)
10567  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10568  ;;
10569  *)
10570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10571for as_dir in $PATH
10572do
10573  IFS=$as_save_IFS
10574  test -z "$as_dir" && as_dir=.
10575    for ac_exec_ext in '' $ac_executable_extensions; do
10576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10577    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10579    break 2
10580  fi
10581done
10582  done
10583IFS=$as_save_IFS
10584
10585  ;;
10586esac
10587fi
10588RMDIR=$ac_cv_path_RMDIR
10589if test -n "$RMDIR"; then
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10591$as_echo "$RMDIR" >&6; }
10592else
10593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10594$as_echo "no" >&6; }
10595fi
10596
10597
10598  test -n "$RMDIR" && break
10599done
10600
10601  else
10602    # The variable is set, but is it from the command line or the environment?
10603
10604    # Try to remove the string !RMDIR! from our list.
10605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10607      # If it failed, the variable was not from the command line. Ignore it,
10608      # but warn the user (except for BASH, which is always set by the calling BASH).
10609      if test "xRMDIR" != xBASH; then
10610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10611$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10612      fi
10613      # Try to locate tool using the code snippet
10614      for ac_prog in rmdir
10615do
10616  # Extract the first word of "$ac_prog", so it can be a program name with args.
10617set dummy $ac_prog; ac_word=$2
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10619$as_echo_n "checking for $ac_word... " >&6; }
10620if ${ac_cv_path_RMDIR+:} false; then :
10621  $as_echo_n "(cached) " >&6
10622else
10623  case $RMDIR in
10624  [\\/]* | ?:[\\/]*)
10625  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10626  ;;
10627  *)
10628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629for as_dir in $PATH
10630do
10631  IFS=$as_save_IFS
10632  test -z "$as_dir" && as_dir=.
10633    for ac_exec_ext in '' $ac_executable_extensions; do
10634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10635    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637    break 2
10638  fi
10639done
10640  done
10641IFS=$as_save_IFS
10642
10643  ;;
10644esac
10645fi
10646RMDIR=$ac_cv_path_RMDIR
10647if test -n "$RMDIR"; then
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10649$as_echo "$RMDIR" >&6; }
10650else
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
10653fi
10654
10655
10656  test -n "$RMDIR" && break
10657done
10658
10659    else
10660      # If it succeeded, then it was overridden by the user. We will use it
10661      # for the tool.
10662
10663      # First remove it from the list of overridden variables, so we can test
10664      # for unknown variables in the end.
10665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10666
10667      # Check if we try to supply an empty value
10668      if test "x$RMDIR" = x; then
10669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10670$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10672$as_echo_n "checking for RMDIR... " >&6; }
10673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10674$as_echo "disabled" >&6; }
10675      else
10676        # Check if the provided tool contains a complete path.
10677        tool_specified="$RMDIR"
10678        tool_basename="${tool_specified##*/}"
10679        if test "x$tool_basename" = "x$tool_specified"; then
10680          # A command without a complete path is provided, search $PATH.
10681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10682$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10683          # Extract the first word of "$tool_basename", so it can be a program name with args.
10684set dummy $tool_basename; ac_word=$2
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10686$as_echo_n "checking for $ac_word... " >&6; }
10687if ${ac_cv_path_RMDIR+:} false; then :
10688  $as_echo_n "(cached) " >&6
10689else
10690  case $RMDIR in
10691  [\\/]* | ?:[\\/]*)
10692  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10693  ;;
10694  *)
10695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10696for as_dir in $PATH
10697do
10698  IFS=$as_save_IFS
10699  test -z "$as_dir" && as_dir=.
10700    for ac_exec_ext in '' $ac_executable_extensions; do
10701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10702    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10704    break 2
10705  fi
10706done
10707  done
10708IFS=$as_save_IFS
10709
10710  ;;
10711esac
10712fi
10713RMDIR=$ac_cv_path_RMDIR
10714if test -n "$RMDIR"; then
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10716$as_echo "$RMDIR" >&6; }
10717else
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719$as_echo "no" >&6; }
10720fi
10721
10722
10723          if test "x$RMDIR" = x; then
10724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10725          fi
10726        else
10727          # Otherwise we believe it is a complete path. Use it as it is.
10728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10729$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10731$as_echo_n "checking for RMDIR... " >&6; }
10732          if test ! -x "$tool_specified"; then
10733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10734$as_echo "not found" >&6; }
10735            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10736          fi
10737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10738$as_echo "$tool_specified" >&6; }
10739        fi
10740      fi
10741    fi
10742
10743  fi
10744
10745
10746
10747  if test "x$RMDIR" = x; then
10748    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10749  fi
10750
10751
10752
10753
10754
10755  # Publish this variable in the help.
10756
10757
10758  if [ -z "${SH+x}" ]; then
10759    # The variable is not set by user, try to locate tool using the code snippet
10760    for ac_prog in sh
10761do
10762  # Extract the first word of "$ac_prog", so it can be a program name with args.
10763set dummy $ac_prog; ac_word=$2
10764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10765$as_echo_n "checking for $ac_word... " >&6; }
10766if ${ac_cv_path_SH+:} false; then :
10767  $as_echo_n "(cached) " >&6
10768else
10769  case $SH in
10770  [\\/]* | ?:[\\/]*)
10771  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10772  ;;
10773  *)
10774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10775for as_dir in $PATH
10776do
10777  IFS=$as_save_IFS
10778  test -z "$as_dir" && as_dir=.
10779    for ac_exec_ext in '' $ac_executable_extensions; do
10780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10781    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10783    break 2
10784  fi
10785done
10786  done
10787IFS=$as_save_IFS
10788
10789  ;;
10790esac
10791fi
10792SH=$ac_cv_path_SH
10793if test -n "$SH"; then
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10795$as_echo "$SH" >&6; }
10796else
10797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10798$as_echo "no" >&6; }
10799fi
10800
10801
10802  test -n "$SH" && break
10803done
10804
10805  else
10806    # The variable is set, but is it from the command line or the environment?
10807
10808    # Try to remove the string !SH! from our list.
10809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10811      # If it failed, the variable was not from the command line. Ignore it,
10812      # but warn the user (except for BASH, which is always set by the calling BASH).
10813      if test "xSH" != xBASH; then
10814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10815$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10816      fi
10817      # Try to locate tool using the code snippet
10818      for ac_prog in sh
10819do
10820  # Extract the first word of "$ac_prog", so it can be a program name with args.
10821set dummy $ac_prog; ac_word=$2
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10823$as_echo_n "checking for $ac_word... " >&6; }
10824if ${ac_cv_path_SH+:} false; then :
10825  $as_echo_n "(cached) " >&6
10826else
10827  case $SH in
10828  [\\/]* | ?:[\\/]*)
10829  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10830  ;;
10831  *)
10832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10833for as_dir in $PATH
10834do
10835  IFS=$as_save_IFS
10836  test -z "$as_dir" && as_dir=.
10837    for ac_exec_ext in '' $ac_executable_extensions; do
10838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10839    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10841    break 2
10842  fi
10843done
10844  done
10845IFS=$as_save_IFS
10846
10847  ;;
10848esac
10849fi
10850SH=$ac_cv_path_SH
10851if test -n "$SH"; then
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10853$as_echo "$SH" >&6; }
10854else
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856$as_echo "no" >&6; }
10857fi
10858
10859
10860  test -n "$SH" && break
10861done
10862
10863    else
10864      # If it succeeded, then it was overridden by the user. We will use it
10865      # for the tool.
10866
10867      # First remove it from the list of overridden variables, so we can test
10868      # for unknown variables in the end.
10869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10870
10871      # Check if we try to supply an empty value
10872      if test "x$SH" = x; then
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10874$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10876$as_echo_n "checking for SH... " >&6; }
10877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10878$as_echo "disabled" >&6; }
10879      else
10880        # Check if the provided tool contains a complete path.
10881        tool_specified="$SH"
10882        tool_basename="${tool_specified##*/}"
10883        if test "x$tool_basename" = "x$tool_specified"; then
10884          # A command without a complete path is provided, search $PATH.
10885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10886$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10887          # Extract the first word of "$tool_basename", so it can be a program name with args.
10888set dummy $tool_basename; ac_word=$2
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10890$as_echo_n "checking for $ac_word... " >&6; }
10891if ${ac_cv_path_SH+:} false; then :
10892  $as_echo_n "(cached) " >&6
10893else
10894  case $SH in
10895  [\\/]* | ?:[\\/]*)
10896  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10897  ;;
10898  *)
10899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10900for as_dir in $PATH
10901do
10902  IFS=$as_save_IFS
10903  test -z "$as_dir" && as_dir=.
10904    for ac_exec_ext in '' $ac_executable_extensions; do
10905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10906    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10908    break 2
10909  fi
10910done
10911  done
10912IFS=$as_save_IFS
10913
10914  ;;
10915esac
10916fi
10917SH=$ac_cv_path_SH
10918if test -n "$SH"; then
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10920$as_echo "$SH" >&6; }
10921else
10922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923$as_echo "no" >&6; }
10924fi
10925
10926
10927          if test "x$SH" = x; then
10928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10929          fi
10930        else
10931          # Otherwise we believe it is a complete path. Use it as it is.
10932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10933$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10935$as_echo_n "checking for SH... " >&6; }
10936          if test ! -x "$tool_specified"; then
10937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10938$as_echo "not found" >&6; }
10939            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10940          fi
10941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10942$as_echo "$tool_specified" >&6; }
10943        fi
10944      fi
10945    fi
10946
10947  fi
10948
10949
10950
10951  if test "x$SH" = x; then
10952    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10953  fi
10954
10955
10956
10957
10958
10959  # Publish this variable in the help.
10960
10961
10962  if [ -z "${SORT+x}" ]; then
10963    # The variable is not set by user, try to locate tool using the code snippet
10964    for ac_prog in sort
10965do
10966  # Extract the first word of "$ac_prog", so it can be a program name with args.
10967set dummy $ac_prog; ac_word=$2
10968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10969$as_echo_n "checking for $ac_word... " >&6; }
10970if ${ac_cv_path_SORT+:} false; then :
10971  $as_echo_n "(cached) " >&6
10972else
10973  case $SORT in
10974  [\\/]* | ?:[\\/]*)
10975  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10976  ;;
10977  *)
10978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10979for as_dir in $PATH
10980do
10981  IFS=$as_save_IFS
10982  test -z "$as_dir" && as_dir=.
10983    for ac_exec_ext in '' $ac_executable_extensions; do
10984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10985    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10987    break 2
10988  fi
10989done
10990  done
10991IFS=$as_save_IFS
10992
10993  ;;
10994esac
10995fi
10996SORT=$ac_cv_path_SORT
10997if test -n "$SORT"; then
10998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10999$as_echo "$SORT" >&6; }
11000else
11001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
11003fi
11004
11005
11006  test -n "$SORT" && break
11007done
11008
11009  else
11010    # The variable is set, but is it from the command line or the environment?
11011
11012    # Try to remove the string !SORT! from our list.
11013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11015      # If it failed, the variable was not from the command line. Ignore it,
11016      # but warn the user (except for BASH, which is always set by the calling BASH).
11017      if test "xSORT" != xBASH; then
11018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11019$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11020      fi
11021      # Try to locate tool using the code snippet
11022      for ac_prog in sort
11023do
11024  # Extract the first word of "$ac_prog", so it can be a program name with args.
11025set dummy $ac_prog; ac_word=$2
11026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11027$as_echo_n "checking for $ac_word... " >&6; }
11028if ${ac_cv_path_SORT+:} false; then :
11029  $as_echo_n "(cached) " >&6
11030else
11031  case $SORT in
11032  [\\/]* | ?:[\\/]*)
11033  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11034  ;;
11035  *)
11036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11037for as_dir in $PATH
11038do
11039  IFS=$as_save_IFS
11040  test -z "$as_dir" && as_dir=.
11041    for ac_exec_ext in '' $ac_executable_extensions; do
11042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11043    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11045    break 2
11046  fi
11047done
11048  done
11049IFS=$as_save_IFS
11050
11051  ;;
11052esac
11053fi
11054SORT=$ac_cv_path_SORT
11055if test -n "$SORT"; then
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11057$as_echo "$SORT" >&6; }
11058else
11059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060$as_echo "no" >&6; }
11061fi
11062
11063
11064  test -n "$SORT" && break
11065done
11066
11067    else
11068      # If it succeeded, then it was overridden by the user. We will use it
11069      # for the tool.
11070
11071      # First remove it from the list of overridden variables, so we can test
11072      # for unknown variables in the end.
11073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11074
11075      # Check if we try to supply an empty value
11076      if test "x$SORT" = x; then
11077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11078$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11080$as_echo_n "checking for SORT... " >&6; }
11081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11082$as_echo "disabled" >&6; }
11083      else
11084        # Check if the provided tool contains a complete path.
11085        tool_specified="$SORT"
11086        tool_basename="${tool_specified##*/}"
11087        if test "x$tool_basename" = "x$tool_specified"; then
11088          # A command without a complete path is provided, search $PATH.
11089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11090$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11091          # Extract the first word of "$tool_basename", so it can be a program name with args.
11092set dummy $tool_basename; ac_word=$2
11093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11094$as_echo_n "checking for $ac_word... " >&6; }
11095if ${ac_cv_path_SORT+:} false; then :
11096  $as_echo_n "(cached) " >&6
11097else
11098  case $SORT in
11099  [\\/]* | ?:[\\/]*)
11100  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11101  ;;
11102  *)
11103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11104for as_dir in $PATH
11105do
11106  IFS=$as_save_IFS
11107  test -z "$as_dir" && as_dir=.
11108    for ac_exec_ext in '' $ac_executable_extensions; do
11109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11110    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11112    break 2
11113  fi
11114done
11115  done
11116IFS=$as_save_IFS
11117
11118  ;;
11119esac
11120fi
11121SORT=$ac_cv_path_SORT
11122if test -n "$SORT"; then
11123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11124$as_echo "$SORT" >&6; }
11125else
11126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11127$as_echo "no" >&6; }
11128fi
11129
11130
11131          if test "x$SORT" = x; then
11132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11133          fi
11134        else
11135          # Otherwise we believe it is a complete path. Use it as it is.
11136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11137$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11139$as_echo_n "checking for SORT... " >&6; }
11140          if test ! -x "$tool_specified"; then
11141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11142$as_echo "not found" >&6; }
11143            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11144          fi
11145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11146$as_echo "$tool_specified" >&6; }
11147        fi
11148      fi
11149    fi
11150
11151  fi
11152
11153
11154
11155  if test "x$SORT" = x; then
11156    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11157  fi
11158
11159
11160
11161
11162
11163  # Publish this variable in the help.
11164
11165
11166  if [ -z "${TAIL+x}" ]; then
11167    # The variable is not set by user, try to locate tool using the code snippet
11168    for ac_prog in tail
11169do
11170  # Extract the first word of "$ac_prog", so it can be a program name with args.
11171set dummy $ac_prog; ac_word=$2
11172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11173$as_echo_n "checking for $ac_word... " >&6; }
11174if ${ac_cv_path_TAIL+:} false; then :
11175  $as_echo_n "(cached) " >&6
11176else
11177  case $TAIL in
11178  [\\/]* | ?:[\\/]*)
11179  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11180  ;;
11181  *)
11182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11183for as_dir in $PATH
11184do
11185  IFS=$as_save_IFS
11186  test -z "$as_dir" && as_dir=.
11187    for ac_exec_ext in '' $ac_executable_extensions; do
11188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11189    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11191    break 2
11192  fi
11193done
11194  done
11195IFS=$as_save_IFS
11196
11197  ;;
11198esac
11199fi
11200TAIL=$ac_cv_path_TAIL
11201if test -n "$TAIL"; then
11202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11203$as_echo "$TAIL" >&6; }
11204else
11205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11206$as_echo "no" >&6; }
11207fi
11208
11209
11210  test -n "$TAIL" && break
11211done
11212
11213  else
11214    # The variable is set, but is it from the command line or the environment?
11215
11216    # Try to remove the string !TAIL! from our list.
11217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11219      # If it failed, the variable was not from the command line. Ignore it,
11220      # but warn the user (except for BASH, which is always set by the calling BASH).
11221      if test "xTAIL" != xBASH; then
11222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11223$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11224      fi
11225      # Try to locate tool using the code snippet
11226      for ac_prog in tail
11227do
11228  # Extract the first word of "$ac_prog", so it can be a program name with args.
11229set dummy $ac_prog; ac_word=$2
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11231$as_echo_n "checking for $ac_word... " >&6; }
11232if ${ac_cv_path_TAIL+:} false; then :
11233  $as_echo_n "(cached) " >&6
11234else
11235  case $TAIL in
11236  [\\/]* | ?:[\\/]*)
11237  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11238  ;;
11239  *)
11240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241for as_dir in $PATH
11242do
11243  IFS=$as_save_IFS
11244  test -z "$as_dir" && as_dir=.
11245    for ac_exec_ext in '' $ac_executable_extensions; do
11246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249    break 2
11250  fi
11251done
11252  done
11253IFS=$as_save_IFS
11254
11255  ;;
11256esac
11257fi
11258TAIL=$ac_cv_path_TAIL
11259if test -n "$TAIL"; then
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11261$as_echo "$TAIL" >&6; }
11262else
11263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11264$as_echo "no" >&6; }
11265fi
11266
11267
11268  test -n "$TAIL" && break
11269done
11270
11271    else
11272      # If it succeeded, then it was overridden by the user. We will use it
11273      # for the tool.
11274
11275      # First remove it from the list of overridden variables, so we can test
11276      # for unknown variables in the end.
11277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11278
11279      # Check if we try to supply an empty value
11280      if test "x$TAIL" = x; then
11281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11282$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11284$as_echo_n "checking for TAIL... " >&6; }
11285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11286$as_echo "disabled" >&6; }
11287      else
11288        # Check if the provided tool contains a complete path.
11289        tool_specified="$TAIL"
11290        tool_basename="${tool_specified##*/}"
11291        if test "x$tool_basename" = "x$tool_specified"; then
11292          # A command without a complete path is provided, search $PATH.
11293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11294$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11295          # Extract the first word of "$tool_basename", so it can be a program name with args.
11296set dummy $tool_basename; ac_word=$2
11297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11298$as_echo_n "checking for $ac_word... " >&6; }
11299if ${ac_cv_path_TAIL+:} false; then :
11300  $as_echo_n "(cached) " >&6
11301else
11302  case $TAIL in
11303  [\\/]* | ?:[\\/]*)
11304  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11305  ;;
11306  *)
11307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11308for as_dir in $PATH
11309do
11310  IFS=$as_save_IFS
11311  test -z "$as_dir" && as_dir=.
11312    for ac_exec_ext in '' $ac_executable_extensions; do
11313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11314    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11316    break 2
11317  fi
11318done
11319  done
11320IFS=$as_save_IFS
11321
11322  ;;
11323esac
11324fi
11325TAIL=$ac_cv_path_TAIL
11326if test -n "$TAIL"; then
11327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11328$as_echo "$TAIL" >&6; }
11329else
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11331$as_echo "no" >&6; }
11332fi
11333
11334
11335          if test "x$TAIL" = x; then
11336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11337          fi
11338        else
11339          # Otherwise we believe it is a complete path. Use it as it is.
11340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11341$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11343$as_echo_n "checking for TAIL... " >&6; }
11344          if test ! -x "$tool_specified"; then
11345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11346$as_echo "not found" >&6; }
11347            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11348          fi
11349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11350$as_echo "$tool_specified" >&6; }
11351        fi
11352      fi
11353    fi
11354
11355  fi
11356
11357
11358
11359  if test "x$TAIL" = x; then
11360    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11361  fi
11362
11363
11364
11365
11366
11367  # Publish this variable in the help.
11368
11369
11370  if [ -z "${TAR+x}" ]; then
11371    # The variable is not set by user, try to locate tool using the code snippet
11372    for ac_prog in gtar tar
11373do
11374  # Extract the first word of "$ac_prog", so it can be a program name with args.
11375set dummy $ac_prog; ac_word=$2
11376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11377$as_echo_n "checking for $ac_word... " >&6; }
11378if ${ac_cv_path_TAR+:} false; then :
11379  $as_echo_n "(cached) " >&6
11380else
11381  case $TAR in
11382  [\\/]* | ?:[\\/]*)
11383  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11384  ;;
11385  *)
11386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11387for as_dir in $PATH
11388do
11389  IFS=$as_save_IFS
11390  test -z "$as_dir" && as_dir=.
11391    for ac_exec_ext in '' $ac_executable_extensions; do
11392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11393    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11395    break 2
11396  fi
11397done
11398  done
11399IFS=$as_save_IFS
11400
11401  ;;
11402esac
11403fi
11404TAR=$ac_cv_path_TAR
11405if test -n "$TAR"; then
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11407$as_echo "$TAR" >&6; }
11408else
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
11411fi
11412
11413
11414  test -n "$TAR" && break
11415done
11416
11417  else
11418    # The variable is set, but is it from the command line or the environment?
11419
11420    # Try to remove the string !TAR! from our list.
11421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11423      # If it failed, the variable was not from the command line. Ignore it,
11424      # but warn the user (except for BASH, which is always set by the calling BASH).
11425      if test "xTAR" != xBASH; then
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11427$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11428      fi
11429      # Try to locate tool using the code snippet
11430      for ac_prog in gtar tar
11431do
11432  # Extract the first word of "$ac_prog", so it can be a program name with args.
11433set dummy $ac_prog; ac_word=$2
11434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11435$as_echo_n "checking for $ac_word... " >&6; }
11436if ${ac_cv_path_TAR+:} false; then :
11437  $as_echo_n "(cached) " >&6
11438else
11439  case $TAR in
11440  [\\/]* | ?:[\\/]*)
11441  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11442  ;;
11443  *)
11444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11445for as_dir in $PATH
11446do
11447  IFS=$as_save_IFS
11448  test -z "$as_dir" && as_dir=.
11449    for ac_exec_ext in '' $ac_executable_extensions; do
11450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11451    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11453    break 2
11454  fi
11455done
11456  done
11457IFS=$as_save_IFS
11458
11459  ;;
11460esac
11461fi
11462TAR=$ac_cv_path_TAR
11463if test -n "$TAR"; then
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11465$as_echo "$TAR" >&6; }
11466else
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468$as_echo "no" >&6; }
11469fi
11470
11471
11472  test -n "$TAR" && break
11473done
11474
11475    else
11476      # If it succeeded, then it was overridden by the user. We will use it
11477      # for the tool.
11478
11479      # First remove it from the list of overridden variables, so we can test
11480      # for unknown variables in the end.
11481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11482
11483      # Check if we try to supply an empty value
11484      if test "x$TAR" = x; then
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11486$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11488$as_echo_n "checking for TAR... " >&6; }
11489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11490$as_echo "disabled" >&6; }
11491      else
11492        # Check if the provided tool contains a complete path.
11493        tool_specified="$TAR"
11494        tool_basename="${tool_specified##*/}"
11495        if test "x$tool_basename" = "x$tool_specified"; then
11496          # A command without a complete path is provided, search $PATH.
11497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11498$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11499          # Extract the first word of "$tool_basename", so it can be a program name with args.
11500set dummy $tool_basename; ac_word=$2
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11502$as_echo_n "checking for $ac_word... " >&6; }
11503if ${ac_cv_path_TAR+:} false; then :
11504  $as_echo_n "(cached) " >&6
11505else
11506  case $TAR in
11507  [\\/]* | ?:[\\/]*)
11508  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11509  ;;
11510  *)
11511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11512for as_dir in $PATH
11513do
11514  IFS=$as_save_IFS
11515  test -z "$as_dir" && as_dir=.
11516    for ac_exec_ext in '' $ac_executable_extensions; do
11517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11518    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11520    break 2
11521  fi
11522done
11523  done
11524IFS=$as_save_IFS
11525
11526  ;;
11527esac
11528fi
11529TAR=$ac_cv_path_TAR
11530if test -n "$TAR"; then
11531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11532$as_echo "$TAR" >&6; }
11533else
11534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
11536fi
11537
11538
11539          if test "x$TAR" = x; then
11540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11541          fi
11542        else
11543          # Otherwise we believe it is a complete path. Use it as it is.
11544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11545$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11547$as_echo_n "checking for TAR... " >&6; }
11548          if test ! -x "$tool_specified"; then
11549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11550$as_echo "not found" >&6; }
11551            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11552          fi
11553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11554$as_echo "$tool_specified" >&6; }
11555        fi
11556      fi
11557    fi
11558
11559  fi
11560
11561
11562
11563  if test "x$TAR" = x; then
11564    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11565  fi
11566
11567
11568
11569
11570
11571  # Publish this variable in the help.
11572
11573
11574  if [ -z "${TEE+x}" ]; then
11575    # The variable is not set by user, try to locate tool using the code snippet
11576    for ac_prog in tee
11577do
11578  # Extract the first word of "$ac_prog", so it can be a program name with args.
11579set dummy $ac_prog; ac_word=$2
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11581$as_echo_n "checking for $ac_word... " >&6; }
11582if ${ac_cv_path_TEE+:} false; then :
11583  $as_echo_n "(cached) " >&6
11584else
11585  case $TEE in
11586  [\\/]* | ?:[\\/]*)
11587  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11588  ;;
11589  *)
11590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11591for as_dir in $PATH
11592do
11593  IFS=$as_save_IFS
11594  test -z "$as_dir" && as_dir=.
11595    for ac_exec_ext in '' $ac_executable_extensions; do
11596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11597    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11599    break 2
11600  fi
11601done
11602  done
11603IFS=$as_save_IFS
11604
11605  ;;
11606esac
11607fi
11608TEE=$ac_cv_path_TEE
11609if test -n "$TEE"; then
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11611$as_echo "$TEE" >&6; }
11612else
11613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614$as_echo "no" >&6; }
11615fi
11616
11617
11618  test -n "$TEE" && break
11619done
11620
11621  else
11622    # The variable is set, but is it from the command line or the environment?
11623
11624    # Try to remove the string !TEE! from our list.
11625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11627      # If it failed, the variable was not from the command line. Ignore it,
11628      # but warn the user (except for BASH, which is always set by the calling BASH).
11629      if test "xTEE" != xBASH; then
11630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11631$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11632      fi
11633      # Try to locate tool using the code snippet
11634      for ac_prog in tee
11635do
11636  # Extract the first word of "$ac_prog", so it can be a program name with args.
11637set dummy $ac_prog; ac_word=$2
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11639$as_echo_n "checking for $ac_word... " >&6; }
11640if ${ac_cv_path_TEE+:} false; then :
11641  $as_echo_n "(cached) " >&6
11642else
11643  case $TEE in
11644  [\\/]* | ?:[\\/]*)
11645  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11646  ;;
11647  *)
11648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11649for as_dir in $PATH
11650do
11651  IFS=$as_save_IFS
11652  test -z "$as_dir" && as_dir=.
11653    for ac_exec_ext in '' $ac_executable_extensions; do
11654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11655    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11657    break 2
11658  fi
11659done
11660  done
11661IFS=$as_save_IFS
11662
11663  ;;
11664esac
11665fi
11666TEE=$ac_cv_path_TEE
11667if test -n "$TEE"; then
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11669$as_echo "$TEE" >&6; }
11670else
11671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11672$as_echo "no" >&6; }
11673fi
11674
11675
11676  test -n "$TEE" && break
11677done
11678
11679    else
11680      # If it succeeded, then it was overridden by the user. We will use it
11681      # for the tool.
11682
11683      # First remove it from the list of overridden variables, so we can test
11684      # for unknown variables in the end.
11685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11686
11687      # Check if we try to supply an empty value
11688      if test "x$TEE" = x; then
11689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11690$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11692$as_echo_n "checking for TEE... " >&6; }
11693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11694$as_echo "disabled" >&6; }
11695      else
11696        # Check if the provided tool contains a complete path.
11697        tool_specified="$TEE"
11698        tool_basename="${tool_specified##*/}"
11699        if test "x$tool_basename" = "x$tool_specified"; then
11700          # A command without a complete path is provided, search $PATH.
11701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11702$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11703          # Extract the first word of "$tool_basename", so it can be a program name with args.
11704set dummy $tool_basename; ac_word=$2
11705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11706$as_echo_n "checking for $ac_word... " >&6; }
11707if ${ac_cv_path_TEE+:} false; then :
11708  $as_echo_n "(cached) " >&6
11709else
11710  case $TEE in
11711  [\\/]* | ?:[\\/]*)
11712  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11713  ;;
11714  *)
11715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11716for as_dir in $PATH
11717do
11718  IFS=$as_save_IFS
11719  test -z "$as_dir" && as_dir=.
11720    for ac_exec_ext in '' $ac_executable_extensions; do
11721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11722    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11724    break 2
11725  fi
11726done
11727  done
11728IFS=$as_save_IFS
11729
11730  ;;
11731esac
11732fi
11733TEE=$ac_cv_path_TEE
11734if test -n "$TEE"; then
11735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11736$as_echo "$TEE" >&6; }
11737else
11738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
11740fi
11741
11742
11743          if test "x$TEE" = x; then
11744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11745          fi
11746        else
11747          # Otherwise we believe it is a complete path. Use it as it is.
11748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11749$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11751$as_echo_n "checking for TEE... " >&6; }
11752          if test ! -x "$tool_specified"; then
11753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11754$as_echo "not found" >&6; }
11755            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11756          fi
11757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11758$as_echo "$tool_specified" >&6; }
11759        fi
11760      fi
11761    fi
11762
11763  fi
11764
11765
11766
11767  if test "x$TEE" = x; then
11768    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11769  fi
11770
11771
11772
11773
11774
11775  # Publish this variable in the help.
11776
11777
11778  if [ -z "${TOUCH+x}" ]; then
11779    # The variable is not set by user, try to locate tool using the code snippet
11780    for ac_prog in touch
11781do
11782  # Extract the first word of "$ac_prog", so it can be a program name with args.
11783set dummy $ac_prog; ac_word=$2
11784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11785$as_echo_n "checking for $ac_word... " >&6; }
11786if ${ac_cv_path_TOUCH+:} false; then :
11787  $as_echo_n "(cached) " >&6
11788else
11789  case $TOUCH in
11790  [\\/]* | ?:[\\/]*)
11791  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11792  ;;
11793  *)
11794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11795for as_dir in $PATH
11796do
11797  IFS=$as_save_IFS
11798  test -z "$as_dir" && as_dir=.
11799    for ac_exec_ext in '' $ac_executable_extensions; do
11800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11801    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11803    break 2
11804  fi
11805done
11806  done
11807IFS=$as_save_IFS
11808
11809  ;;
11810esac
11811fi
11812TOUCH=$ac_cv_path_TOUCH
11813if test -n "$TOUCH"; then
11814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11815$as_echo "$TOUCH" >&6; }
11816else
11817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
11819fi
11820
11821
11822  test -n "$TOUCH" && break
11823done
11824
11825  else
11826    # The variable is set, but is it from the command line or the environment?
11827
11828    # Try to remove the string !TOUCH! from our list.
11829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11831      # If it failed, the variable was not from the command line. Ignore it,
11832      # but warn the user (except for BASH, which is always set by the calling BASH).
11833      if test "xTOUCH" != xBASH; then
11834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11835$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11836      fi
11837      # Try to locate tool using the code snippet
11838      for ac_prog in touch
11839do
11840  # Extract the first word of "$ac_prog", so it can be a program name with args.
11841set dummy $ac_prog; ac_word=$2
11842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11843$as_echo_n "checking for $ac_word... " >&6; }
11844if ${ac_cv_path_TOUCH+:} false; then :
11845  $as_echo_n "(cached) " >&6
11846else
11847  case $TOUCH in
11848  [\\/]* | ?:[\\/]*)
11849  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11850  ;;
11851  *)
11852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11853for as_dir in $PATH
11854do
11855  IFS=$as_save_IFS
11856  test -z "$as_dir" && as_dir=.
11857    for ac_exec_ext in '' $ac_executable_extensions; do
11858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11859    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11861    break 2
11862  fi
11863done
11864  done
11865IFS=$as_save_IFS
11866
11867  ;;
11868esac
11869fi
11870TOUCH=$ac_cv_path_TOUCH
11871if test -n "$TOUCH"; then
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11873$as_echo "$TOUCH" >&6; }
11874else
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11876$as_echo "no" >&6; }
11877fi
11878
11879
11880  test -n "$TOUCH" && break
11881done
11882
11883    else
11884      # If it succeeded, then it was overridden by the user. We will use it
11885      # for the tool.
11886
11887      # First remove it from the list of overridden variables, so we can test
11888      # for unknown variables in the end.
11889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11890
11891      # Check if we try to supply an empty value
11892      if test "x$TOUCH" = x; then
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11894$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11896$as_echo_n "checking for TOUCH... " >&6; }
11897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11898$as_echo "disabled" >&6; }
11899      else
11900        # Check if the provided tool contains a complete path.
11901        tool_specified="$TOUCH"
11902        tool_basename="${tool_specified##*/}"
11903        if test "x$tool_basename" = "x$tool_specified"; then
11904          # A command without a complete path is provided, search $PATH.
11905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11906$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11907          # Extract the first word of "$tool_basename", so it can be a program name with args.
11908set dummy $tool_basename; ac_word=$2
11909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11910$as_echo_n "checking for $ac_word... " >&6; }
11911if ${ac_cv_path_TOUCH+:} false; then :
11912  $as_echo_n "(cached) " >&6
11913else
11914  case $TOUCH in
11915  [\\/]* | ?:[\\/]*)
11916  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11917  ;;
11918  *)
11919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11920for as_dir in $PATH
11921do
11922  IFS=$as_save_IFS
11923  test -z "$as_dir" && as_dir=.
11924    for ac_exec_ext in '' $ac_executable_extensions; do
11925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11926    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11928    break 2
11929  fi
11930done
11931  done
11932IFS=$as_save_IFS
11933
11934  ;;
11935esac
11936fi
11937TOUCH=$ac_cv_path_TOUCH
11938if test -n "$TOUCH"; then
11939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11940$as_echo "$TOUCH" >&6; }
11941else
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11943$as_echo "no" >&6; }
11944fi
11945
11946
11947          if test "x$TOUCH" = x; then
11948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11949          fi
11950        else
11951          # Otherwise we believe it is a complete path. Use it as it is.
11952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11953$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11955$as_echo_n "checking for TOUCH... " >&6; }
11956          if test ! -x "$tool_specified"; then
11957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11958$as_echo "not found" >&6; }
11959            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11960          fi
11961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11962$as_echo "$tool_specified" >&6; }
11963        fi
11964      fi
11965    fi
11966
11967  fi
11968
11969
11970
11971  if test "x$TOUCH" = x; then
11972    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11973  fi
11974
11975
11976
11977
11978
11979  # Publish this variable in the help.
11980
11981
11982  if [ -z "${TR+x}" ]; then
11983    # The variable is not set by user, try to locate tool using the code snippet
11984    for ac_prog in tr
11985do
11986  # Extract the first word of "$ac_prog", so it can be a program name with args.
11987set dummy $ac_prog; ac_word=$2
11988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11989$as_echo_n "checking for $ac_word... " >&6; }
11990if ${ac_cv_path_TR+:} false; then :
11991  $as_echo_n "(cached) " >&6
11992else
11993  case $TR in
11994  [\\/]* | ?:[\\/]*)
11995  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11996  ;;
11997  *)
11998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11999for as_dir in $PATH
12000do
12001  IFS=$as_save_IFS
12002  test -z "$as_dir" && as_dir=.
12003    for ac_exec_ext in '' $ac_executable_extensions; do
12004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12005    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12007    break 2
12008  fi
12009done
12010  done
12011IFS=$as_save_IFS
12012
12013  ;;
12014esac
12015fi
12016TR=$ac_cv_path_TR
12017if test -n "$TR"; then
12018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12019$as_echo "$TR" >&6; }
12020else
12021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12022$as_echo "no" >&6; }
12023fi
12024
12025
12026  test -n "$TR" && break
12027done
12028
12029  else
12030    # The variable is set, but is it from the command line or the environment?
12031
12032    # Try to remove the string !TR! from our list.
12033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12035      # If it failed, the variable was not from the command line. Ignore it,
12036      # but warn the user (except for BASH, which is always set by the calling BASH).
12037      if test "xTR" != xBASH; then
12038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12039$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12040      fi
12041      # Try to locate tool using the code snippet
12042      for ac_prog in tr
12043do
12044  # Extract the first word of "$ac_prog", so it can be a program name with args.
12045set dummy $ac_prog; ac_word=$2
12046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12047$as_echo_n "checking for $ac_word... " >&6; }
12048if ${ac_cv_path_TR+:} false; then :
12049  $as_echo_n "(cached) " >&6
12050else
12051  case $TR in
12052  [\\/]* | ?:[\\/]*)
12053  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12054  ;;
12055  *)
12056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12057for as_dir in $PATH
12058do
12059  IFS=$as_save_IFS
12060  test -z "$as_dir" && as_dir=.
12061    for ac_exec_ext in '' $ac_executable_extensions; do
12062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12063    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12065    break 2
12066  fi
12067done
12068  done
12069IFS=$as_save_IFS
12070
12071  ;;
12072esac
12073fi
12074TR=$ac_cv_path_TR
12075if test -n "$TR"; then
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12077$as_echo "$TR" >&6; }
12078else
12079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12080$as_echo "no" >&6; }
12081fi
12082
12083
12084  test -n "$TR" && break
12085done
12086
12087    else
12088      # If it succeeded, then it was overridden by the user. We will use it
12089      # for the tool.
12090
12091      # First remove it from the list of overridden variables, so we can test
12092      # for unknown variables in the end.
12093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12094
12095      # Check if we try to supply an empty value
12096      if test "x$TR" = x; then
12097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12098$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12100$as_echo_n "checking for TR... " >&6; }
12101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12102$as_echo "disabled" >&6; }
12103      else
12104        # Check if the provided tool contains a complete path.
12105        tool_specified="$TR"
12106        tool_basename="${tool_specified##*/}"
12107        if test "x$tool_basename" = "x$tool_specified"; then
12108          # A command without a complete path is provided, search $PATH.
12109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12110$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12111          # Extract the first word of "$tool_basename", so it can be a program name with args.
12112set dummy $tool_basename; ac_word=$2
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12114$as_echo_n "checking for $ac_word... " >&6; }
12115if ${ac_cv_path_TR+:} false; then :
12116  $as_echo_n "(cached) " >&6
12117else
12118  case $TR in
12119  [\\/]* | ?:[\\/]*)
12120  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12121  ;;
12122  *)
12123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12124for as_dir in $PATH
12125do
12126  IFS=$as_save_IFS
12127  test -z "$as_dir" && as_dir=.
12128    for ac_exec_ext in '' $ac_executable_extensions; do
12129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12130    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12132    break 2
12133  fi
12134done
12135  done
12136IFS=$as_save_IFS
12137
12138  ;;
12139esac
12140fi
12141TR=$ac_cv_path_TR
12142if test -n "$TR"; then
12143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12144$as_echo "$TR" >&6; }
12145else
12146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147$as_echo "no" >&6; }
12148fi
12149
12150
12151          if test "x$TR" = x; then
12152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12153          fi
12154        else
12155          # Otherwise we believe it is a complete path. Use it as it is.
12156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12157$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12159$as_echo_n "checking for TR... " >&6; }
12160          if test ! -x "$tool_specified"; then
12161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12162$as_echo "not found" >&6; }
12163            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12164          fi
12165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12166$as_echo "$tool_specified" >&6; }
12167        fi
12168      fi
12169    fi
12170
12171  fi
12172
12173
12174
12175  if test "x$TR" = x; then
12176    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12177  fi
12178
12179
12180
12181
12182
12183  # Publish this variable in the help.
12184
12185
12186  if [ -z "${UNAME+x}" ]; then
12187    # The variable is not set by user, try to locate tool using the code snippet
12188    for ac_prog in uname
12189do
12190  # Extract the first word of "$ac_prog", so it can be a program name with args.
12191set dummy $ac_prog; ac_word=$2
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12193$as_echo_n "checking for $ac_word... " >&6; }
12194if ${ac_cv_path_UNAME+:} false; then :
12195  $as_echo_n "(cached) " >&6
12196else
12197  case $UNAME in
12198  [\\/]* | ?:[\\/]*)
12199  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12200  ;;
12201  *)
12202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12203for as_dir in $PATH
12204do
12205  IFS=$as_save_IFS
12206  test -z "$as_dir" && as_dir=.
12207    for ac_exec_ext in '' $ac_executable_extensions; do
12208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12209    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12211    break 2
12212  fi
12213done
12214  done
12215IFS=$as_save_IFS
12216
12217  ;;
12218esac
12219fi
12220UNAME=$ac_cv_path_UNAME
12221if test -n "$UNAME"; then
12222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12223$as_echo "$UNAME" >&6; }
12224else
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12226$as_echo "no" >&6; }
12227fi
12228
12229
12230  test -n "$UNAME" && break
12231done
12232
12233  else
12234    # The variable is set, but is it from the command line or the environment?
12235
12236    # Try to remove the string !UNAME! from our list.
12237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12239      # If it failed, the variable was not from the command line. Ignore it,
12240      # but warn the user (except for BASH, which is always set by the calling BASH).
12241      if test "xUNAME" != xBASH; then
12242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12243$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12244      fi
12245      # Try to locate tool using the code snippet
12246      for ac_prog in uname
12247do
12248  # Extract the first word of "$ac_prog", so it can be a program name with args.
12249set dummy $ac_prog; ac_word=$2
12250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12251$as_echo_n "checking for $ac_word... " >&6; }
12252if ${ac_cv_path_UNAME+:} false; then :
12253  $as_echo_n "(cached) " >&6
12254else
12255  case $UNAME in
12256  [\\/]* | ?:[\\/]*)
12257  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12258  ;;
12259  *)
12260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12261for as_dir in $PATH
12262do
12263  IFS=$as_save_IFS
12264  test -z "$as_dir" && as_dir=.
12265    for ac_exec_ext in '' $ac_executable_extensions; do
12266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12267    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12269    break 2
12270  fi
12271done
12272  done
12273IFS=$as_save_IFS
12274
12275  ;;
12276esac
12277fi
12278UNAME=$ac_cv_path_UNAME
12279if test -n "$UNAME"; then
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12281$as_echo "$UNAME" >&6; }
12282else
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12284$as_echo "no" >&6; }
12285fi
12286
12287
12288  test -n "$UNAME" && break
12289done
12290
12291    else
12292      # If it succeeded, then it was overridden by the user. We will use it
12293      # for the tool.
12294
12295      # First remove it from the list of overridden variables, so we can test
12296      # for unknown variables in the end.
12297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12298
12299      # Check if we try to supply an empty value
12300      if test "x$UNAME" = x; then
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12302$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12304$as_echo_n "checking for UNAME... " >&6; }
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12306$as_echo "disabled" >&6; }
12307      else
12308        # Check if the provided tool contains a complete path.
12309        tool_specified="$UNAME"
12310        tool_basename="${tool_specified##*/}"
12311        if test "x$tool_basename" = "x$tool_specified"; then
12312          # A command without a complete path is provided, search $PATH.
12313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12314$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12315          # Extract the first word of "$tool_basename", so it can be a program name with args.
12316set dummy $tool_basename; ac_word=$2
12317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12318$as_echo_n "checking for $ac_word... " >&6; }
12319if ${ac_cv_path_UNAME+:} false; then :
12320  $as_echo_n "(cached) " >&6
12321else
12322  case $UNAME in
12323  [\\/]* | ?:[\\/]*)
12324  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12325  ;;
12326  *)
12327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12328for as_dir in $PATH
12329do
12330  IFS=$as_save_IFS
12331  test -z "$as_dir" && as_dir=.
12332    for ac_exec_ext in '' $ac_executable_extensions; do
12333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12334    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12336    break 2
12337  fi
12338done
12339  done
12340IFS=$as_save_IFS
12341
12342  ;;
12343esac
12344fi
12345UNAME=$ac_cv_path_UNAME
12346if test -n "$UNAME"; then
12347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12348$as_echo "$UNAME" >&6; }
12349else
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
12352fi
12353
12354
12355          if test "x$UNAME" = x; then
12356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12357          fi
12358        else
12359          # Otherwise we believe it is a complete path. Use it as it is.
12360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12361$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12363$as_echo_n "checking for UNAME... " >&6; }
12364          if test ! -x "$tool_specified"; then
12365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12366$as_echo "not found" >&6; }
12367            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12368          fi
12369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12370$as_echo "$tool_specified" >&6; }
12371        fi
12372      fi
12373    fi
12374
12375  fi
12376
12377
12378
12379  if test "x$UNAME" = x; then
12380    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12381  fi
12382
12383
12384
12385
12386
12387  # Publish this variable in the help.
12388
12389
12390  if [ -z "${UNIQ+x}" ]; then
12391    # The variable is not set by user, try to locate tool using the code snippet
12392    for ac_prog in uniq
12393do
12394  # Extract the first word of "$ac_prog", so it can be a program name with args.
12395set dummy $ac_prog; ac_word=$2
12396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12397$as_echo_n "checking for $ac_word... " >&6; }
12398if ${ac_cv_path_UNIQ+:} false; then :
12399  $as_echo_n "(cached) " >&6
12400else
12401  case $UNIQ in
12402  [\\/]* | ?:[\\/]*)
12403  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12404  ;;
12405  *)
12406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12407for as_dir in $PATH
12408do
12409  IFS=$as_save_IFS
12410  test -z "$as_dir" && as_dir=.
12411    for ac_exec_ext in '' $ac_executable_extensions; do
12412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12413    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12415    break 2
12416  fi
12417done
12418  done
12419IFS=$as_save_IFS
12420
12421  ;;
12422esac
12423fi
12424UNIQ=$ac_cv_path_UNIQ
12425if test -n "$UNIQ"; then
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12427$as_echo "$UNIQ" >&6; }
12428else
12429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12430$as_echo "no" >&6; }
12431fi
12432
12433
12434  test -n "$UNIQ" && break
12435done
12436
12437  else
12438    # The variable is set, but is it from the command line or the environment?
12439
12440    # Try to remove the string !UNIQ! from our list.
12441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12443      # If it failed, the variable was not from the command line. Ignore it,
12444      # but warn the user (except for BASH, which is always set by the calling BASH).
12445      if test "xUNIQ" != xBASH; then
12446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12447$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12448      fi
12449      # Try to locate tool using the code snippet
12450      for ac_prog in uniq
12451do
12452  # Extract the first word of "$ac_prog", so it can be a program name with args.
12453set dummy $ac_prog; ac_word=$2
12454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455$as_echo_n "checking for $ac_word... " >&6; }
12456if ${ac_cv_path_UNIQ+:} false; then :
12457  $as_echo_n "(cached) " >&6
12458else
12459  case $UNIQ in
12460  [\\/]* | ?:[\\/]*)
12461  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12462  ;;
12463  *)
12464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465for as_dir in $PATH
12466do
12467  IFS=$as_save_IFS
12468  test -z "$as_dir" && as_dir=.
12469    for ac_exec_ext in '' $ac_executable_extensions; do
12470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12471    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473    break 2
12474  fi
12475done
12476  done
12477IFS=$as_save_IFS
12478
12479  ;;
12480esac
12481fi
12482UNIQ=$ac_cv_path_UNIQ
12483if test -n "$UNIQ"; then
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12485$as_echo "$UNIQ" >&6; }
12486else
12487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
12489fi
12490
12491
12492  test -n "$UNIQ" && break
12493done
12494
12495    else
12496      # If it succeeded, then it was overridden by the user. We will use it
12497      # for the tool.
12498
12499      # First remove it from the list of overridden variables, so we can test
12500      # for unknown variables in the end.
12501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12502
12503      # Check if we try to supply an empty value
12504      if test "x$UNIQ" = x; then
12505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12506$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12508$as_echo_n "checking for UNIQ... " >&6; }
12509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12510$as_echo "disabled" >&6; }
12511      else
12512        # Check if the provided tool contains a complete path.
12513        tool_specified="$UNIQ"
12514        tool_basename="${tool_specified##*/}"
12515        if test "x$tool_basename" = "x$tool_specified"; then
12516          # A command without a complete path is provided, search $PATH.
12517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12518$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12519          # Extract the first word of "$tool_basename", so it can be a program name with args.
12520set dummy $tool_basename; ac_word=$2
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12522$as_echo_n "checking for $ac_word... " >&6; }
12523if ${ac_cv_path_UNIQ+:} false; then :
12524  $as_echo_n "(cached) " >&6
12525else
12526  case $UNIQ in
12527  [\\/]* | ?:[\\/]*)
12528  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12529  ;;
12530  *)
12531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12532for as_dir in $PATH
12533do
12534  IFS=$as_save_IFS
12535  test -z "$as_dir" && as_dir=.
12536    for ac_exec_ext in '' $ac_executable_extensions; do
12537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12538    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12540    break 2
12541  fi
12542done
12543  done
12544IFS=$as_save_IFS
12545
12546  ;;
12547esac
12548fi
12549UNIQ=$ac_cv_path_UNIQ
12550if test -n "$UNIQ"; then
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12552$as_echo "$UNIQ" >&6; }
12553else
12554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12555$as_echo "no" >&6; }
12556fi
12557
12558
12559          if test "x$UNIQ" = x; then
12560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12561          fi
12562        else
12563          # Otherwise we believe it is a complete path. Use it as it is.
12564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12565$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12567$as_echo_n "checking for UNIQ... " >&6; }
12568          if test ! -x "$tool_specified"; then
12569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12570$as_echo "not found" >&6; }
12571            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12572          fi
12573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12574$as_echo "$tool_specified" >&6; }
12575        fi
12576      fi
12577    fi
12578
12579  fi
12580
12581
12582
12583  if test "x$UNIQ" = x; then
12584    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12585  fi
12586
12587
12588
12589
12590
12591  # Publish this variable in the help.
12592
12593
12594  if [ -z "${WC+x}" ]; then
12595    # The variable is not set by user, try to locate tool using the code snippet
12596    for ac_prog in wc
12597do
12598  # Extract the first word of "$ac_prog", so it can be a program name with args.
12599set dummy $ac_prog; ac_word=$2
12600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12601$as_echo_n "checking for $ac_word... " >&6; }
12602if ${ac_cv_path_WC+:} false; then :
12603  $as_echo_n "(cached) " >&6
12604else
12605  case $WC in
12606  [\\/]* | ?:[\\/]*)
12607  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12608  ;;
12609  *)
12610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12611for as_dir in $PATH
12612do
12613  IFS=$as_save_IFS
12614  test -z "$as_dir" && as_dir=.
12615    for ac_exec_ext in '' $ac_executable_extensions; do
12616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12617    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12619    break 2
12620  fi
12621done
12622  done
12623IFS=$as_save_IFS
12624
12625  ;;
12626esac
12627fi
12628WC=$ac_cv_path_WC
12629if test -n "$WC"; then
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12631$as_echo "$WC" >&6; }
12632else
12633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12634$as_echo "no" >&6; }
12635fi
12636
12637
12638  test -n "$WC" && break
12639done
12640
12641  else
12642    # The variable is set, but is it from the command line or the environment?
12643
12644    # Try to remove the string !WC! from our list.
12645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12647      # If it failed, the variable was not from the command line. Ignore it,
12648      # but warn the user (except for BASH, which is always set by the calling BASH).
12649      if test "xWC" != xBASH; then
12650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12651$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12652      fi
12653      # Try to locate tool using the code snippet
12654      for ac_prog in wc
12655do
12656  # Extract the first word of "$ac_prog", so it can be a program name with args.
12657set dummy $ac_prog; ac_word=$2
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12659$as_echo_n "checking for $ac_word... " >&6; }
12660if ${ac_cv_path_WC+:} false; then :
12661  $as_echo_n "(cached) " >&6
12662else
12663  case $WC in
12664  [\\/]* | ?:[\\/]*)
12665  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12666  ;;
12667  *)
12668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12669for as_dir in $PATH
12670do
12671  IFS=$as_save_IFS
12672  test -z "$as_dir" && as_dir=.
12673    for ac_exec_ext in '' $ac_executable_extensions; do
12674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12675    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12677    break 2
12678  fi
12679done
12680  done
12681IFS=$as_save_IFS
12682
12683  ;;
12684esac
12685fi
12686WC=$ac_cv_path_WC
12687if test -n "$WC"; then
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12689$as_echo "$WC" >&6; }
12690else
12691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12692$as_echo "no" >&6; }
12693fi
12694
12695
12696  test -n "$WC" && break
12697done
12698
12699    else
12700      # If it succeeded, then it was overridden by the user. We will use it
12701      # for the tool.
12702
12703      # First remove it from the list of overridden variables, so we can test
12704      # for unknown variables in the end.
12705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12706
12707      # Check if we try to supply an empty value
12708      if test "x$WC" = x; then
12709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12710$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12712$as_echo_n "checking for WC... " >&6; }
12713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12714$as_echo "disabled" >&6; }
12715      else
12716        # Check if the provided tool contains a complete path.
12717        tool_specified="$WC"
12718        tool_basename="${tool_specified##*/}"
12719        if test "x$tool_basename" = "x$tool_specified"; then
12720          # A command without a complete path is provided, search $PATH.
12721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12722$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12723          # Extract the first word of "$tool_basename", so it can be a program name with args.
12724set dummy $tool_basename; ac_word=$2
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12726$as_echo_n "checking for $ac_word... " >&6; }
12727if ${ac_cv_path_WC+:} false; then :
12728  $as_echo_n "(cached) " >&6
12729else
12730  case $WC in
12731  [\\/]* | ?:[\\/]*)
12732  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12733  ;;
12734  *)
12735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12736for as_dir in $PATH
12737do
12738  IFS=$as_save_IFS
12739  test -z "$as_dir" && as_dir=.
12740    for ac_exec_ext in '' $ac_executable_extensions; do
12741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12742    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12744    break 2
12745  fi
12746done
12747  done
12748IFS=$as_save_IFS
12749
12750  ;;
12751esac
12752fi
12753WC=$ac_cv_path_WC
12754if test -n "$WC"; then
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12756$as_echo "$WC" >&6; }
12757else
12758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12759$as_echo "no" >&6; }
12760fi
12761
12762
12763          if test "x$WC" = x; then
12764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12765          fi
12766        else
12767          # Otherwise we believe it is a complete path. Use it as it is.
12768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12769$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12771$as_echo_n "checking for WC... " >&6; }
12772          if test ! -x "$tool_specified"; then
12773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12774$as_echo "not found" >&6; }
12775            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12776          fi
12777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12778$as_echo "$tool_specified" >&6; }
12779        fi
12780      fi
12781    fi
12782
12783  fi
12784
12785
12786
12787  if test "x$WC" = x; then
12788    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12789  fi
12790
12791
12792
12793
12794
12795  # Publish this variable in the help.
12796
12797
12798  if [ -z "${WHICH+x}" ]; then
12799    # The variable is not set by user, try to locate tool using the code snippet
12800    for ac_prog in which
12801do
12802  # Extract the first word of "$ac_prog", so it can be a program name with args.
12803set dummy $ac_prog; ac_word=$2
12804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12805$as_echo_n "checking for $ac_word... " >&6; }
12806if ${ac_cv_path_WHICH+:} false; then :
12807  $as_echo_n "(cached) " >&6
12808else
12809  case $WHICH in
12810  [\\/]* | ?:[\\/]*)
12811  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12812  ;;
12813  *)
12814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12815for as_dir in $PATH
12816do
12817  IFS=$as_save_IFS
12818  test -z "$as_dir" && as_dir=.
12819    for ac_exec_ext in '' $ac_executable_extensions; do
12820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12821    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12823    break 2
12824  fi
12825done
12826  done
12827IFS=$as_save_IFS
12828
12829  ;;
12830esac
12831fi
12832WHICH=$ac_cv_path_WHICH
12833if test -n "$WHICH"; then
12834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12835$as_echo "$WHICH" >&6; }
12836else
12837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12838$as_echo "no" >&6; }
12839fi
12840
12841
12842  test -n "$WHICH" && break
12843done
12844
12845  else
12846    # The variable is set, but is it from the command line or the environment?
12847
12848    # Try to remove the string !WHICH! from our list.
12849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12851      # If it failed, the variable was not from the command line. Ignore it,
12852      # but warn the user (except for BASH, which is always set by the calling BASH).
12853      if test "xWHICH" != xBASH; then
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12855$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12856      fi
12857      # Try to locate tool using the code snippet
12858      for ac_prog in which
12859do
12860  # Extract the first word of "$ac_prog", so it can be a program name with args.
12861set dummy $ac_prog; ac_word=$2
12862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12863$as_echo_n "checking for $ac_word... " >&6; }
12864if ${ac_cv_path_WHICH+:} false; then :
12865  $as_echo_n "(cached) " >&6
12866else
12867  case $WHICH in
12868  [\\/]* | ?:[\\/]*)
12869  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12870  ;;
12871  *)
12872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12873for as_dir in $PATH
12874do
12875  IFS=$as_save_IFS
12876  test -z "$as_dir" && as_dir=.
12877    for ac_exec_ext in '' $ac_executable_extensions; do
12878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12879    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12881    break 2
12882  fi
12883done
12884  done
12885IFS=$as_save_IFS
12886
12887  ;;
12888esac
12889fi
12890WHICH=$ac_cv_path_WHICH
12891if test -n "$WHICH"; then
12892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12893$as_echo "$WHICH" >&6; }
12894else
12895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12896$as_echo "no" >&6; }
12897fi
12898
12899
12900  test -n "$WHICH" && break
12901done
12902
12903    else
12904      # If it succeeded, then it was overridden by the user. We will use it
12905      # for the tool.
12906
12907      # First remove it from the list of overridden variables, so we can test
12908      # for unknown variables in the end.
12909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12910
12911      # Check if we try to supply an empty value
12912      if test "x$WHICH" = x; then
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12914$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12916$as_echo_n "checking for WHICH... " >&6; }
12917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12918$as_echo "disabled" >&6; }
12919      else
12920        # Check if the provided tool contains a complete path.
12921        tool_specified="$WHICH"
12922        tool_basename="${tool_specified##*/}"
12923        if test "x$tool_basename" = "x$tool_specified"; then
12924          # A command without a complete path is provided, search $PATH.
12925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12926$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12927          # Extract the first word of "$tool_basename", so it can be a program name with args.
12928set dummy $tool_basename; ac_word=$2
12929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12930$as_echo_n "checking for $ac_word... " >&6; }
12931if ${ac_cv_path_WHICH+:} false; then :
12932  $as_echo_n "(cached) " >&6
12933else
12934  case $WHICH in
12935  [\\/]* | ?:[\\/]*)
12936  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12937  ;;
12938  *)
12939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12940for as_dir in $PATH
12941do
12942  IFS=$as_save_IFS
12943  test -z "$as_dir" && as_dir=.
12944    for ac_exec_ext in '' $ac_executable_extensions; do
12945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12946    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12948    break 2
12949  fi
12950done
12951  done
12952IFS=$as_save_IFS
12953
12954  ;;
12955esac
12956fi
12957WHICH=$ac_cv_path_WHICH
12958if test -n "$WHICH"; then
12959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12960$as_echo "$WHICH" >&6; }
12961else
12962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12963$as_echo "no" >&6; }
12964fi
12965
12966
12967          if test "x$WHICH" = x; then
12968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12969          fi
12970        else
12971          # Otherwise we believe it is a complete path. Use it as it is.
12972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12973$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12975$as_echo_n "checking for WHICH... " >&6; }
12976          if test ! -x "$tool_specified"; then
12977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12978$as_echo "not found" >&6; }
12979            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12980          fi
12981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12982$as_echo "$tool_specified" >&6; }
12983        fi
12984      fi
12985    fi
12986
12987  fi
12988
12989
12990
12991  if test "x$WHICH" = x; then
12992    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12993  fi
12994
12995
12996
12997
12998
12999  # Publish this variable in the help.
13000
13001
13002  if [ -z "${XARGS+x}" ]; then
13003    # The variable is not set by user, try to locate tool using the code snippet
13004    for ac_prog in xargs
13005do
13006  # Extract the first word of "$ac_prog", so it can be a program name with args.
13007set dummy $ac_prog; ac_word=$2
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13009$as_echo_n "checking for $ac_word... " >&6; }
13010if ${ac_cv_path_XARGS+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  case $XARGS in
13014  [\\/]* | ?:[\\/]*)
13015  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13016  ;;
13017  *)
13018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  test -z "$as_dir" && as_dir=.
13023    for ac_exec_ext in '' $ac_executable_extensions; do
13024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13025    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13027    break 2
13028  fi
13029done
13030  done
13031IFS=$as_save_IFS
13032
13033  ;;
13034esac
13035fi
13036XARGS=$ac_cv_path_XARGS
13037if test -n "$XARGS"; then
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13039$as_echo "$XARGS" >&6; }
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044
13045
13046  test -n "$XARGS" && break
13047done
13048
13049  else
13050    # The variable is set, but is it from the command line or the environment?
13051
13052    # Try to remove the string !XARGS! from our list.
13053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13055      # If it failed, the variable was not from the command line. Ignore it,
13056      # but warn the user (except for BASH, which is always set by the calling BASH).
13057      if test "xXARGS" != xBASH; then
13058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13059$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13060      fi
13061      # Try to locate tool using the code snippet
13062      for ac_prog in xargs
13063do
13064  # Extract the first word of "$ac_prog", so it can be a program name with args.
13065set dummy $ac_prog; ac_word=$2
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067$as_echo_n "checking for $ac_word... " >&6; }
13068if ${ac_cv_path_XARGS+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $XARGS in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
13079  IFS=$as_save_IFS
13080  test -z "$as_dir" && as_dir=.
13081    for ac_exec_ext in '' $ac_executable_extensions; do
13082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085    break 2
13086  fi
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094XARGS=$ac_cv_path_XARGS
13095if test -n "$XARGS"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13097$as_echo "$XARGS" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104  test -n "$XARGS" && break
13105done
13106
13107    else
13108      # If it succeeded, then it was overridden by the user. We will use it
13109      # for the tool.
13110
13111      # First remove it from the list of overridden variables, so we can test
13112      # for unknown variables in the end.
13113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13114
13115      # Check if we try to supply an empty value
13116      if test "x$XARGS" = x; then
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13118$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13120$as_echo_n "checking for XARGS... " >&6; }
13121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13122$as_echo "disabled" >&6; }
13123      else
13124        # Check if the provided tool contains a complete path.
13125        tool_specified="$XARGS"
13126        tool_basename="${tool_specified##*/}"
13127        if test "x$tool_basename" = "x$tool_specified"; then
13128          # A command without a complete path is provided, search $PATH.
13129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13130$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13131          # Extract the first word of "$tool_basename", so it can be a program name with args.
13132set dummy $tool_basename; ac_word=$2
13133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13134$as_echo_n "checking for $ac_word... " >&6; }
13135if ${ac_cv_path_XARGS+:} false; then :
13136  $as_echo_n "(cached) " >&6
13137else
13138  case $XARGS in
13139  [\\/]* | ?:[\\/]*)
13140  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13141  ;;
13142  *)
13143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13144for as_dir in $PATH
13145do
13146  IFS=$as_save_IFS
13147  test -z "$as_dir" && as_dir=.
13148    for ac_exec_ext in '' $ac_executable_extensions; do
13149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13150    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13152    break 2
13153  fi
13154done
13155  done
13156IFS=$as_save_IFS
13157
13158  ;;
13159esac
13160fi
13161XARGS=$ac_cv_path_XARGS
13162if test -n "$XARGS"; then
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13164$as_echo "$XARGS" >&6; }
13165else
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13167$as_echo "no" >&6; }
13168fi
13169
13170
13171          if test "x$XARGS" = x; then
13172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13173          fi
13174        else
13175          # Otherwise we believe it is a complete path. Use it as it is.
13176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13177$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13179$as_echo_n "checking for XARGS... " >&6; }
13180          if test ! -x "$tool_specified"; then
13181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13182$as_echo "not found" >&6; }
13183            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13184          fi
13185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13186$as_echo "$tool_specified" >&6; }
13187        fi
13188      fi
13189    fi
13190
13191  fi
13192
13193
13194
13195  if test "x$XARGS" = x; then
13196    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13197  fi
13198
13199
13200
13201  # Then required tools that require some special treatment.
13202
13203
13204  # Publish this variable in the help.
13205
13206
13207  if [ -z "${AWK+x}" ]; then
13208    # The variable is not set by user, try to locate tool using the code snippet
13209    for ac_prog in gawk mawk nawk awk
13210do
13211  # Extract the first word of "$ac_prog", so it can be a program name with args.
13212set dummy $ac_prog; ac_word=$2
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13214$as_echo_n "checking for $ac_word... " >&6; }
13215if ${ac_cv_prog_AWK+:} false; then :
13216  $as_echo_n "(cached) " >&6
13217else
13218  if test -n "$AWK"; then
13219  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13220else
13221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13222for as_dir in $PATH
13223do
13224  IFS=$as_save_IFS
13225  test -z "$as_dir" && as_dir=.
13226    for ac_exec_ext in '' $ac_executable_extensions; do
13227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13228    ac_cv_prog_AWK="$ac_prog"
13229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13230    break 2
13231  fi
13232done
13233  done
13234IFS=$as_save_IFS
13235
13236fi
13237fi
13238AWK=$ac_cv_prog_AWK
13239if test -n "$AWK"; then
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13241$as_echo "$AWK" >&6; }
13242else
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13244$as_echo "no" >&6; }
13245fi
13246
13247
13248  test -n "$AWK" && break
13249done
13250
13251  else
13252    # The variable is set, but is it from the command line or the environment?
13253
13254    # Try to remove the string !AWK! from our list.
13255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13257      # If it failed, the variable was not from the command line. Ignore it,
13258      # but warn the user (except for BASH, which is always set by the calling BASH).
13259      if test "xAWK" != xBASH; then
13260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13261$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13262      fi
13263      # Try to locate tool using the code snippet
13264      for ac_prog in gawk mawk nawk awk
13265do
13266  # Extract the first word of "$ac_prog", so it can be a program name with args.
13267set dummy $ac_prog; ac_word=$2
13268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13269$as_echo_n "checking for $ac_word... " >&6; }
13270if ${ac_cv_prog_AWK+:} false; then :
13271  $as_echo_n "(cached) " >&6
13272else
13273  if test -n "$AWK"; then
13274  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13275else
13276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13277for as_dir in $PATH
13278do
13279  IFS=$as_save_IFS
13280  test -z "$as_dir" && as_dir=.
13281    for ac_exec_ext in '' $ac_executable_extensions; do
13282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13283    ac_cv_prog_AWK="$ac_prog"
13284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13285    break 2
13286  fi
13287done
13288  done
13289IFS=$as_save_IFS
13290
13291fi
13292fi
13293AWK=$ac_cv_prog_AWK
13294if test -n "$AWK"; then
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13296$as_echo "$AWK" >&6; }
13297else
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299$as_echo "no" >&6; }
13300fi
13301
13302
13303  test -n "$AWK" && break
13304done
13305
13306    else
13307      # If it succeeded, then it was overridden by the user. We will use it
13308      # for the tool.
13309
13310      # First remove it from the list of overridden variables, so we can test
13311      # for unknown variables in the end.
13312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13313
13314      # Check if we try to supply an empty value
13315      if test "x$AWK" = x; then
13316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13317$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13319$as_echo_n "checking for AWK... " >&6; }
13320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13321$as_echo "disabled" >&6; }
13322      else
13323        # Check if the provided tool contains a complete path.
13324        tool_specified="$AWK"
13325        tool_basename="${tool_specified##*/}"
13326        if test "x$tool_basename" = "x$tool_specified"; then
13327          # A command without a complete path is provided, search $PATH.
13328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13329$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13330          # Extract the first word of "$tool_basename", so it can be a program name with args.
13331set dummy $tool_basename; ac_word=$2
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13333$as_echo_n "checking for $ac_word... " >&6; }
13334if ${ac_cv_path_AWK+:} false; then :
13335  $as_echo_n "(cached) " >&6
13336else
13337  case $AWK in
13338  [\\/]* | ?:[\\/]*)
13339  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13340  ;;
13341  *)
13342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13343for as_dir in $PATH
13344do
13345  IFS=$as_save_IFS
13346  test -z "$as_dir" && as_dir=.
13347    for ac_exec_ext in '' $ac_executable_extensions; do
13348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13349    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13351    break 2
13352  fi
13353done
13354  done
13355IFS=$as_save_IFS
13356
13357  ;;
13358esac
13359fi
13360AWK=$ac_cv_path_AWK
13361if test -n "$AWK"; then
13362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13363$as_echo "$AWK" >&6; }
13364else
13365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13366$as_echo "no" >&6; }
13367fi
13368
13369
13370          if test "x$AWK" = x; then
13371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13372          fi
13373        else
13374          # Otherwise we believe it is a complete path. Use it as it is.
13375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13376$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13378$as_echo_n "checking for AWK... " >&6; }
13379          if test ! -x "$tool_specified"; then
13380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13381$as_echo "not found" >&6; }
13382            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13383          fi
13384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13385$as_echo "$tool_specified" >&6; }
13386        fi
13387      fi
13388    fi
13389
13390  fi
13391
13392
13393  if test "x$AWK" = x; then
13394    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13395  fi
13396
13397
13398
13399
13400  # Publish this variable in the help.
13401
13402
13403  if [ -z "${GREP+x}" ]; then
13404    # The variable is not set by user, try to locate tool using the code snippet
13405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13406$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13407if ${ac_cv_path_GREP+:} false; then :
13408  $as_echo_n "(cached) " >&6
13409else
13410  if test -z "$GREP"; then
13411  ac_path_GREP_found=false
13412  # Loop through the user's path and test for each of PROGNAME-LIST
13413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13414for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13415do
13416  IFS=$as_save_IFS
13417  test -z "$as_dir" && as_dir=.
13418    for ac_prog in grep ggrep; do
13419    for ac_exec_ext in '' $ac_executable_extensions; do
13420      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13421      as_fn_executable_p "$ac_path_GREP" || continue
13422# Check for GNU ac_path_GREP and select it if it is found.
13423  # Check for GNU $ac_path_GREP
13424case `"$ac_path_GREP" --version 2>&1` in
13425*GNU*)
13426  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13427*)
13428  ac_count=0
13429  $as_echo_n 0123456789 >"conftest.in"
13430  while :
13431  do
13432    cat "conftest.in" "conftest.in" >"conftest.tmp"
13433    mv "conftest.tmp" "conftest.in"
13434    cp "conftest.in" "conftest.nl"
13435    $as_echo 'GREP' >> "conftest.nl"
13436    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13437    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13438    as_fn_arith $ac_count + 1 && ac_count=$as_val
13439    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13440      # Best one so far, save it but keep looking for a better one
13441      ac_cv_path_GREP="$ac_path_GREP"
13442      ac_path_GREP_max=$ac_count
13443    fi
13444    # 10*(2^10) chars as input seems more than enough
13445    test $ac_count -gt 10 && break
13446  done
13447  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13448esac
13449
13450      $ac_path_GREP_found && break 3
13451    done
13452  done
13453  done
13454IFS=$as_save_IFS
13455  if test -z "$ac_cv_path_GREP"; then
13456    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13457  fi
13458else
13459  ac_cv_path_GREP=$GREP
13460fi
13461
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13464$as_echo "$ac_cv_path_GREP" >&6; }
13465 GREP="$ac_cv_path_GREP"
13466
13467
13468  else
13469    # The variable is set, but is it from the command line or the environment?
13470
13471    # Try to remove the string !GREP! from our list.
13472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13474      # If it failed, the variable was not from the command line. Ignore it,
13475      # but warn the user (except for BASH, which is always set by the calling BASH).
13476      if test "xGREP" != xBASH; then
13477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13478$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13479      fi
13480      # Try to locate tool using the code snippet
13481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13482$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13483if ${ac_cv_path_GREP+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  if test -z "$GREP"; then
13487  ac_path_GREP_found=false
13488  # Loop through the user's path and test for each of PROGNAME-LIST
13489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13490for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13491do
13492  IFS=$as_save_IFS
13493  test -z "$as_dir" && as_dir=.
13494    for ac_prog in grep ggrep; do
13495    for ac_exec_ext in '' $ac_executable_extensions; do
13496      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13497      as_fn_executable_p "$ac_path_GREP" || continue
13498# Check for GNU ac_path_GREP and select it if it is found.
13499  # Check for GNU $ac_path_GREP
13500case `"$ac_path_GREP" --version 2>&1` in
13501*GNU*)
13502  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13503*)
13504  ac_count=0
13505  $as_echo_n 0123456789 >"conftest.in"
13506  while :
13507  do
13508    cat "conftest.in" "conftest.in" >"conftest.tmp"
13509    mv "conftest.tmp" "conftest.in"
13510    cp "conftest.in" "conftest.nl"
13511    $as_echo 'GREP' >> "conftest.nl"
13512    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13513    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13514    as_fn_arith $ac_count + 1 && ac_count=$as_val
13515    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13516      # Best one so far, save it but keep looking for a better one
13517      ac_cv_path_GREP="$ac_path_GREP"
13518      ac_path_GREP_max=$ac_count
13519    fi
13520    # 10*(2^10) chars as input seems more than enough
13521    test $ac_count -gt 10 && break
13522  done
13523  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13524esac
13525
13526      $ac_path_GREP_found && break 3
13527    done
13528  done
13529  done
13530IFS=$as_save_IFS
13531  if test -z "$ac_cv_path_GREP"; then
13532    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13533  fi
13534else
13535  ac_cv_path_GREP=$GREP
13536fi
13537
13538fi
13539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13540$as_echo "$ac_cv_path_GREP" >&6; }
13541 GREP="$ac_cv_path_GREP"
13542
13543
13544    else
13545      # If it succeeded, then it was overridden by the user. We will use it
13546      # for the tool.
13547
13548      # First remove it from the list of overridden variables, so we can test
13549      # for unknown variables in the end.
13550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13551
13552      # Check if we try to supply an empty value
13553      if test "x$GREP" = x; then
13554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13555$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13557$as_echo_n "checking for GREP... " >&6; }
13558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13559$as_echo "disabled" >&6; }
13560      else
13561        # Check if the provided tool contains a complete path.
13562        tool_specified="$GREP"
13563        tool_basename="${tool_specified##*/}"
13564        if test "x$tool_basename" = "x$tool_specified"; then
13565          # A command without a complete path is provided, search $PATH.
13566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13567$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13568          # Extract the first word of "$tool_basename", so it can be a program name with args.
13569set dummy $tool_basename; ac_word=$2
13570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13571$as_echo_n "checking for $ac_word... " >&6; }
13572if ${ac_cv_path_GREP+:} false; then :
13573  $as_echo_n "(cached) " >&6
13574else
13575  case $GREP in
13576  [\\/]* | ?:[\\/]*)
13577  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13578  ;;
13579  *)
13580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13581for as_dir in $PATH
13582do
13583  IFS=$as_save_IFS
13584  test -z "$as_dir" && as_dir=.
13585    for ac_exec_ext in '' $ac_executable_extensions; do
13586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13587    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13589    break 2
13590  fi
13591done
13592  done
13593IFS=$as_save_IFS
13594
13595  ;;
13596esac
13597fi
13598GREP=$ac_cv_path_GREP
13599if test -n "$GREP"; then
13600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13601$as_echo "$GREP" >&6; }
13602else
13603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13604$as_echo "no" >&6; }
13605fi
13606
13607
13608          if test "x$GREP" = x; then
13609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13610          fi
13611        else
13612          # Otherwise we believe it is a complete path. Use it as it is.
13613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13614$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13616$as_echo_n "checking for GREP... " >&6; }
13617          if test ! -x "$tool_specified"; then
13618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13619$as_echo "not found" >&6; }
13620            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13621          fi
13622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13623$as_echo "$tool_specified" >&6; }
13624        fi
13625      fi
13626    fi
13627
13628  fi
13629
13630
13631  if test "x$GREP" = x; then
13632    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13633  fi
13634
13635
13636
13637
13638  # Publish this variable in the help.
13639
13640
13641  if [ -z "${EGREP+x}" ]; then
13642    # The variable is not set by user, try to locate tool using the code snippet
13643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13644$as_echo_n "checking for egrep... " >&6; }
13645if ${ac_cv_path_EGREP+:} false; then :
13646  $as_echo_n "(cached) " >&6
13647else
13648  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13649   then ac_cv_path_EGREP="$GREP -E"
13650   else
13651     if test -z "$EGREP"; then
13652  ac_path_EGREP_found=false
13653  # Loop through the user's path and test for each of PROGNAME-LIST
13654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13656do
13657  IFS=$as_save_IFS
13658  test -z "$as_dir" && as_dir=.
13659    for ac_prog in egrep; do
13660    for ac_exec_ext in '' $ac_executable_extensions; do
13661      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13662      as_fn_executable_p "$ac_path_EGREP" || continue
13663# Check for GNU ac_path_EGREP and select it if it is found.
13664  # Check for GNU $ac_path_EGREP
13665case `"$ac_path_EGREP" --version 2>&1` in
13666*GNU*)
13667  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13668*)
13669  ac_count=0
13670  $as_echo_n 0123456789 >"conftest.in"
13671  while :
13672  do
13673    cat "conftest.in" "conftest.in" >"conftest.tmp"
13674    mv "conftest.tmp" "conftest.in"
13675    cp "conftest.in" "conftest.nl"
13676    $as_echo 'EGREP' >> "conftest.nl"
13677    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13678    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13679    as_fn_arith $ac_count + 1 && ac_count=$as_val
13680    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13681      # Best one so far, save it but keep looking for a better one
13682      ac_cv_path_EGREP="$ac_path_EGREP"
13683      ac_path_EGREP_max=$ac_count
13684    fi
13685    # 10*(2^10) chars as input seems more than enough
13686    test $ac_count -gt 10 && break
13687  done
13688  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13689esac
13690
13691      $ac_path_EGREP_found && break 3
13692    done
13693  done
13694  done
13695IFS=$as_save_IFS
13696  if test -z "$ac_cv_path_EGREP"; then
13697    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13698  fi
13699else
13700  ac_cv_path_EGREP=$EGREP
13701fi
13702
13703   fi
13704fi
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13706$as_echo "$ac_cv_path_EGREP" >&6; }
13707 EGREP="$ac_cv_path_EGREP"
13708
13709
13710  else
13711    # The variable is set, but is it from the command line or the environment?
13712
13713    # Try to remove the string !EGREP! from our list.
13714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13716      # If it failed, the variable was not from the command line. Ignore it,
13717      # but warn the user (except for BASH, which is always set by the calling BASH).
13718      if test "xEGREP" != xBASH; then
13719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13720$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13721      fi
13722      # Try to locate tool using the code snippet
13723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13724$as_echo_n "checking for egrep... " >&6; }
13725if ${ac_cv_path_EGREP+:} false; then :
13726  $as_echo_n "(cached) " >&6
13727else
13728  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13729   then ac_cv_path_EGREP="$GREP -E"
13730   else
13731     if test -z "$EGREP"; then
13732  ac_path_EGREP_found=false
13733  # Loop through the user's path and test for each of PROGNAME-LIST
13734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13735for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13736do
13737  IFS=$as_save_IFS
13738  test -z "$as_dir" && as_dir=.
13739    for ac_prog in egrep; do
13740    for ac_exec_ext in '' $ac_executable_extensions; do
13741      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13742      as_fn_executable_p "$ac_path_EGREP" || continue
13743# Check for GNU ac_path_EGREP and select it if it is found.
13744  # Check for GNU $ac_path_EGREP
13745case `"$ac_path_EGREP" --version 2>&1` in
13746*GNU*)
13747  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13748*)
13749  ac_count=0
13750  $as_echo_n 0123456789 >"conftest.in"
13751  while :
13752  do
13753    cat "conftest.in" "conftest.in" >"conftest.tmp"
13754    mv "conftest.tmp" "conftest.in"
13755    cp "conftest.in" "conftest.nl"
13756    $as_echo 'EGREP' >> "conftest.nl"
13757    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13758    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13759    as_fn_arith $ac_count + 1 && ac_count=$as_val
13760    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13761      # Best one so far, save it but keep looking for a better one
13762      ac_cv_path_EGREP="$ac_path_EGREP"
13763      ac_path_EGREP_max=$ac_count
13764    fi
13765    # 10*(2^10) chars as input seems more than enough
13766    test $ac_count -gt 10 && break
13767  done
13768  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13769esac
13770
13771      $ac_path_EGREP_found && break 3
13772    done
13773  done
13774  done
13775IFS=$as_save_IFS
13776  if test -z "$ac_cv_path_EGREP"; then
13777    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13778  fi
13779else
13780  ac_cv_path_EGREP=$EGREP
13781fi
13782
13783   fi
13784fi
13785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13786$as_echo "$ac_cv_path_EGREP" >&6; }
13787 EGREP="$ac_cv_path_EGREP"
13788
13789
13790    else
13791      # If it succeeded, then it was overridden by the user. We will use it
13792      # for the tool.
13793
13794      # First remove it from the list of overridden variables, so we can test
13795      # for unknown variables in the end.
13796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13797
13798      # Check if we try to supply an empty value
13799      if test "x$EGREP" = x; then
13800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13801$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13803$as_echo_n "checking for EGREP... " >&6; }
13804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13805$as_echo "disabled" >&6; }
13806      else
13807        # Check if the provided tool contains a complete path.
13808        tool_specified="$EGREP"
13809        tool_basename="${tool_specified##*/}"
13810        if test "x$tool_basename" = "x$tool_specified"; then
13811          # A command without a complete path is provided, search $PATH.
13812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13813$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13814          # Extract the first word of "$tool_basename", so it can be a program name with args.
13815set dummy $tool_basename; ac_word=$2
13816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13817$as_echo_n "checking for $ac_word... " >&6; }
13818if ${ac_cv_path_EGREP+:} false; then :
13819  $as_echo_n "(cached) " >&6
13820else
13821  case $EGREP in
13822  [\\/]* | ?:[\\/]*)
13823  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13824  ;;
13825  *)
13826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13827for as_dir in $PATH
13828do
13829  IFS=$as_save_IFS
13830  test -z "$as_dir" && as_dir=.
13831    for ac_exec_ext in '' $ac_executable_extensions; do
13832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13833    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13835    break 2
13836  fi
13837done
13838  done
13839IFS=$as_save_IFS
13840
13841  ;;
13842esac
13843fi
13844EGREP=$ac_cv_path_EGREP
13845if test -n "$EGREP"; then
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13847$as_echo "$EGREP" >&6; }
13848else
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13850$as_echo "no" >&6; }
13851fi
13852
13853
13854          if test "x$EGREP" = x; then
13855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13856          fi
13857        else
13858          # Otherwise we believe it is a complete path. Use it as it is.
13859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13860$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13862$as_echo_n "checking for EGREP... " >&6; }
13863          if test ! -x "$tool_specified"; then
13864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13865$as_echo "not found" >&6; }
13866            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13867          fi
13868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13869$as_echo "$tool_specified" >&6; }
13870        fi
13871      fi
13872    fi
13873
13874  fi
13875
13876
13877  if test "x$EGREP" = x; then
13878    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13879  fi
13880
13881
13882
13883
13884  # Publish this variable in the help.
13885
13886
13887  if [ -z "${FGREP+x}" ]; then
13888    # The variable is not set by user, try to locate tool using the code snippet
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13890$as_echo_n "checking for fgrep... " >&6; }
13891if ${ac_cv_path_FGREP+:} false; then :
13892  $as_echo_n "(cached) " >&6
13893else
13894  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13895   then ac_cv_path_FGREP="$GREP -F"
13896   else
13897     if test -z "$FGREP"; then
13898  ac_path_FGREP_found=false
13899  # Loop through the user's path and test for each of PROGNAME-LIST
13900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13901for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13902do
13903  IFS=$as_save_IFS
13904  test -z "$as_dir" && as_dir=.
13905    for ac_prog in fgrep; do
13906    for ac_exec_ext in '' $ac_executable_extensions; do
13907      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13908      as_fn_executable_p "$ac_path_FGREP" || continue
13909# Check for GNU ac_path_FGREP and select it if it is found.
13910  # Check for GNU $ac_path_FGREP
13911case `"$ac_path_FGREP" --version 2>&1` in
13912*GNU*)
13913  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13914*)
13915  ac_count=0
13916  $as_echo_n 0123456789 >"conftest.in"
13917  while :
13918  do
13919    cat "conftest.in" "conftest.in" >"conftest.tmp"
13920    mv "conftest.tmp" "conftest.in"
13921    cp "conftest.in" "conftest.nl"
13922    $as_echo 'FGREP' >> "conftest.nl"
13923    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13924    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13925    as_fn_arith $ac_count + 1 && ac_count=$as_val
13926    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13927      # Best one so far, save it but keep looking for a better one
13928      ac_cv_path_FGREP="$ac_path_FGREP"
13929      ac_path_FGREP_max=$ac_count
13930    fi
13931    # 10*(2^10) chars as input seems more than enough
13932    test $ac_count -gt 10 && break
13933  done
13934  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13935esac
13936
13937      $ac_path_FGREP_found && break 3
13938    done
13939  done
13940  done
13941IFS=$as_save_IFS
13942  if test -z "$ac_cv_path_FGREP"; then
13943    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13944  fi
13945else
13946  ac_cv_path_FGREP=$FGREP
13947fi
13948
13949   fi
13950fi
13951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13952$as_echo "$ac_cv_path_FGREP" >&6; }
13953 FGREP="$ac_cv_path_FGREP"
13954
13955
13956  else
13957    # The variable is set, but is it from the command line or the environment?
13958
13959    # Try to remove the string !FGREP! from our list.
13960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13962      # If it failed, the variable was not from the command line. Ignore it,
13963      # but warn the user (except for BASH, which is always set by the calling BASH).
13964      if test "xFGREP" != xBASH; then
13965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13966$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13967      fi
13968      # Try to locate tool using the code snippet
13969      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13970$as_echo_n "checking for fgrep... " >&6; }
13971if ${ac_cv_path_FGREP+:} false; then :
13972  $as_echo_n "(cached) " >&6
13973else
13974  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13975   then ac_cv_path_FGREP="$GREP -F"
13976   else
13977     if test -z "$FGREP"; then
13978  ac_path_FGREP_found=false
13979  # Loop through the user's path and test for each of PROGNAME-LIST
13980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13981for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13982do
13983  IFS=$as_save_IFS
13984  test -z "$as_dir" && as_dir=.
13985    for ac_prog in fgrep; do
13986    for ac_exec_ext in '' $ac_executable_extensions; do
13987      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13988      as_fn_executable_p "$ac_path_FGREP" || continue
13989# Check for GNU ac_path_FGREP and select it if it is found.
13990  # Check for GNU $ac_path_FGREP
13991case `"$ac_path_FGREP" --version 2>&1` in
13992*GNU*)
13993  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13994*)
13995  ac_count=0
13996  $as_echo_n 0123456789 >"conftest.in"
13997  while :
13998  do
13999    cat "conftest.in" "conftest.in" >"conftest.tmp"
14000    mv "conftest.tmp" "conftest.in"
14001    cp "conftest.in" "conftest.nl"
14002    $as_echo 'FGREP' >> "conftest.nl"
14003    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14004    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14005    as_fn_arith $ac_count + 1 && ac_count=$as_val
14006    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14007      # Best one so far, save it but keep looking for a better one
14008      ac_cv_path_FGREP="$ac_path_FGREP"
14009      ac_path_FGREP_max=$ac_count
14010    fi
14011    # 10*(2^10) chars as input seems more than enough
14012    test $ac_count -gt 10 && break
14013  done
14014  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14015esac
14016
14017      $ac_path_FGREP_found && break 3
14018    done
14019  done
14020  done
14021IFS=$as_save_IFS
14022  if test -z "$ac_cv_path_FGREP"; then
14023    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14024  fi
14025else
14026  ac_cv_path_FGREP=$FGREP
14027fi
14028
14029   fi
14030fi
14031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14032$as_echo "$ac_cv_path_FGREP" >&6; }
14033 FGREP="$ac_cv_path_FGREP"
14034
14035
14036    else
14037      # If it succeeded, then it was overridden by the user. We will use it
14038      # for the tool.
14039
14040      # First remove it from the list of overridden variables, so we can test
14041      # for unknown variables in the end.
14042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14043
14044      # Check if we try to supply an empty value
14045      if test "x$FGREP" = x; then
14046        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14047$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14049$as_echo_n "checking for FGREP... " >&6; }
14050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14051$as_echo "disabled" >&6; }
14052      else
14053        # Check if the provided tool contains a complete path.
14054        tool_specified="$FGREP"
14055        tool_basename="${tool_specified##*/}"
14056        if test "x$tool_basename" = "x$tool_specified"; then
14057          # A command without a complete path is provided, search $PATH.
14058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14059$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14060          # Extract the first word of "$tool_basename", so it can be a program name with args.
14061set dummy $tool_basename; ac_word=$2
14062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14063$as_echo_n "checking for $ac_word... " >&6; }
14064if ${ac_cv_path_FGREP+:} false; then :
14065  $as_echo_n "(cached) " >&6
14066else
14067  case $FGREP in
14068  [\\/]* | ?:[\\/]*)
14069  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14070  ;;
14071  *)
14072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14073for as_dir in $PATH
14074do
14075  IFS=$as_save_IFS
14076  test -z "$as_dir" && as_dir=.
14077    for ac_exec_ext in '' $ac_executable_extensions; do
14078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14079    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14081    break 2
14082  fi
14083done
14084  done
14085IFS=$as_save_IFS
14086
14087  ;;
14088esac
14089fi
14090FGREP=$ac_cv_path_FGREP
14091if test -n "$FGREP"; then
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14093$as_echo "$FGREP" >&6; }
14094else
14095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14096$as_echo "no" >&6; }
14097fi
14098
14099
14100          if test "x$FGREP" = x; then
14101            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14102          fi
14103        else
14104          # Otherwise we believe it is a complete path. Use it as it is.
14105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14106$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14107          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14108$as_echo_n "checking for FGREP... " >&6; }
14109          if test ! -x "$tool_specified"; then
14110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14111$as_echo "not found" >&6; }
14112            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14113          fi
14114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14115$as_echo "$tool_specified" >&6; }
14116        fi
14117      fi
14118    fi
14119
14120  fi
14121
14122
14123  if test "x$FGREP" = x; then
14124    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14125  fi
14126
14127
14128
14129
14130  # Publish this variable in the help.
14131
14132
14133  if [ -z "${SED+x}" ]; then
14134    # The variable is not set by user, try to locate tool using the code snippet
14135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14136$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14137if ${ac_cv_path_SED+:} false; then :
14138  $as_echo_n "(cached) " >&6
14139else
14140            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14141     for ac_i in 1 2 3 4 5 6 7; do
14142       ac_script="$ac_script$as_nl$ac_script"
14143     done
14144     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14145     { ac_script=; unset ac_script;}
14146     if test -z "$SED"; then
14147  ac_path_SED_found=false
14148  # Loop through the user's path and test for each of PROGNAME-LIST
14149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14150for as_dir in $PATH
14151do
14152  IFS=$as_save_IFS
14153  test -z "$as_dir" && as_dir=.
14154    for ac_prog in sed gsed; do
14155    for ac_exec_ext in '' $ac_executable_extensions; do
14156      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14157      as_fn_executable_p "$ac_path_SED" || continue
14158# Check for GNU ac_path_SED and select it if it is found.
14159  # Check for GNU $ac_path_SED
14160case `"$ac_path_SED" --version 2>&1` in
14161*GNU*)
14162  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14163*)
14164  ac_count=0
14165  $as_echo_n 0123456789 >"conftest.in"
14166  while :
14167  do
14168    cat "conftest.in" "conftest.in" >"conftest.tmp"
14169    mv "conftest.tmp" "conftest.in"
14170    cp "conftest.in" "conftest.nl"
14171    $as_echo '' >> "conftest.nl"
14172    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14173    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14174    as_fn_arith $ac_count + 1 && ac_count=$as_val
14175    if test $ac_count -gt ${ac_path_SED_max-0}; then
14176      # Best one so far, save it but keep looking for a better one
14177      ac_cv_path_SED="$ac_path_SED"
14178      ac_path_SED_max=$ac_count
14179    fi
14180    # 10*(2^10) chars as input seems more than enough
14181    test $ac_count -gt 10 && break
14182  done
14183  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14184esac
14185
14186      $ac_path_SED_found && break 3
14187    done
14188  done
14189  done
14190IFS=$as_save_IFS
14191  if test -z "$ac_cv_path_SED"; then
14192    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14193  fi
14194else
14195  ac_cv_path_SED=$SED
14196fi
14197
14198fi
14199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14200$as_echo "$ac_cv_path_SED" >&6; }
14201 SED="$ac_cv_path_SED"
14202  rm -f conftest.sed
14203
14204  else
14205    # The variable is set, but is it from the command line or the environment?
14206
14207    # Try to remove the string !SED! from our list.
14208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14210      # If it failed, the variable was not from the command line. Ignore it,
14211      # but warn the user (except for BASH, which is always set by the calling BASH).
14212      if test "xSED" != xBASH; then
14213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14214$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14215      fi
14216      # Try to locate tool using the code snippet
14217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14218$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14219if ${ac_cv_path_SED+:} false; then :
14220  $as_echo_n "(cached) " >&6
14221else
14222            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14223     for ac_i in 1 2 3 4 5 6 7; do
14224       ac_script="$ac_script$as_nl$ac_script"
14225     done
14226     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14227     { ac_script=; unset ac_script;}
14228     if test -z "$SED"; then
14229  ac_path_SED_found=false
14230  # Loop through the user's path and test for each of PROGNAME-LIST
14231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14232for as_dir in $PATH
14233do
14234  IFS=$as_save_IFS
14235  test -z "$as_dir" && as_dir=.
14236    for ac_prog in sed gsed; do
14237    for ac_exec_ext in '' $ac_executable_extensions; do
14238      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14239      as_fn_executable_p "$ac_path_SED" || continue
14240# Check for GNU ac_path_SED and select it if it is found.
14241  # Check for GNU $ac_path_SED
14242case `"$ac_path_SED" --version 2>&1` in
14243*GNU*)
14244  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14245*)
14246  ac_count=0
14247  $as_echo_n 0123456789 >"conftest.in"
14248  while :
14249  do
14250    cat "conftest.in" "conftest.in" >"conftest.tmp"
14251    mv "conftest.tmp" "conftest.in"
14252    cp "conftest.in" "conftest.nl"
14253    $as_echo '' >> "conftest.nl"
14254    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14255    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14256    as_fn_arith $ac_count + 1 && ac_count=$as_val
14257    if test $ac_count -gt ${ac_path_SED_max-0}; then
14258      # Best one so far, save it but keep looking for a better one
14259      ac_cv_path_SED="$ac_path_SED"
14260      ac_path_SED_max=$ac_count
14261    fi
14262    # 10*(2^10) chars as input seems more than enough
14263    test $ac_count -gt 10 && break
14264  done
14265  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14266esac
14267
14268      $ac_path_SED_found && break 3
14269    done
14270  done
14271  done
14272IFS=$as_save_IFS
14273  if test -z "$ac_cv_path_SED"; then
14274    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14275  fi
14276else
14277  ac_cv_path_SED=$SED
14278fi
14279
14280fi
14281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14282$as_echo "$ac_cv_path_SED" >&6; }
14283 SED="$ac_cv_path_SED"
14284  rm -f conftest.sed
14285
14286    else
14287      # If it succeeded, then it was overridden by the user. We will use it
14288      # for the tool.
14289
14290      # First remove it from the list of overridden variables, so we can test
14291      # for unknown variables in the end.
14292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14293
14294      # Check if we try to supply an empty value
14295      if test "x$SED" = x; then
14296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14297$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14299$as_echo_n "checking for SED... " >&6; }
14300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14301$as_echo "disabled" >&6; }
14302      else
14303        # Check if the provided tool contains a complete path.
14304        tool_specified="$SED"
14305        tool_basename="${tool_specified##*/}"
14306        if test "x$tool_basename" = "x$tool_specified"; then
14307          # A command without a complete path is provided, search $PATH.
14308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14309$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14310          # Extract the first word of "$tool_basename", so it can be a program name with args.
14311set dummy $tool_basename; ac_word=$2
14312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14313$as_echo_n "checking for $ac_word... " >&6; }
14314if ${ac_cv_path_SED+:} false; then :
14315  $as_echo_n "(cached) " >&6
14316else
14317  case $SED in
14318  [\\/]* | ?:[\\/]*)
14319  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14320  ;;
14321  *)
14322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14323for as_dir in $PATH
14324do
14325  IFS=$as_save_IFS
14326  test -z "$as_dir" && as_dir=.
14327    for ac_exec_ext in '' $ac_executable_extensions; do
14328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14329    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14331    break 2
14332  fi
14333done
14334  done
14335IFS=$as_save_IFS
14336
14337  ;;
14338esac
14339fi
14340SED=$ac_cv_path_SED
14341if test -n "$SED"; then
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14343$as_echo "$SED" >&6; }
14344else
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14346$as_echo "no" >&6; }
14347fi
14348
14349
14350          if test "x$SED" = x; then
14351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14352          fi
14353        else
14354          # Otherwise we believe it is a complete path. Use it as it is.
14355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14356$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14358$as_echo_n "checking for SED... " >&6; }
14359          if test ! -x "$tool_specified"; then
14360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14361$as_echo "not found" >&6; }
14362            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14363          fi
14364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14365$as_echo "$tool_specified" >&6; }
14366        fi
14367      fi
14368    fi
14369
14370  fi
14371
14372
14373  if test "x$SED" = x; then
14374    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14375  fi
14376
14377
14378
14379  # Always force rm.
14380  RM="$RM -f"
14381
14382  # pwd behaves differently on various platforms and some don't support the -L flag.
14383  # Always use the bash builtin pwd to get uniform behavior.
14384  THEPWDCMD=pwd
14385
14386  # These are not required on all platforms
14387
14388
14389  # Publish this variable in the help.
14390
14391
14392  if [ -z "${CYGPATH+x}" ]; then
14393    # The variable is not set by user, try to locate tool using the code snippet
14394    for ac_prog in cygpath
14395do
14396  # Extract the first word of "$ac_prog", so it can be a program name with args.
14397set dummy $ac_prog; ac_word=$2
14398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14399$as_echo_n "checking for $ac_word... " >&6; }
14400if ${ac_cv_path_CYGPATH+:} false; then :
14401  $as_echo_n "(cached) " >&6
14402else
14403  case $CYGPATH in
14404  [\\/]* | ?:[\\/]*)
14405  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14406  ;;
14407  *)
14408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14409for as_dir in $PATH
14410do
14411  IFS=$as_save_IFS
14412  test -z "$as_dir" && as_dir=.
14413    for ac_exec_ext in '' $ac_executable_extensions; do
14414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14415    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14417    break 2
14418  fi
14419done
14420  done
14421IFS=$as_save_IFS
14422
14423  ;;
14424esac
14425fi
14426CYGPATH=$ac_cv_path_CYGPATH
14427if test -n "$CYGPATH"; then
14428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14429$as_echo "$CYGPATH" >&6; }
14430else
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14432$as_echo "no" >&6; }
14433fi
14434
14435
14436  test -n "$CYGPATH" && break
14437done
14438
14439  else
14440    # The variable is set, but is it from the command line or the environment?
14441
14442    # Try to remove the string !CYGPATH! from our list.
14443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14445      # If it failed, the variable was not from the command line. Ignore it,
14446      # but warn the user (except for BASH, which is always set by the calling BASH).
14447      if test "xCYGPATH" != xBASH; then
14448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14449$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14450      fi
14451      # Try to locate tool using the code snippet
14452      for ac_prog in cygpath
14453do
14454  # Extract the first word of "$ac_prog", so it can be a program name with args.
14455set dummy $ac_prog; ac_word=$2
14456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14457$as_echo_n "checking for $ac_word... " >&6; }
14458if ${ac_cv_path_CYGPATH+:} false; then :
14459  $as_echo_n "(cached) " >&6
14460else
14461  case $CYGPATH in
14462  [\\/]* | ?:[\\/]*)
14463  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14464  ;;
14465  *)
14466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14467for as_dir in $PATH
14468do
14469  IFS=$as_save_IFS
14470  test -z "$as_dir" && as_dir=.
14471    for ac_exec_ext in '' $ac_executable_extensions; do
14472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14473    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14475    break 2
14476  fi
14477done
14478  done
14479IFS=$as_save_IFS
14480
14481  ;;
14482esac
14483fi
14484CYGPATH=$ac_cv_path_CYGPATH
14485if test -n "$CYGPATH"; then
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14487$as_echo "$CYGPATH" >&6; }
14488else
14489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14490$as_echo "no" >&6; }
14491fi
14492
14493
14494  test -n "$CYGPATH" && break
14495done
14496
14497    else
14498      # If it succeeded, then it was overridden by the user. We will use it
14499      # for the tool.
14500
14501      # First remove it from the list of overridden variables, so we can test
14502      # for unknown variables in the end.
14503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14504
14505      # Check if we try to supply an empty value
14506      if test "x$CYGPATH" = x; then
14507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14508$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14510$as_echo_n "checking for CYGPATH... " >&6; }
14511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14512$as_echo "disabled" >&6; }
14513      else
14514        # Check if the provided tool contains a complete path.
14515        tool_specified="$CYGPATH"
14516        tool_basename="${tool_specified##*/}"
14517        if test "x$tool_basename" = "x$tool_specified"; then
14518          # A command without a complete path is provided, search $PATH.
14519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14520$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14521          # Extract the first word of "$tool_basename", so it can be a program name with args.
14522set dummy $tool_basename; ac_word=$2
14523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14524$as_echo_n "checking for $ac_word... " >&6; }
14525if ${ac_cv_path_CYGPATH+:} false; then :
14526  $as_echo_n "(cached) " >&6
14527else
14528  case $CYGPATH in
14529  [\\/]* | ?:[\\/]*)
14530  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14531  ;;
14532  *)
14533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14534for as_dir in $PATH
14535do
14536  IFS=$as_save_IFS
14537  test -z "$as_dir" && as_dir=.
14538    for ac_exec_ext in '' $ac_executable_extensions; do
14539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14540    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14542    break 2
14543  fi
14544done
14545  done
14546IFS=$as_save_IFS
14547
14548  ;;
14549esac
14550fi
14551CYGPATH=$ac_cv_path_CYGPATH
14552if test -n "$CYGPATH"; then
14553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14554$as_echo "$CYGPATH" >&6; }
14555else
14556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14557$as_echo "no" >&6; }
14558fi
14559
14560
14561          if test "x$CYGPATH" = x; then
14562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14563          fi
14564        else
14565          # Otherwise we believe it is a complete path. Use it as it is.
14566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14567$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14569$as_echo_n "checking for CYGPATH... " >&6; }
14570          if test ! -x "$tool_specified"; then
14571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14572$as_echo "not found" >&6; }
14573            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14574          fi
14575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14576$as_echo "$tool_specified" >&6; }
14577        fi
14578      fi
14579    fi
14580
14581  fi
14582
14583
14584
14585
14586  # Publish this variable in the help.
14587
14588
14589  if [ -z "${READLINK+x}" ]; then
14590    # The variable is not set by user, try to locate tool using the code snippet
14591    for ac_prog in greadlink readlink
14592do
14593  # Extract the first word of "$ac_prog", so it can be a program name with args.
14594set dummy $ac_prog; ac_word=$2
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14596$as_echo_n "checking for $ac_word... " >&6; }
14597if ${ac_cv_path_READLINK+:} false; then :
14598  $as_echo_n "(cached) " >&6
14599else
14600  case $READLINK in
14601  [\\/]* | ?:[\\/]*)
14602  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14603  ;;
14604  *)
14605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14606for as_dir in $PATH
14607do
14608  IFS=$as_save_IFS
14609  test -z "$as_dir" && as_dir=.
14610    for ac_exec_ext in '' $ac_executable_extensions; do
14611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14612    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14614    break 2
14615  fi
14616done
14617  done
14618IFS=$as_save_IFS
14619
14620  ;;
14621esac
14622fi
14623READLINK=$ac_cv_path_READLINK
14624if test -n "$READLINK"; then
14625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14626$as_echo "$READLINK" >&6; }
14627else
14628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14629$as_echo "no" >&6; }
14630fi
14631
14632
14633  test -n "$READLINK" && break
14634done
14635
14636  else
14637    # The variable is set, but is it from the command line or the environment?
14638
14639    # Try to remove the string !READLINK! from our list.
14640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14642      # If it failed, the variable was not from the command line. Ignore it,
14643      # but warn the user (except for BASH, which is always set by the calling BASH).
14644      if test "xREADLINK" != xBASH; then
14645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14646$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14647      fi
14648      # Try to locate tool using the code snippet
14649      for ac_prog in greadlink readlink
14650do
14651  # Extract the first word of "$ac_prog", so it can be a program name with args.
14652set dummy $ac_prog; ac_word=$2
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14654$as_echo_n "checking for $ac_word... " >&6; }
14655if ${ac_cv_path_READLINK+:} false; then :
14656  $as_echo_n "(cached) " >&6
14657else
14658  case $READLINK in
14659  [\\/]* | ?:[\\/]*)
14660  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14661  ;;
14662  *)
14663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14664for as_dir in $PATH
14665do
14666  IFS=$as_save_IFS
14667  test -z "$as_dir" && as_dir=.
14668    for ac_exec_ext in '' $ac_executable_extensions; do
14669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14670    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14672    break 2
14673  fi
14674done
14675  done
14676IFS=$as_save_IFS
14677
14678  ;;
14679esac
14680fi
14681READLINK=$ac_cv_path_READLINK
14682if test -n "$READLINK"; then
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14684$as_echo "$READLINK" >&6; }
14685else
14686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14687$as_echo "no" >&6; }
14688fi
14689
14690
14691  test -n "$READLINK" && break
14692done
14693
14694    else
14695      # If it succeeded, then it was overridden by the user. We will use it
14696      # for the tool.
14697
14698      # First remove it from the list of overridden variables, so we can test
14699      # for unknown variables in the end.
14700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14701
14702      # Check if we try to supply an empty value
14703      if test "x$READLINK" = x; then
14704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14705$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14707$as_echo_n "checking for READLINK... " >&6; }
14708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14709$as_echo "disabled" >&6; }
14710      else
14711        # Check if the provided tool contains a complete path.
14712        tool_specified="$READLINK"
14713        tool_basename="${tool_specified##*/}"
14714        if test "x$tool_basename" = "x$tool_specified"; then
14715          # A command without a complete path is provided, search $PATH.
14716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14717$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14718          # Extract the first word of "$tool_basename", so it can be a program name with args.
14719set dummy $tool_basename; ac_word=$2
14720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14721$as_echo_n "checking for $ac_word... " >&6; }
14722if ${ac_cv_path_READLINK+:} false; then :
14723  $as_echo_n "(cached) " >&6
14724else
14725  case $READLINK in
14726  [\\/]* | ?:[\\/]*)
14727  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14728  ;;
14729  *)
14730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14731for as_dir in $PATH
14732do
14733  IFS=$as_save_IFS
14734  test -z "$as_dir" && as_dir=.
14735    for ac_exec_ext in '' $ac_executable_extensions; do
14736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14737    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14739    break 2
14740  fi
14741done
14742  done
14743IFS=$as_save_IFS
14744
14745  ;;
14746esac
14747fi
14748READLINK=$ac_cv_path_READLINK
14749if test -n "$READLINK"; then
14750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14751$as_echo "$READLINK" >&6; }
14752else
14753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14754$as_echo "no" >&6; }
14755fi
14756
14757
14758          if test "x$READLINK" = x; then
14759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14760          fi
14761        else
14762          # Otherwise we believe it is a complete path. Use it as it is.
14763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14764$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14766$as_echo_n "checking for READLINK... " >&6; }
14767          if test ! -x "$tool_specified"; then
14768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14769$as_echo "not found" >&6; }
14770            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14771          fi
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14773$as_echo "$tool_specified" >&6; }
14774        fi
14775      fi
14776    fi
14777
14778  fi
14779
14780
14781
14782
14783  # Publish this variable in the help.
14784
14785
14786  if [ -z "${DF+x}" ]; then
14787    # The variable is not set by user, try to locate tool using the code snippet
14788    for ac_prog in df
14789do
14790  # Extract the first word of "$ac_prog", so it can be a program name with args.
14791set dummy $ac_prog; ac_word=$2
14792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14793$as_echo_n "checking for $ac_word... " >&6; }
14794if ${ac_cv_path_DF+:} false; then :
14795  $as_echo_n "(cached) " >&6
14796else
14797  case $DF in
14798  [\\/]* | ?:[\\/]*)
14799  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14800  ;;
14801  *)
14802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14803for as_dir in $PATH
14804do
14805  IFS=$as_save_IFS
14806  test -z "$as_dir" && as_dir=.
14807    for ac_exec_ext in '' $ac_executable_extensions; do
14808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14809    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14811    break 2
14812  fi
14813done
14814  done
14815IFS=$as_save_IFS
14816
14817  ;;
14818esac
14819fi
14820DF=$ac_cv_path_DF
14821if test -n "$DF"; then
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14823$as_echo "$DF" >&6; }
14824else
14825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14826$as_echo "no" >&6; }
14827fi
14828
14829
14830  test -n "$DF" && break
14831done
14832
14833  else
14834    # The variable is set, but is it from the command line or the environment?
14835
14836    # Try to remove the string !DF! from our list.
14837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14839      # If it failed, the variable was not from the command line. Ignore it,
14840      # but warn the user (except for BASH, which is always set by the calling BASH).
14841      if test "xDF" != xBASH; then
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14843$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14844      fi
14845      # Try to locate tool using the code snippet
14846      for ac_prog in df
14847do
14848  # Extract the first word of "$ac_prog", so it can be a program name with args.
14849set dummy $ac_prog; ac_word=$2
14850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14851$as_echo_n "checking for $ac_word... " >&6; }
14852if ${ac_cv_path_DF+:} false; then :
14853  $as_echo_n "(cached) " >&6
14854else
14855  case $DF in
14856  [\\/]* | ?:[\\/]*)
14857  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14858  ;;
14859  *)
14860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14861for as_dir in $PATH
14862do
14863  IFS=$as_save_IFS
14864  test -z "$as_dir" && as_dir=.
14865    for ac_exec_ext in '' $ac_executable_extensions; do
14866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14867    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14869    break 2
14870  fi
14871done
14872  done
14873IFS=$as_save_IFS
14874
14875  ;;
14876esac
14877fi
14878DF=$ac_cv_path_DF
14879if test -n "$DF"; then
14880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14881$as_echo "$DF" >&6; }
14882else
14883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14884$as_echo "no" >&6; }
14885fi
14886
14887
14888  test -n "$DF" && break
14889done
14890
14891    else
14892      # If it succeeded, then it was overridden by the user. We will use it
14893      # for the tool.
14894
14895      # First remove it from the list of overridden variables, so we can test
14896      # for unknown variables in the end.
14897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14898
14899      # Check if we try to supply an empty value
14900      if test "x$DF" = x; then
14901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14902$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14904$as_echo_n "checking for DF... " >&6; }
14905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14906$as_echo "disabled" >&6; }
14907      else
14908        # Check if the provided tool contains a complete path.
14909        tool_specified="$DF"
14910        tool_basename="${tool_specified##*/}"
14911        if test "x$tool_basename" = "x$tool_specified"; then
14912          # A command without a complete path is provided, search $PATH.
14913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14914$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14915          # Extract the first word of "$tool_basename", so it can be a program name with args.
14916set dummy $tool_basename; ac_word=$2
14917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14918$as_echo_n "checking for $ac_word... " >&6; }
14919if ${ac_cv_path_DF+:} false; then :
14920  $as_echo_n "(cached) " >&6
14921else
14922  case $DF in
14923  [\\/]* | ?:[\\/]*)
14924  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14925  ;;
14926  *)
14927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14928for as_dir in $PATH
14929do
14930  IFS=$as_save_IFS
14931  test -z "$as_dir" && as_dir=.
14932    for ac_exec_ext in '' $ac_executable_extensions; do
14933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14934    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14936    break 2
14937  fi
14938done
14939  done
14940IFS=$as_save_IFS
14941
14942  ;;
14943esac
14944fi
14945DF=$ac_cv_path_DF
14946if test -n "$DF"; then
14947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14948$as_echo "$DF" >&6; }
14949else
14950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14951$as_echo "no" >&6; }
14952fi
14953
14954
14955          if test "x$DF" = x; then
14956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14957          fi
14958        else
14959          # Otherwise we believe it is a complete path. Use it as it is.
14960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14961$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14963$as_echo_n "checking for DF... " >&6; }
14964          if test ! -x "$tool_specified"; then
14965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14966$as_echo "not found" >&6; }
14967            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14968          fi
14969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14970$as_echo "$tool_specified" >&6; }
14971        fi
14972      fi
14973    fi
14974
14975  fi
14976
14977
14978
14979
14980  # Publish this variable in the help.
14981
14982
14983  if [ -z "${CPIO+x}" ]; then
14984    # The variable is not set by user, try to locate tool using the code snippet
14985    for ac_prog in cpio bsdcpio
14986do
14987  # Extract the first word of "$ac_prog", so it can be a program name with args.
14988set dummy $ac_prog; ac_word=$2
14989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14990$as_echo_n "checking for $ac_word... " >&6; }
14991if ${ac_cv_path_CPIO+:} false; then :
14992  $as_echo_n "(cached) " >&6
14993else
14994  case $CPIO in
14995  [\\/]* | ?:[\\/]*)
14996  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14997  ;;
14998  *)
14999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15000for as_dir in $PATH
15001do
15002  IFS=$as_save_IFS
15003  test -z "$as_dir" && as_dir=.
15004    for ac_exec_ext in '' $ac_executable_extensions; do
15005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15006    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15008    break 2
15009  fi
15010done
15011  done
15012IFS=$as_save_IFS
15013
15014  ;;
15015esac
15016fi
15017CPIO=$ac_cv_path_CPIO
15018if test -n "$CPIO"; then
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15020$as_echo "$CPIO" >&6; }
15021else
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15023$as_echo "no" >&6; }
15024fi
15025
15026
15027  test -n "$CPIO" && break
15028done
15029
15030  else
15031    # The variable is set, but is it from the command line or the environment?
15032
15033    # Try to remove the string !CPIO! from our list.
15034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15036      # If it failed, the variable was not from the command line. Ignore it,
15037      # but warn the user (except for BASH, which is always set by the calling BASH).
15038      if test "xCPIO" != xBASH; then
15039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15040$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15041      fi
15042      # Try to locate tool using the code snippet
15043      for ac_prog in cpio bsdcpio
15044do
15045  # Extract the first word of "$ac_prog", so it can be a program name with args.
15046set dummy $ac_prog; ac_word=$2
15047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15048$as_echo_n "checking for $ac_word... " >&6; }
15049if ${ac_cv_path_CPIO+:} false; then :
15050  $as_echo_n "(cached) " >&6
15051else
15052  case $CPIO in
15053  [\\/]* | ?:[\\/]*)
15054  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15055  ;;
15056  *)
15057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15058for as_dir in $PATH
15059do
15060  IFS=$as_save_IFS
15061  test -z "$as_dir" && as_dir=.
15062    for ac_exec_ext in '' $ac_executable_extensions; do
15063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15064    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15066    break 2
15067  fi
15068done
15069  done
15070IFS=$as_save_IFS
15071
15072  ;;
15073esac
15074fi
15075CPIO=$ac_cv_path_CPIO
15076if test -n "$CPIO"; then
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15078$as_echo "$CPIO" >&6; }
15079else
15080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15081$as_echo "no" >&6; }
15082fi
15083
15084
15085  test -n "$CPIO" && break
15086done
15087
15088    else
15089      # If it succeeded, then it was overridden by the user. We will use it
15090      # for the tool.
15091
15092      # First remove it from the list of overridden variables, so we can test
15093      # for unknown variables in the end.
15094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15095
15096      # Check if we try to supply an empty value
15097      if test "x$CPIO" = x; then
15098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15099$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15101$as_echo_n "checking for CPIO... " >&6; }
15102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15103$as_echo "disabled" >&6; }
15104      else
15105        # Check if the provided tool contains a complete path.
15106        tool_specified="$CPIO"
15107        tool_basename="${tool_specified##*/}"
15108        if test "x$tool_basename" = "x$tool_specified"; then
15109          # A command without a complete path is provided, search $PATH.
15110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15111$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15112          # Extract the first word of "$tool_basename", so it can be a program name with args.
15113set dummy $tool_basename; ac_word=$2
15114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15115$as_echo_n "checking for $ac_word... " >&6; }
15116if ${ac_cv_path_CPIO+:} false; then :
15117  $as_echo_n "(cached) " >&6
15118else
15119  case $CPIO in
15120  [\\/]* | ?:[\\/]*)
15121  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15122  ;;
15123  *)
15124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15125for as_dir in $PATH
15126do
15127  IFS=$as_save_IFS
15128  test -z "$as_dir" && as_dir=.
15129    for ac_exec_ext in '' $ac_executable_extensions; do
15130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15131    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15133    break 2
15134  fi
15135done
15136  done
15137IFS=$as_save_IFS
15138
15139  ;;
15140esac
15141fi
15142CPIO=$ac_cv_path_CPIO
15143if test -n "$CPIO"; then
15144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15145$as_echo "$CPIO" >&6; }
15146else
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15148$as_echo "no" >&6; }
15149fi
15150
15151
15152          if test "x$CPIO" = x; then
15153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15154          fi
15155        else
15156          # Otherwise we believe it is a complete path. Use it as it is.
15157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15158$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15160$as_echo_n "checking for CPIO... " >&6; }
15161          if test ! -x "$tool_specified"; then
15162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15163$as_echo "not found" >&6; }
15164            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15165          fi
15166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15167$as_echo "$tool_specified" >&6; }
15168        fi
15169      fi
15170    fi
15171
15172  fi
15173
15174
15175
15176
15177  # Publish this variable in the help.
15178
15179
15180  if [ -z "${NICE+x}" ]; then
15181    # The variable is not set by user, try to locate tool using the code snippet
15182    for ac_prog in nice
15183do
15184  # Extract the first word of "$ac_prog", so it can be a program name with args.
15185set dummy $ac_prog; ac_word=$2
15186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15187$as_echo_n "checking for $ac_word... " >&6; }
15188if ${ac_cv_path_NICE+:} false; then :
15189  $as_echo_n "(cached) " >&6
15190else
15191  case $NICE in
15192  [\\/]* | ?:[\\/]*)
15193  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15194  ;;
15195  *)
15196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15197for as_dir in $PATH
15198do
15199  IFS=$as_save_IFS
15200  test -z "$as_dir" && as_dir=.
15201    for ac_exec_ext in '' $ac_executable_extensions; do
15202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15203    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15205    break 2
15206  fi
15207done
15208  done
15209IFS=$as_save_IFS
15210
15211  ;;
15212esac
15213fi
15214NICE=$ac_cv_path_NICE
15215if test -n "$NICE"; then
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15217$as_echo "$NICE" >&6; }
15218else
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15220$as_echo "no" >&6; }
15221fi
15222
15223
15224  test -n "$NICE" && break
15225done
15226
15227  else
15228    # The variable is set, but is it from the command line or the environment?
15229
15230    # Try to remove the string !NICE! from our list.
15231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15233      # If it failed, the variable was not from the command line. Ignore it,
15234      # but warn the user (except for BASH, which is always set by the calling BASH).
15235      if test "xNICE" != xBASH; then
15236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15237$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15238      fi
15239      # Try to locate tool using the code snippet
15240      for ac_prog in nice
15241do
15242  # Extract the first word of "$ac_prog", so it can be a program name with args.
15243set dummy $ac_prog; ac_word=$2
15244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15245$as_echo_n "checking for $ac_word... " >&6; }
15246if ${ac_cv_path_NICE+:} false; then :
15247  $as_echo_n "(cached) " >&6
15248else
15249  case $NICE in
15250  [\\/]* | ?:[\\/]*)
15251  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15252  ;;
15253  *)
15254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15255for as_dir in $PATH
15256do
15257  IFS=$as_save_IFS
15258  test -z "$as_dir" && as_dir=.
15259    for ac_exec_ext in '' $ac_executable_extensions; do
15260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15261    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15263    break 2
15264  fi
15265done
15266  done
15267IFS=$as_save_IFS
15268
15269  ;;
15270esac
15271fi
15272NICE=$ac_cv_path_NICE
15273if test -n "$NICE"; then
15274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15275$as_echo "$NICE" >&6; }
15276else
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15278$as_echo "no" >&6; }
15279fi
15280
15281
15282  test -n "$NICE" && break
15283done
15284
15285    else
15286      # If it succeeded, then it was overridden by the user. We will use it
15287      # for the tool.
15288
15289      # First remove it from the list of overridden variables, so we can test
15290      # for unknown variables in the end.
15291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15292
15293      # Check if we try to supply an empty value
15294      if test "x$NICE" = x; then
15295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15296$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15298$as_echo_n "checking for NICE... " >&6; }
15299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15300$as_echo "disabled" >&6; }
15301      else
15302        # Check if the provided tool contains a complete path.
15303        tool_specified="$NICE"
15304        tool_basename="${tool_specified##*/}"
15305        if test "x$tool_basename" = "x$tool_specified"; then
15306          # A command without a complete path is provided, search $PATH.
15307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15308$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15309          # Extract the first word of "$tool_basename", so it can be a program name with args.
15310set dummy $tool_basename; ac_word=$2
15311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15312$as_echo_n "checking for $ac_word... " >&6; }
15313if ${ac_cv_path_NICE+:} false; then :
15314  $as_echo_n "(cached) " >&6
15315else
15316  case $NICE in
15317  [\\/]* | ?:[\\/]*)
15318  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15319  ;;
15320  *)
15321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15322for as_dir in $PATH
15323do
15324  IFS=$as_save_IFS
15325  test -z "$as_dir" && as_dir=.
15326    for ac_exec_ext in '' $ac_executable_extensions; do
15327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15328    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15330    break 2
15331  fi
15332done
15333  done
15334IFS=$as_save_IFS
15335
15336  ;;
15337esac
15338fi
15339NICE=$ac_cv_path_NICE
15340if test -n "$NICE"; then
15341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15342$as_echo "$NICE" >&6; }
15343else
15344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15345$as_echo "no" >&6; }
15346fi
15347
15348
15349          if test "x$NICE" = x; then
15350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15351          fi
15352        else
15353          # Otherwise we believe it is a complete path. Use it as it is.
15354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15355$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15357$as_echo_n "checking for NICE... " >&6; }
15358          if test ! -x "$tool_specified"; then
15359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15360$as_echo "not found" >&6; }
15361            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15362          fi
15363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15364$as_echo "$tool_specified" >&6; }
15365        fi
15366      fi
15367    fi
15368
15369  fi
15370
15371
15372
15373
15374  # Publish this variable in the help.
15375
15376
15377  if [ -z "${PANDOC+x}" ]; then
15378    # The variable is not set by user, try to locate tool using the code snippet
15379    for ac_prog in pandoc
15380do
15381  # Extract the first word of "$ac_prog", so it can be a program name with args.
15382set dummy $ac_prog; ac_word=$2
15383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15384$as_echo_n "checking for $ac_word... " >&6; }
15385if ${ac_cv_path_PANDOC+:} false; then :
15386  $as_echo_n "(cached) " >&6
15387else
15388  case $PANDOC in
15389  [\\/]* | ?:[\\/]*)
15390  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15391  ;;
15392  *)
15393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15394for as_dir in $PATH
15395do
15396  IFS=$as_save_IFS
15397  test -z "$as_dir" && as_dir=.
15398    for ac_exec_ext in '' $ac_executable_extensions; do
15399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15400    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15402    break 2
15403  fi
15404done
15405  done
15406IFS=$as_save_IFS
15407
15408  ;;
15409esac
15410fi
15411PANDOC=$ac_cv_path_PANDOC
15412if test -n "$PANDOC"; then
15413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15414$as_echo "$PANDOC" >&6; }
15415else
15416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15417$as_echo "no" >&6; }
15418fi
15419
15420
15421  test -n "$PANDOC" && break
15422done
15423
15424  else
15425    # The variable is set, but is it from the command line or the environment?
15426
15427    # Try to remove the string !PANDOC! from our list.
15428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15430      # If it failed, the variable was not from the command line. Ignore it,
15431      # but warn the user (except for BASH, which is always set by the calling BASH).
15432      if test "xPANDOC" != xBASH; then
15433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15434$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15435      fi
15436      # Try to locate tool using the code snippet
15437      for ac_prog in pandoc
15438do
15439  # Extract the first word of "$ac_prog", so it can be a program name with args.
15440set dummy $ac_prog; ac_word=$2
15441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15442$as_echo_n "checking for $ac_word... " >&6; }
15443if ${ac_cv_path_PANDOC+:} false; then :
15444  $as_echo_n "(cached) " >&6
15445else
15446  case $PANDOC in
15447  [\\/]* | ?:[\\/]*)
15448  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15449  ;;
15450  *)
15451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15452for as_dir in $PATH
15453do
15454  IFS=$as_save_IFS
15455  test -z "$as_dir" && as_dir=.
15456    for ac_exec_ext in '' $ac_executable_extensions; do
15457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15458    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15460    break 2
15461  fi
15462done
15463  done
15464IFS=$as_save_IFS
15465
15466  ;;
15467esac
15468fi
15469PANDOC=$ac_cv_path_PANDOC
15470if test -n "$PANDOC"; then
15471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15472$as_echo "$PANDOC" >&6; }
15473else
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15475$as_echo "no" >&6; }
15476fi
15477
15478
15479  test -n "$PANDOC" && break
15480done
15481
15482    else
15483      # If it succeeded, then it was overridden by the user. We will use it
15484      # for the tool.
15485
15486      # First remove it from the list of overridden variables, so we can test
15487      # for unknown variables in the end.
15488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15489
15490      # Check if we try to supply an empty value
15491      if test "x$PANDOC" = x; then
15492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15493$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15495$as_echo_n "checking for PANDOC... " >&6; }
15496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15497$as_echo "disabled" >&6; }
15498      else
15499        # Check if the provided tool contains a complete path.
15500        tool_specified="$PANDOC"
15501        tool_basename="${tool_specified##*/}"
15502        if test "x$tool_basename" = "x$tool_specified"; then
15503          # A command without a complete path is provided, search $PATH.
15504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15505$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15506          # Extract the first word of "$tool_basename", so it can be a program name with args.
15507set dummy $tool_basename; ac_word=$2
15508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15509$as_echo_n "checking for $ac_word... " >&6; }
15510if ${ac_cv_path_PANDOC+:} false; then :
15511  $as_echo_n "(cached) " >&6
15512else
15513  case $PANDOC in
15514  [\\/]* | ?:[\\/]*)
15515  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15516  ;;
15517  *)
15518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15519for as_dir in $PATH
15520do
15521  IFS=$as_save_IFS
15522  test -z "$as_dir" && as_dir=.
15523    for ac_exec_ext in '' $ac_executable_extensions; do
15524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15525    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15527    break 2
15528  fi
15529done
15530  done
15531IFS=$as_save_IFS
15532
15533  ;;
15534esac
15535fi
15536PANDOC=$ac_cv_path_PANDOC
15537if test -n "$PANDOC"; then
15538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15539$as_echo "$PANDOC" >&6; }
15540else
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15542$as_echo "no" >&6; }
15543fi
15544
15545
15546          if test "x$PANDOC" = x; then
15547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15548          fi
15549        else
15550          # Otherwise we believe it is a complete path. Use it as it is.
15551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15552$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15554$as_echo_n "checking for PANDOC... " >&6; }
15555          if test ! -x "$tool_specified"; then
15556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15557$as_echo "not found" >&6; }
15558            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15559          fi
15560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15561$as_echo "$tool_specified" >&6; }
15562        fi
15563      fi
15564    fi
15565
15566  fi
15567
15568
15569
15570
15571# Now we can determine OpenJDK build and target platforms. This is required to
15572# have early on.
15573# Make sure we can run config.sub.
15574$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15575  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15576
15577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15578$as_echo_n "checking build system type... " >&6; }
15579if ${ac_cv_build+:} false; then :
15580  $as_echo_n "(cached) " >&6
15581else
15582  ac_build_alias=$build_alias
15583test "x$ac_build_alias" = x &&
15584  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15585test "x$ac_build_alias" = x &&
15586  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15587ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15588  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15589
15590fi
15591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15592$as_echo "$ac_cv_build" >&6; }
15593case $ac_cv_build in
15594*-*-*) ;;
15595*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15596esac
15597build=$ac_cv_build
15598ac_save_IFS=$IFS; IFS='-'
15599set x $ac_cv_build
15600shift
15601build_cpu=$1
15602build_vendor=$2
15603shift; shift
15604# Remember, the first character of IFS is used to create $*,
15605# except with old shells:
15606build_os=$*
15607IFS=$ac_save_IFS
15608case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15609
15610
15611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15612$as_echo_n "checking host system type... " >&6; }
15613if ${ac_cv_host+:} false; then :
15614  $as_echo_n "(cached) " >&6
15615else
15616  if test "x$host_alias" = x; then
15617  ac_cv_host=$ac_cv_build
15618else
15619  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15620    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15621fi
15622
15623fi
15624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15625$as_echo "$ac_cv_host" >&6; }
15626case $ac_cv_host in
15627*-*-*) ;;
15628*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15629esac
15630host=$ac_cv_host
15631ac_save_IFS=$IFS; IFS='-'
15632set x $ac_cv_host
15633shift
15634host_cpu=$1
15635host_vendor=$2
15636shift; shift
15637# Remember, the first character of IFS is used to create $*,
15638# except with old shells:
15639host_os=$*
15640IFS=$ac_save_IFS
15641case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15642
15643
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15645$as_echo_n "checking target system type... " >&6; }
15646if ${ac_cv_target+:} false; then :
15647  $as_echo_n "(cached) " >&6
15648else
15649  if test "x$target_alias" = x; then
15650  ac_cv_target=$ac_cv_host
15651else
15652  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15653    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15654fi
15655
15656fi
15657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15658$as_echo "$ac_cv_target" >&6; }
15659case $ac_cv_target in
15660*-*-*) ;;
15661*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15662esac
15663target=$ac_cv_target
15664ac_save_IFS=$IFS; IFS='-'
15665set x $ac_cv_target
15666shift
15667target_cpu=$1
15668target_vendor=$2
15669shift; shift
15670# Remember, the first character of IFS is used to create $*,
15671# except with old shells:
15672target_os=$*
15673IFS=$ac_save_IFS
15674case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15675
15676
15677# The aliases save the names the user supplied, while $host etc.
15678# will get canonicalized.
15679test -n "$target_alias" &&
15680  test "$program_prefix$program_suffix$program_transform_name" = \
15681    NONENONEs,x,x, &&
15682  program_prefix=${target_alias}-
15683
15684  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15685  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15686  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15687  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15688  # to use the configure naming style.
15689
15690
15691
15692
15693
15694  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15695  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15696  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15697  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15698  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15699  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15700
15701
15702
15703  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15704
15705  case "$build_os" in
15706    *linux*)
15707      VAR_OS=linux
15708      VAR_OS_TYPE=unix
15709      ;;
15710    *solaris*)
15711      VAR_OS=solaris
15712      VAR_OS_TYPE=unix
15713      ;;
15714    *darwin*)
15715      VAR_OS=macosx
15716      VAR_OS_TYPE=unix
15717      ;;
15718    *bsd*)
15719      VAR_OS=bsd
15720      VAR_OS_TYPE=unix
15721      ;;
15722    *cygwin*)
15723      VAR_OS=windows
15724      VAR_OS_ENV=windows.cygwin
15725      ;;
15726    *mingw*)
15727      VAR_OS=windows
15728      VAR_OS_ENV=windows.msys
15729      ;;
15730    *aix*)
15731      VAR_OS=aix
15732      VAR_OS_TYPE=unix
15733      ;;
15734    *)
15735      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15736      ;;
15737  esac
15738
15739
15740  # First argument is the cpu name from the trip/quad
15741  case "$build_cpu" in
15742    x86_64)
15743      VAR_CPU=x86_64
15744      VAR_CPU_ARCH=x86
15745      VAR_CPU_BITS=64
15746      VAR_CPU_ENDIAN=little
15747      ;;
15748    i?86)
15749      VAR_CPU=x86
15750      VAR_CPU_ARCH=x86
15751      VAR_CPU_BITS=32
15752      VAR_CPU_ENDIAN=little
15753      ;;
15754    arm*)
15755      VAR_CPU=arm
15756      VAR_CPU_ARCH=arm
15757      VAR_CPU_BITS=32
15758      VAR_CPU_ENDIAN=little
15759      ;;
15760    aarch64)
15761      VAR_CPU=aarch64
15762      VAR_CPU_ARCH=aarch64
15763      VAR_CPU_BITS=64
15764      VAR_CPU_ENDIAN=little
15765      ;;
15766    powerpc)
15767      VAR_CPU=ppc
15768      VAR_CPU_ARCH=ppc
15769      VAR_CPU_BITS=32
15770      VAR_CPU_ENDIAN=big
15771      ;;
15772    powerpc64)
15773      VAR_CPU=ppc64
15774      VAR_CPU_ARCH=ppc
15775      VAR_CPU_BITS=64
15776      VAR_CPU_ENDIAN=big
15777      ;;
15778    powerpc64le)
15779      VAR_CPU=ppc64le
15780      VAR_CPU_ARCH=ppc
15781      VAR_CPU_BITS=64
15782      VAR_CPU_ENDIAN=little
15783      ;;
15784    s390)
15785      VAR_CPU=s390
15786      VAR_CPU_ARCH=s390
15787      VAR_CPU_BITS=32
15788      VAR_CPU_ENDIAN=big
15789      ;;
15790    s390x)
15791      VAR_CPU=s390x
15792      VAR_CPU_ARCH=s390
15793      VAR_CPU_BITS=64
15794      VAR_CPU_ENDIAN=big
15795      ;;
15796    sparc)
15797      VAR_CPU=sparc
15798      VAR_CPU_ARCH=sparc
15799      VAR_CPU_BITS=32
15800      VAR_CPU_ENDIAN=big
15801      ;;
15802    sparcv9|sparc64)
15803      VAR_CPU=sparcv9
15804      VAR_CPU_ARCH=sparc
15805      VAR_CPU_BITS=64
15806      VAR_CPU_ENDIAN=big
15807      ;;
15808    *)
15809      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15810      ;;
15811  esac
15812
15813  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15814  OPENJDK_BUILD_OS="$VAR_OS"
15815  if test "x$VAR_OS_TYPE" != x; then
15816    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15817  else
15818    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15819  fi
15820  if test "x$VAR_OS_ENV" != x; then
15821    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15822  else
15823    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15824  fi
15825  OPENJDK_BUILD_CPU="$VAR_CPU"
15826  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15827  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15828  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15829
15830
15831
15832
15833
15834
15835
15836
15837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15838$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15840$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15841
15842  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15843
15844  case "$host_os" in
15845    *linux*)
15846      VAR_OS=linux
15847      VAR_OS_TYPE=unix
15848      ;;
15849    *solaris*)
15850      VAR_OS=solaris
15851      VAR_OS_TYPE=unix
15852      ;;
15853    *darwin*)
15854      VAR_OS=macosx
15855      VAR_OS_TYPE=unix
15856      ;;
15857    *bsd*)
15858      VAR_OS=bsd
15859      VAR_OS_TYPE=unix
15860      ;;
15861    *cygwin*)
15862      VAR_OS=windows
15863      VAR_OS_ENV=windows.cygwin
15864      ;;
15865    *mingw*)
15866      VAR_OS=windows
15867      VAR_OS_ENV=windows.msys
15868      ;;
15869    *aix*)
15870      VAR_OS=aix
15871      VAR_OS_TYPE=unix
15872      ;;
15873    *)
15874      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15875      ;;
15876  esac
15877
15878
15879  # First argument is the cpu name from the trip/quad
15880  case "$host_cpu" in
15881    x86_64)
15882      VAR_CPU=x86_64
15883      VAR_CPU_ARCH=x86
15884      VAR_CPU_BITS=64
15885      VAR_CPU_ENDIAN=little
15886      ;;
15887    i?86)
15888      VAR_CPU=x86
15889      VAR_CPU_ARCH=x86
15890      VAR_CPU_BITS=32
15891      VAR_CPU_ENDIAN=little
15892      ;;
15893    arm*)
15894      VAR_CPU=arm
15895      VAR_CPU_ARCH=arm
15896      VAR_CPU_BITS=32
15897      VAR_CPU_ENDIAN=little
15898      ;;
15899    aarch64)
15900      VAR_CPU=aarch64
15901      VAR_CPU_ARCH=aarch64
15902      VAR_CPU_BITS=64
15903      VAR_CPU_ENDIAN=little
15904      ;;
15905    powerpc)
15906      VAR_CPU=ppc
15907      VAR_CPU_ARCH=ppc
15908      VAR_CPU_BITS=32
15909      VAR_CPU_ENDIAN=big
15910      ;;
15911    powerpc64)
15912      VAR_CPU=ppc64
15913      VAR_CPU_ARCH=ppc
15914      VAR_CPU_BITS=64
15915      VAR_CPU_ENDIAN=big
15916      ;;
15917    powerpc64le)
15918      VAR_CPU=ppc64le
15919      VAR_CPU_ARCH=ppc
15920      VAR_CPU_BITS=64
15921      VAR_CPU_ENDIAN=little
15922      ;;
15923    s390)
15924      VAR_CPU=s390
15925      VAR_CPU_ARCH=s390
15926      VAR_CPU_BITS=32
15927      VAR_CPU_ENDIAN=big
15928      ;;
15929    s390x)
15930      VAR_CPU=s390x
15931      VAR_CPU_ARCH=s390
15932      VAR_CPU_BITS=64
15933      VAR_CPU_ENDIAN=big
15934      ;;
15935    sparc)
15936      VAR_CPU=sparc
15937      VAR_CPU_ARCH=sparc
15938      VAR_CPU_BITS=32
15939      VAR_CPU_ENDIAN=big
15940      ;;
15941    sparcv9|sparc64)
15942      VAR_CPU=sparcv9
15943      VAR_CPU_ARCH=sparc
15944      VAR_CPU_BITS=64
15945      VAR_CPU_ENDIAN=big
15946      ;;
15947    *)
15948      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15949      ;;
15950  esac
15951
15952  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15953  OPENJDK_TARGET_OS="$VAR_OS"
15954  if test "x$VAR_OS_TYPE" != x; then
15955    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15956  else
15957    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15958  fi
15959  if test "x$VAR_OS_ENV" != x; then
15960    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15961  else
15962    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15963  fi
15964  OPENJDK_TARGET_CPU="$VAR_CPU"
15965  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15966  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15967  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15968
15969
15970
15971
15972
15973
15974
15975
15976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15977$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15979$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15980
15981
15982
15983# Check whether --with-target-bits was given.
15984if test "${with_target_bits+set}" = set; then :
15985  withval=$with_target_bits;
15986fi
15987
15988
15989  # We have three types of compiles:
15990  # native  == normal compilation, target system == build system
15991  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15992  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15993  #
15994  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15995    # We're doing a proper cross-compilation
15996    COMPILE_TYPE="cross"
15997  else
15998    COMPILE_TYPE="native"
15999  fi
16000
16001  if test "x$with_target_bits" != x; then
16002    if test "x$COMPILE_TYPE" = "xcross"; then
16003      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16004    fi
16005
16006    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16007      # A reduced build is requested
16008      COMPILE_TYPE="reduced"
16009      OPENJDK_TARGET_CPU_BITS=32
16010      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16011        OPENJDK_TARGET_CPU=x86
16012      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16013        OPENJDK_TARGET_CPU=sparc
16014      else
16015        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16016      fi
16017    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16018      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
16019    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16020      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16021$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16022    else
16023      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16024    fi
16025  fi
16026
16027
16028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16029$as_echo_n "checking compilation type... " >&6; }
16030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16031$as_echo "$COMPILE_TYPE" >&6; }
16032
16033
16034  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16035    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16036  else
16037    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16038  fi
16039
16040  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16041    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16042  else
16043    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16044  fi
16045
16046  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16047
16048
16049
16050  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16051    RELEASE_FILE_OS_NAME=SunOS
16052  fi
16053  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16054    RELEASE_FILE_OS_NAME=Linux
16055  fi
16056  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16057    RELEASE_FILE_OS_NAME=Windows
16058  fi
16059  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16060    RELEASE_FILE_OS_NAME="Darwin"
16061  fi
16062  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16063    RELEASE_FILE_OS_NAME="AIX"
16064  fi
16065  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16066
16067
16068
16069
16070
16071
16072  # Also store the legacy naming of the cpu.
16073  # Ie i586 and amd64 instead of x86 and x86_64
16074  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16075  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16076    OPENJDK_TARGET_CPU_LEGACY="i586"
16077  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16078    # On all platforms except MacOSX replace x86_64 with amd64.
16079    OPENJDK_TARGET_CPU_LEGACY="amd64"
16080  fi
16081
16082
16083  # And the second legacy naming of the cpu.
16084  # Ie i386 and amd64 instead of x86 and x86_64.
16085  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16086  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16087    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16088  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16089    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16090  fi
16091
16092
16093  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16094  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16095  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16096  OPENJDK_TARGET_CPU_ISADIR=""
16097  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16098    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16099      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16100    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16101      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16102    fi
16103  fi
16104
16105
16106  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16107  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16108  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16109    # On linux only, we replace x86 with i386.
16110    OPENJDK_TARGET_CPU_OSARCH="i386"
16111  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16112    # On all platforms except macosx, we replace x86_64 with amd64.
16113    OPENJDK_TARGET_CPU_OSARCH="amd64"
16114  fi
16115
16116
16117  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16118  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16119    OPENJDK_TARGET_CPU_JLI="i386"
16120  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16121    # On all platforms except macosx, we replace x86_64 with amd64.
16122    OPENJDK_TARGET_CPU_JLI="amd64"
16123  fi
16124
16125  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16126      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16127  else
16128      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16129  fi
16130
16131
16132  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16133  # Macosx is osx and x86_64 is x64
16134  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16135    OPENJDK_TARGET_OS_BUNDLE="osx"
16136  else
16137    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16138  fi
16139  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16140    OPENJDK_TARGET_CPU_BUNDLE="x64"
16141  else
16142    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16143  fi
16144  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16145
16146
16147  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16148    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16149    # unpack200.exe. This variable is used in
16150    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16151    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16152      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16153    fi
16154  fi
16155
16156  if test "x$COMPILE_TYPE" = "xcross"; then
16157    # FIXME: ... or should this include reduced builds..?
16158    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16159  else
16160    DEFINE_CROSS_COMPILE_ARCH=""
16161  fi
16162
16163
16164  # Convert openjdk platform names to hotspot names
16165
16166  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16167  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16168    HOTSPOT_TARGET_OS=bsd
16169  fi
16170
16171
16172  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16173  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16174    HOTSPOT_TARGET_OS_TYPE=posix
16175  fi
16176
16177
16178  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16179  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16180    HOTSPOT_TARGET_CPU=x86_32
16181  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16182    HOTSPOT_TARGET_CPU=sparc
16183  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16184    HOTSPOT_TARGET_CPU=ppc_64
16185  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16186    HOTSPOT_TARGET_CPU=ppc_64
16187  fi
16188
16189
16190  # This is identical with OPENJDK_*, but define anyway for consistency.
16191  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16192
16193
16194  # Setup HOTSPOT_TARGET_CPU_DEFINE
16195  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16196    HOTSPOT_TARGET_CPU_DEFINE=IA32
16197  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16198    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16199  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16200    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16201  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16202    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16203  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16204    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16205  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16206    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16207
16208  # The cpu defines below are for zero, we don't support them directly.
16209  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16210    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16211  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16212    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16213  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16214    HOTSPOT_TARGET_CPU_DEFINE=S390
16215  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16216    HOTSPOT_TARGET_CPU_DEFINE=S390
16217  elif test "x$OPENJDK_TARGET_CPU" != x; then
16218    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16219  fi
16220
16221
16222
16223
16224  # Also store the legacy naming of the cpu.
16225  # Ie i586 and amd64 instead of x86 and x86_64
16226  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16227  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16228    OPENJDK_BUILD_CPU_LEGACY="i586"
16229  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16230    # On all platforms except MacOSX replace x86_64 with amd64.
16231    OPENJDK_BUILD_CPU_LEGACY="amd64"
16232  fi
16233
16234
16235  # And the second legacy naming of the cpu.
16236  # Ie i386 and amd64 instead of x86 and x86_64.
16237  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16238  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16239    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16240  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16241    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16242  fi
16243
16244
16245  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16246  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16247  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16248  OPENJDK_BUILD_CPU_ISADIR=""
16249  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16250    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16251      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16252    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16253      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16254    fi
16255  fi
16256
16257
16258  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16259  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16260  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16261    # On linux only, we replace x86 with i386.
16262    OPENJDK_BUILD_CPU_OSARCH="i386"
16263  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16264    # On all platforms except macosx, we replace x86_64 with amd64.
16265    OPENJDK_BUILD_CPU_OSARCH="amd64"
16266  fi
16267
16268
16269  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16270  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16271    OPENJDK_BUILD_CPU_JLI="i386"
16272  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16273    # On all platforms except macosx, we replace x86_64 with amd64.
16274    OPENJDK_BUILD_CPU_JLI="amd64"
16275  fi
16276
16277  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16278      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16279  else
16280      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16281  fi
16282
16283
16284  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16285  # Macosx is osx and x86_64 is x64
16286  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16287    OPENJDK_BUILD_OS_BUNDLE="osx"
16288  else
16289    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16290  fi
16291  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16292    OPENJDK_BUILD_CPU_BUNDLE="x64"
16293  else
16294    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16295  fi
16296  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16297
16298
16299  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16300    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16301    # unpack200.exe. This variable is used in
16302    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16303    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16304      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16305    fi
16306  fi
16307
16308  if test "x$COMPILE_TYPE" = "xcross"; then
16309    # FIXME: ... or should this include reduced builds..?
16310    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16311  else
16312    DEFINE_CROSS_COMPILE_ARCH=""
16313  fi
16314
16315
16316  # Convert openjdk platform names to hotspot names
16317
16318  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16319  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16320    HOTSPOT_BUILD_OS=bsd
16321  fi
16322
16323
16324  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16325  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16326    HOTSPOT_BUILD_OS_TYPE=posix
16327  fi
16328
16329
16330  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16331  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16332    HOTSPOT_BUILD_CPU=x86_32
16333  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16334    HOTSPOT_BUILD_CPU=sparc
16335  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16336    HOTSPOT_BUILD_CPU=ppc_64
16337  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16338    HOTSPOT_BUILD_CPU=ppc_64
16339  fi
16340
16341
16342  # This is identical with OPENJDK_*, but define anyway for consistency.
16343  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16344
16345
16346  # Setup HOTSPOT_BUILD_CPU_DEFINE
16347  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16348    HOTSPOT_BUILD_CPU_DEFINE=IA32
16349  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16350    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16351  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16352    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16353  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16354    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16355  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16356    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16357  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16358    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16359
16360  # The cpu defines below are for zero, we don't support them directly.
16361  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16362    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16363  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16364    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16365  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16366    HOTSPOT_BUILD_CPU_DEFINE=S390
16367  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16368    HOTSPOT_BUILD_CPU_DEFINE=S390
16369  elif test "x$OPENJDK_BUILD_CPU" != x; then
16370    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16371  fi
16372
16373
16374
16375
16376
16377
16378# Continue setting up basic stuff. Most remaining code require fundamental tools.
16379
16380  # Save the current directory this script was started from
16381  CURDIR="$PWD"
16382
16383  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16384  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16385  # was not available at that time.
16386  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16387  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16388    ORIGINAL_PATH="$REWRITTEN_PATH"
16389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16390$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16391  fi
16392
16393  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16394    PATH_SEP=";"
16395
16396  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16397  if test $SRC_ROOT_LENGTH -gt 100; then
16398    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16399  fi
16400
16401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16403$as_echo_n "checking cygwin release... " >&6; }
16404    CYGWIN_VERSION=`$UNAME -r`
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16406$as_echo "$CYGWIN_VERSION" >&6; }
16407    WINDOWS_ENV_VENDOR='cygwin'
16408    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16409
16410    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16411    if test "x$CYGWIN_VERSION_OLD" != x; then
16412      { $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
16413$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;}
16414      as_fn_error $? "Cannot continue" "$LINENO" 5
16415    fi
16416    if test "x$CYGPATH" = x; then
16417      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16418    fi
16419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16420$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16421    # The cmd output ends with Windows line endings (CR/LF)
16422    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16423    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16424    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16426$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16427    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16428    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16429    if test "x$test_cygdrive_prefix" = x; then
16430      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16431    fi
16432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16434$as_echo_n "checking msys release... " >&6; }
16435    MSYS_VERSION=`$UNAME -r`
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16437$as_echo "$MSYS_VERSION" >&6; }
16438
16439    WINDOWS_ENV_VENDOR='msys'
16440    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16441
16442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16443$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16444    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16445    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16446
16447  windows_path="$MSYS_ROOT_PATH"
16448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16449    unix_path=`$CYGPATH -u "$windows_path"`
16450    MSYS_ROOT_PATH="$unix_path"
16451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16453    MSYS_ROOT_PATH="$unix_path"
16454  fi
16455
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16457$as_echo "$MSYS_ROOT_PATH" >&6; }
16458    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16459  else
16460    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16461  fi
16462
16463  # Test if windows or unix (cygwin/msys) find is first in path.
16464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16465$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16466  FIND_BINARY_OUTPUT=`find --version 2>&1`
16467  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16469$as_echo "unix style" >&6; }
16470  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16472$as_echo "Windows" >&6; }
16473    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16474$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16475    { $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
16476$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16477    as_fn_error $? "Cannot continue" "$LINENO" 5
16478  else
16479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16480$as_echo "unknown" >&6; }
16481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16482$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16483  fi
16484
16485  else
16486    PATH_SEP=":"
16487  fi
16488
16489
16490  # We get the top-level directory from the supporting wrappers.
16491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16492$as_echo_n "checking for top-level directory... " >&6; }
16493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16494$as_echo "$TOPDIR" >&6; }
16495
16496
16497  # Save the original version of TOPDIR for string comparisons
16498  ORIGINAL_TOPDIR="$TOPDIR"
16499
16500
16501  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16502
16503  # Only process if variable expands to non-empty
16504
16505  if test "x$CURDIR" != x; then
16506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16507
16508  # Input might be given as Windows format, start by converting to
16509  # unix format.
16510  path="$CURDIR"
16511  new_path=`$CYGPATH -u "$path"`
16512
16513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16516  # "foo.exe" is OK but "foo" is an error.
16517  #
16518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16519  # It is also a way to make sure we got the proper file name for the real test later on.
16520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16521  if test "x$test_shortpath" = x; then
16522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16523$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16524    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16525  fi
16526
16527  # Call helper function which possibly converts this using DOS-style short mode.
16528  # If so, the updated path is stored in $new_path.
16529
16530  input_path="$new_path"
16531  # Check if we need to convert this using DOS-style short mode. If the path
16532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16533  # take no chances and rewrite it.
16534  # Note: m4 eats our [], so we need to use [ and ] instead.
16535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16536  if test "x$has_forbidden_chars" != x; then
16537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16541      # Going to short mode and back again did indeed matter. Since short mode is
16542      # case insensitive, let's make it lowercase to improve readability.
16543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16544      # Now convert it back to Unix-style (cygpath)
16545      input_path=`$CYGPATH -u "$shortmode_path"`
16546      new_path="$input_path"
16547    fi
16548  fi
16549
16550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16551  if test "x$test_cygdrive_prefix" = x; then
16552    # As a simple fix, exclude /usr/bin since it's not a real path.
16553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16555      # a path prefixed by /cygdrive for fixpath to work.
16556      new_path="$CYGWIN_ROOT_PATH$input_path"
16557    fi
16558  fi
16559
16560
16561  if test "x$path" != "x$new_path"; then
16562    CURDIR="$new_path"
16563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16564$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16565  fi
16566
16567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16568
16569  path="$CURDIR"
16570  has_colon=`$ECHO $path | $GREP ^.:`
16571  new_path="$path"
16572  if test "x$has_colon" = x; then
16573    # Not in mixed or Windows style, start by that.
16574    new_path=`cmd //c echo $path`
16575  fi
16576
16577
16578  input_path="$new_path"
16579  # Check if we need to convert this using DOS-style short mode. If the path
16580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16581  # take no chances and rewrite it.
16582  # Note: m4 eats our [], so we need to use [ and ] instead.
16583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16584  if test "x$has_forbidden_chars" != x; then
16585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16587  fi
16588
16589
16590  windows_path="$new_path"
16591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16592    unix_path=`$CYGPATH -u "$windows_path"`
16593    new_path="$unix_path"
16594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16596    new_path="$unix_path"
16597  fi
16598
16599  if test "x$path" != "x$new_path"; then
16600    CURDIR="$new_path"
16601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16602$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16603  fi
16604
16605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16607
16608    else
16609      # We're on a unix platform. Hooray! :)
16610      path="$CURDIR"
16611      has_space=`$ECHO "$path" | $GREP " "`
16612      if test "x$has_space" != x; then
16613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16614$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16616      fi
16617
16618      # Use eval to expand a potential ~
16619      eval path="$path"
16620      if test ! -f "$path" && test ! -d "$path"; then
16621        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16622      fi
16623
16624      if test -d "$path"; then
16625        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16626      else
16627        dir="`$DIRNAME "$path"`"
16628        base="`$BASENAME "$path"`"
16629        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16630      fi
16631    fi
16632  fi
16633
16634
16635  # Only process if variable expands to non-empty
16636
16637  if test "x$TOPDIR" != x; then
16638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16639
16640  # Input might be given as Windows format, start by converting to
16641  # unix format.
16642  path="$TOPDIR"
16643  new_path=`$CYGPATH -u "$path"`
16644
16645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16648  # "foo.exe" is OK but "foo" is an error.
16649  #
16650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16651  # It is also a way to make sure we got the proper file name for the real test later on.
16652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16653  if test "x$test_shortpath" = x; then
16654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16655$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16656    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16657  fi
16658
16659  # Call helper function which possibly converts this using DOS-style short mode.
16660  # If so, the updated path is stored in $new_path.
16661
16662  input_path="$new_path"
16663  # Check if we need to convert this using DOS-style short mode. If the path
16664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16665  # take no chances and rewrite it.
16666  # Note: m4 eats our [], so we need to use [ and ] instead.
16667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16668  if test "x$has_forbidden_chars" != x; then
16669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16673      # Going to short mode and back again did indeed matter. Since short mode is
16674      # case insensitive, let's make it lowercase to improve readability.
16675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16676      # Now convert it back to Unix-style (cygpath)
16677      input_path=`$CYGPATH -u "$shortmode_path"`
16678      new_path="$input_path"
16679    fi
16680  fi
16681
16682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16683  if test "x$test_cygdrive_prefix" = x; then
16684    # As a simple fix, exclude /usr/bin since it's not a real path.
16685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16687      # a path prefixed by /cygdrive for fixpath to work.
16688      new_path="$CYGWIN_ROOT_PATH$input_path"
16689    fi
16690  fi
16691
16692
16693  if test "x$path" != "x$new_path"; then
16694    TOPDIR="$new_path"
16695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16696$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16697  fi
16698
16699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16700
16701  path="$TOPDIR"
16702  has_colon=`$ECHO $path | $GREP ^.:`
16703  new_path="$path"
16704  if test "x$has_colon" = x; then
16705    # Not in mixed or Windows style, start by that.
16706    new_path=`cmd //c echo $path`
16707  fi
16708
16709
16710  input_path="$new_path"
16711  # Check if we need to convert this using DOS-style short mode. If the path
16712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16713  # take no chances and rewrite it.
16714  # Note: m4 eats our [], so we need to use [ and ] instead.
16715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16716  if test "x$has_forbidden_chars" != x; then
16717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16719  fi
16720
16721
16722  windows_path="$new_path"
16723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16724    unix_path=`$CYGPATH -u "$windows_path"`
16725    new_path="$unix_path"
16726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16728    new_path="$unix_path"
16729  fi
16730
16731  if test "x$path" != "x$new_path"; then
16732    TOPDIR="$new_path"
16733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16734$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16735  fi
16736
16737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16739
16740    else
16741      # We're on a unix platform. Hooray! :)
16742      path="$TOPDIR"
16743      has_space=`$ECHO "$path" | $GREP " "`
16744      if test "x$has_space" != x; then
16745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16746$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16748      fi
16749
16750      # Use eval to expand a potential ~
16751      eval path="$path"
16752      if test ! -f "$path" && test ! -d "$path"; then
16753        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16754      fi
16755
16756      if test -d "$path"; then
16757        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16758      else
16759        dir="`$DIRNAME "$path"`"
16760        base="`$BASENAME "$path"`"
16761        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16762      fi
16763    fi
16764  fi
16765
16766  # SRC_ROOT is a traditional alias for TOPDIR.
16767  SRC_ROOT=$TOPDIR
16768
16769  # Calculate a canonical version of TOPDIR for string comparisons
16770  CANONICAL_TOPDIR=$TOPDIR
16771
16772  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16773    # Follow a chain of symbolic links. Use readlink
16774    # where it exists, else fall back to horribly
16775    # complicated shell code.
16776    if test "x$READLINK_TESTED" != yes; then
16777      # On MacOSX there is a readlink tool with a different
16778      # purpose than the GNU readlink tool. Check the found readlink.
16779      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16780      if test "x$ISGNU" = x; then
16781        # A readlink that we do not know how to use.
16782        # Are there other non-GNU readlinks out there?
16783        READLINK_TESTED=yes
16784        READLINK=
16785      fi
16786    fi
16787
16788    if test "x$READLINK" != x; then
16789      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16790    else
16791      # Save the current directory for restoring afterwards
16792      STARTDIR=$PWD
16793      COUNTER=0
16794      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16795      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16796      cd $sym_link_dir
16797      # Use -P flag to resolve symlinks in directories.
16798      cd `$THEPWDCMD -P`
16799      sym_link_dir=`$THEPWDCMD -P`
16800      # Resolve file symlinks
16801      while test $COUNTER -lt 20; do
16802        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16803        if test "x$ISLINK" == x; then
16804          # This is not a symbolic link! We are done!
16805          break
16806        fi
16807        # Again resolve directory symlinks since the target of the just found
16808        # link could be in a different directory
16809        cd `$DIRNAME $ISLINK`
16810        sym_link_dir=`$THEPWDCMD -P`
16811        sym_link_file=`$BASENAME $ISLINK`
16812        let COUNTER=COUNTER+1
16813      done
16814      cd $STARTDIR
16815      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16816    fi
16817  fi
16818
16819
16820
16821  # Locate the directory of this script.
16822  AUTOCONF_DIR=$TOPDIR/common/autoconf
16823
16824  # Setup username (for use in adhoc version strings etc)
16825  # Outer [ ] to quote m4.
16826   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16827
16828
16829
16830# Check if it's a pure open build or if custom sources are to be used.
16831
16832  # Check whether --enable-openjdk-only was given.
16833if test "${enable_openjdk_only+set}" = set; then :
16834  enableval=$enable_openjdk_only;
16835else
16836  enable_openjdk_only="no"
16837fi
16838
16839
16840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16841$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16843$as_echo "$enable_openjdk_only" >&6; }
16844  if test "x$enable_openjdk_only" = "xyes"; then
16845    SUPPRESS_CUSTOM_EXTENSIONS="true"
16846  elif test "x$enable_openjdk_only" = "xno"; then
16847    SUPPRESS_CUSTOM_EXTENSIONS="false"
16848  else
16849    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16850  fi
16851
16852  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16853  # the IncludeCustomExtension macro.
16854
16855
16856# Check whether --with-custom-make-dir was given.
16857if test "${with_custom_make_dir+set}" = set; then :
16858  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
16859$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16860fi
16861
16862
16863
16864
16865# These are needed to be able to create a configuration name (and thus the output directory)
16866
16867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16868$as_echo_n "checking which variant of the JDK to build... " >&6; }
16869
16870# Check whether --with-jdk-variant was given.
16871if test "${with_jdk_variant+set}" = set; then :
16872  withval=$with_jdk_variant;
16873fi
16874
16875
16876  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16877    JDK_VARIANT="normal"
16878  else
16879    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16880  fi
16881
16882
16883
16884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16885$as_echo "$JDK_VARIANT" >&6; }
16886
16887
16888  DEBUG_LEVEL="release"
16889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16890$as_echo_n "checking which debug level to use... " >&6; }
16891  # Check whether --enable-debug was given.
16892if test "${enable_debug+set}" = set; then :
16893  enableval=$enable_debug;
16894        ENABLE_DEBUG="${enableval}"
16895        DEBUG_LEVEL="fastdebug"
16896
16897else
16898  ENABLE_DEBUG="no"
16899fi
16900
16901
16902
16903# Check whether --with-debug-level was given.
16904if test "${with_debug_level+set}" = set; then :
16905  withval=$with_debug_level;
16906        DEBUG_LEVEL="${withval}"
16907        if test "x$ENABLE_DEBUG" = xyes; then
16908          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16909        fi
16910
16911fi
16912
16913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16914$as_echo "$DEBUG_LEVEL" >&6; }
16915
16916  if test "x$DEBUG_LEVEL" != xrelease && \
16917      test "x$DEBUG_LEVEL" != xoptimized && \
16918      test "x$DEBUG_LEVEL" != xfastdebug && \
16919      test "x$DEBUG_LEVEL" != xslowdebug; then
16920    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16921  fi
16922
16923  # Translate DEBUG_LEVEL to debug level used by Hotspot
16924  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16925  if test "x$DEBUG_LEVEL" = xrelease; then
16926    HOTSPOT_DEBUG_LEVEL="product"
16927  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16928    HOTSPOT_DEBUG_LEVEL="debug"
16929  fi
16930
16931  if test "x$DEBUG_LEVEL" = xoptimized; then
16932    # The debug level 'optimized' is a little special because it is currently only
16933    # applicable to the HotSpot build where it means to build a completely
16934    # optimized version of the VM without any debugging code (like for the
16935    # 'release' debug level which is called 'product' in the HotSpot build) but
16936    # with the exception that it can contain additional code which is otherwise
16937    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16938    # test new and/or experimental features which are not intended for customer
16939    # shipment. Because these new features need to be tested and benchmarked in
16940    # real world scenarios, we want to build the containing JDK at the 'release'
16941    # debug level.
16942    DEBUG_LEVEL="release"
16943  fi
16944
16945
16946
16947
16948
16949
16950# Check whether --with-jvm-variants was given.
16951if test "${with_jvm_variants+set}" = set; then :
16952  withval=$with_jvm_variants;
16953fi
16954
16955
16956
16957
16958# Check whether --with-cpu-port was given.
16959if test "${with_cpu_port+set}" = set; then :
16960  withval=$with_cpu_port;
16961fi
16962
16963
16964  if test "x$with_cpu_port" != x; then
16965    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16966      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16967    fi
16968    if test "x$with_cpu_port" != xarm64 && \
16969        test "x$with_cpu_port" != xaarch64; then
16970      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16971    fi
16972    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16973  fi
16974
16975
16976  if test "x$with_jvm_variants" = x; then
16977    with_jvm_variants="server"
16978  fi
16979  JVM_VARIANTS_OPT="$with_jvm_variants"
16980
16981  # Has the user listed more than one variant?
16982  # Additional [] needed to keep m4 from mangling shell constructs.
16983  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16984    BUILDING_MULTIPLE_JVM_VARIANTS=true
16985  else
16986    BUILDING_MULTIPLE_JVM_VARIANTS=false
16987  fi
16988  # Replace the commas with AND for use in the build directory name.
16989  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16990
16991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16992$as_echo_n "checking which variants of the JVM to build... " >&6; }
16993  # JVM_VARIANTS is a space-separated list.
16994  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16995  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16997$as_echo "$JVM_VARIANTS" >&6; }
16998
16999  # Check that the selected variants are valid
17000
17001  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17002  # Notice that the original variant failes on SLES 10 and 11
17003  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17004  STACK=${JVM_VARIANTS// /$'\n'}
17005  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17006  if test "x$INVALID_VARIANTS" != x; then
17007    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17008$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17009    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17010  fi
17011
17012  # All "special" variants share the same output directory ("server")
17013  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17014  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17015  STACK=${JVM_VARIANTS// /$'\n'}
17016  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17017  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17018    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17019  fi
17020
17021  # The "main" variant is the one used by other libs to link against during the
17022  # build.
17023  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17024    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17025    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17026      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17027        JVM_VARIANT_MAIN="$variant"
17028        break
17029      fi
17030    done
17031  else
17032    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17033  fi
17034
17035
17036
17037
17038
17039  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17040    # zero behaves as a platform and rewrites these values. This is really weird. :(
17041    # We are guaranteed that we do not build any other variants when building zero.
17042    HOTSPOT_TARGET_CPU=zero
17043    HOTSPOT_TARGET_CPU_ARCH=zero
17044  fi
17045
17046
17047# With basic setup done, call the custom early hook.
17048
17049
17050# Check if we have devkits, extra paths or sysroot set.
17051
17052
17053# Check whether --with-devkit was given.
17054if test "${with_devkit+set}" = set; then :
17055  withval=$with_devkit;
17056
17057  # Only process if variable expands to non-empty
17058
17059  if test "x$with_devkit" != x; then
17060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17061
17062  # Input might be given as Windows format, start by converting to
17063  # unix format.
17064  path="$with_devkit"
17065  new_path=`$CYGPATH -u "$path"`
17066
17067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17070  # "foo.exe" is OK but "foo" is an error.
17071  #
17072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17073  # It is also a way to make sure we got the proper file name for the real test later on.
17074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17075  if test "x$test_shortpath" = x; then
17076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17077$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17078    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17079  fi
17080
17081  # Call helper function which possibly converts this using DOS-style short mode.
17082  # If so, the updated path is stored in $new_path.
17083
17084  input_path="$new_path"
17085  # Check if we need to convert this using DOS-style short mode. If the path
17086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17087  # take no chances and rewrite it.
17088  # Note: m4 eats our [], so we need to use [ and ] instead.
17089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17090  if test "x$has_forbidden_chars" != x; then
17091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17095      # Going to short mode and back again did indeed matter. Since short mode is
17096      # case insensitive, let's make it lowercase to improve readability.
17097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17098      # Now convert it back to Unix-style (cygpath)
17099      input_path=`$CYGPATH -u "$shortmode_path"`
17100      new_path="$input_path"
17101    fi
17102  fi
17103
17104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17105  if test "x$test_cygdrive_prefix" = x; then
17106    # As a simple fix, exclude /usr/bin since it's not a real path.
17107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17109      # a path prefixed by /cygdrive for fixpath to work.
17110      new_path="$CYGWIN_ROOT_PATH$input_path"
17111    fi
17112  fi
17113
17114
17115  if test "x$path" != "x$new_path"; then
17116    with_devkit="$new_path"
17117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17118$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17119  fi
17120
17121    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17122
17123  path="$with_devkit"
17124  has_colon=`$ECHO $path | $GREP ^.:`
17125  new_path="$path"
17126  if test "x$has_colon" = x; then
17127    # Not in mixed or Windows style, start by that.
17128    new_path=`cmd //c echo $path`
17129  fi
17130
17131
17132  input_path="$new_path"
17133  # Check if we need to convert this using DOS-style short mode. If the path
17134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17135  # take no chances and rewrite it.
17136  # Note: m4 eats our [], so we need to use [ and ] instead.
17137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17138  if test "x$has_forbidden_chars" != x; then
17139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17141  fi
17142
17143
17144  windows_path="$new_path"
17145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17146    unix_path=`$CYGPATH -u "$windows_path"`
17147    new_path="$unix_path"
17148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17150    new_path="$unix_path"
17151  fi
17152
17153  if test "x$path" != "x$new_path"; then
17154    with_devkit="$new_path"
17155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17156$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17157  fi
17158
17159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17161
17162    else
17163      # We're on a unix platform. Hooray! :)
17164      path="$with_devkit"
17165      has_space=`$ECHO "$path" | $GREP " "`
17166      if test "x$has_space" != x; then
17167        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17168$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17169        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17170      fi
17171
17172      # Use eval to expand a potential ~
17173      eval path="$path"
17174      if test ! -f "$path" && test ! -d "$path"; then
17175        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17176      fi
17177
17178      if test -d "$path"; then
17179        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17180      else
17181        dir="`$DIRNAME "$path"`"
17182        base="`$BASENAME "$path"`"
17183        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17184      fi
17185    fi
17186  fi
17187
17188        DEVKIT_ROOT="$with_devkit"
17189        # Check for a meta data info file in the root of the devkit
17190        if test -f "$DEVKIT_ROOT/devkit.info"; then
17191          . $DEVKIT_ROOT/devkit.info
17192          # This potentially sets the following:
17193          # A descriptive name of the devkit
17194
17195  if test "x$DEVKIT_NAME" = x; then
17196    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17197  fi
17198
17199          # Corresponds to --with-extra-path
17200
17201  if test "x$DEVKIT_EXTRA_PATH" = x; then
17202    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17203  fi
17204
17205          # Corresponds to --with-toolchain-path
17206
17207  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17208    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17209  fi
17210
17211          # Corresponds to --with-sysroot
17212
17213  if test "x$DEVKIT_SYSROOT" = x; then
17214    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17215  fi
17216
17217
17218          # Identifies the Visual Studio version in the devkit
17219
17220  if test "x$DEVKIT_VS_VERSION" = x; then
17221    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17222  fi
17223
17224          # The Visual Studio include environment variable
17225
17226  if test "x$DEVKIT_VS_INCLUDE" = x; then
17227    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17228  fi
17229
17230          # The Visual Studio lib environment variable
17231
17232  if test "x$DEVKIT_VS_LIB" = x; then
17233    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17234  fi
17235
17236          # Corresponds to --with-msvcr-dll
17237
17238  if test "x$DEVKIT_MSVCR_DLL" = x; then
17239    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17240  fi
17241
17242          # Corresponds to --with-msvcp-dll
17243
17244  if test "x$DEVKIT_MSVCP_DLL" = x; then
17245    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17246  fi
17247
17248        fi
17249
17250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17251$as_echo_n "checking for devkit... " >&6; }
17252        if test "x$DEVKIT_NAME" != x; then
17253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17254$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17255        else
17256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17257$as_echo "$DEVKIT_ROOT" >&6; }
17258        fi
17259
17260
17261  if test "x$DEVKIT_EXTRA_PATH" != x; then
17262    if test "x$EXTRA_PATH" = x; then
17263      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17264    else
17265      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17266    fi
17267  fi
17268
17269
17270        # Fallback default of just /bin if DEVKIT_PATH is not defined
17271        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17272          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17273        fi
17274
17275  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17276    if test "x$TOOLCHAIN_PATH" = x; then
17277      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17278    else
17279      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17280    fi
17281  fi
17282
17283
17284        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17285        # places for backwards compatiblity.
17286        if test "x$DEVKIT_SYSROOT" != x; then
17287          SYSROOT="$DEVKIT_SYSROOT"
17288        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17289          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17290        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17291          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17292        fi
17293
17294
17295fi
17296
17297
17298  # You can force the sysroot if the sysroot encoded into the compiler tools
17299  # is not correct.
17300
17301# Check whether --with-sys-root was given.
17302if test "${with_sys_root+set}" = set; then :
17303  withval=$with_sys_root; SYSROOT=$with_sys_root
17304
17305fi
17306
17307
17308
17309# Check whether --with-sysroot was given.
17310if test "${with_sysroot+set}" = set; then :
17311  withval=$with_sysroot; SYSROOT=$with_sysroot
17312
17313fi
17314
17315
17316
17317# Check whether --with-tools-dir was given.
17318if test "${with_tools_dir+set}" = set; then :
17319  withval=$with_tools_dir;
17320  if test "x$with_tools_dir" != x; then
17321    if test "x$TOOLCHAIN_PATH" = x; then
17322      TOOLCHAIN_PATH="$with_tools_dir"
17323    else
17324      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17325    fi
17326  fi
17327
17328
17329fi
17330
17331
17332
17333# Check whether --with-toolchain-path was given.
17334if test "${with_toolchain_path+set}" = set; then :
17335  withval=$with_toolchain_path;
17336  if test "x$with_toolchain_path" != x; then
17337    if test "x$TOOLCHAIN_PATH" = x; then
17338      TOOLCHAIN_PATH="$with_toolchain_path"
17339    else
17340      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17341    fi
17342  fi
17343
17344
17345fi
17346
17347
17348
17349# Check whether --with-extra-path was given.
17350if test "${with_extra_path+set}" = set; then :
17351  withval=$with_extra_path;
17352  if test "x$with_extra_path" != x; then
17353    if test "x$EXTRA_PATH" = x; then
17354      EXTRA_PATH="$with_extra_path"
17355    else
17356      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17357    fi
17358  fi
17359
17360
17361fi
17362
17363
17364  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17365    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17366    # If not, detect if Xcode is installed by running xcodebuild -version
17367    # if no Xcode installed, xcodebuild exits with 1
17368    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17369    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17370      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17371      # fall back on the stub binary in /usr/bin/xcodebuild
17372      # Extract the first word of "xcodebuild", so it can be a program name with args.
17373set dummy xcodebuild; ac_word=$2
17374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17375$as_echo_n "checking for $ac_word... " >&6; }
17376if ${ac_cv_path_XCODEBUILD+:} false; then :
17377  $as_echo_n "(cached) " >&6
17378else
17379  case $XCODEBUILD in
17380  [\\/]* | ?:[\\/]*)
17381  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17382  ;;
17383  *)
17384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17385for as_dir in $TOOLCHAIN_PATH
17386do
17387  IFS=$as_save_IFS
17388  test -z "$as_dir" && as_dir=.
17389    for ac_exec_ext in '' $ac_executable_extensions; do
17390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17391    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17393    break 2
17394  fi
17395done
17396  done
17397IFS=$as_save_IFS
17398
17399  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17400  ;;
17401esac
17402fi
17403XCODEBUILD=$ac_cv_path_XCODEBUILD
17404if test -n "$XCODEBUILD"; then
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17406$as_echo "$XCODEBUILD" >&6; }
17407else
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410fi
17411
17412
17413    else
17414      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17415      # when only the command line tools are installed there are no SDKs, so headers
17416      # are copied into the system frameworks
17417      XCODEBUILD=
17418
17419    fi
17420
17421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17422$as_echo_n "checking for sdk name... " >&6; }
17423
17424# Check whether --with-sdk-name was given.
17425if test "${with_sdk_name+set}" = set; then :
17426  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17427
17428fi
17429
17430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17431$as_echo "$SDKNAME" >&6; }
17432
17433    # if toolchain path is specified then don't rely on system headers, they may not compile
17434    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17435    test -z "$TOOLCHAIN_PATH" && \
17436      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17437
17438    if test -z "$SYSROOT"; then
17439      if test -n "$XCODEBUILD"; then
17440        # if we don't have system headers, use default SDK name (last resort)
17441        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17442          SDKNAME=${SDKNAME:-macosx}
17443        fi
17444
17445        if test -n "$SDKNAME"; then
17446          # Call xcodebuild to determine SYSROOT
17447          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17448        fi
17449      else
17450        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17451          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
17452        fi
17453      fi
17454    else
17455      # warn user if --with-sdk-name was also set
17456      if test -n "$with_sdk_name"; then
17457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17458$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17459      fi
17460    fi
17461
17462    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17463      # If no system framework headers, then SYSROOT must be set, or we won't build
17464      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
17465    fi
17466
17467    # Perform a basic sanity test
17468    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17469      if test -z "$SYSROOT"; then
17470        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
17471      else
17472        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17473      fi
17474    fi
17475
17476    # set SDKROOT too, Xcode tools will pick it up
17477    SDKROOT="$SYSROOT"
17478
17479  fi
17480
17481  # Prepend the extra path to the global path
17482
17483  if test "x$EXTRA_PATH" != x; then
17484    if test "x$PATH" = x; then
17485      PATH="$EXTRA_PATH"
17486    else
17487      PATH="$EXTRA_PATH:$PATH"
17488    fi
17489  fi
17490
17491
17492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17493$as_echo_n "checking for sysroot... " >&6; }
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17495$as_echo "$SYSROOT" >&6; }
17496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17497$as_echo_n "checking for toolchain path... " >&6; }
17498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17499$as_echo "$TOOLCHAIN_PATH" >&6; }
17500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17501$as_echo_n "checking for extra path... " >&6; }
17502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17503$as_echo "$EXTRA_PATH" >&6; }
17504
17505
17506# To properly create a configuration name, we need to have the OpenJDK target
17507# and options (variants and debug level) parsed.
17508
17509
17510
17511# Check whether --with-conf-name was given.
17512if test "${with_conf_name+set}" = set; then :
17513  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17514fi
17515
17516
17517  # Test from where we are running configure, in or outside of src root.
17518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17519$as_echo_n "checking where to store configuration... " >&6; }
17520  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17521      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17522      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17523    # We are running configure from the src root.
17524    # Create a default ./build/target-variant-debuglevel output root.
17525    if test "x${CONF_NAME}" = x; then
17526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17527$as_echo "in default location" >&6; }
17528      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17529    else
17530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17531$as_echo "in build directory with custom name" >&6; }
17532    fi
17533    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17534    $MKDIR -p "$OUTPUT_ROOT"
17535    if test ! -d "$OUTPUT_ROOT"; then
17536      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17537    fi
17538  else
17539    # We are running configure from outside of the src dir.
17540    # Then use the current directory as output dir!
17541    # If configuration is situated in normal build directory, just use the build
17542    # directory name as configuration name, otherwise use the complete path.
17543    if test "x${CONF_NAME}" = x; then
17544      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17545    fi
17546    OUTPUT_ROOT="$CURDIR"
17547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17548$as_echo "in current directory" >&6; }
17549
17550    # WARNING: This might be a bad thing to do. You need to be sure you want to
17551    # have a configuration in this directory. Do some sanity checks!
17552
17553    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17554      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17555      # other files
17556      files_present=`$LS $OUTPUT_ROOT`
17557      # Configure has already touched config.log and confdefs.h in the current dir when this check
17558      # is performed.
17559      filtered_files=`$ECHO "$files_present" \
17560          | $SED -e 's/config.log//g' \
17561              -e 's/configure.log//g' \
17562              -e 's/confdefs.h//g' \
17563              -e 's/ //g' \
17564          | $TR -d '\n'`
17565      if test "x$filtered_files" != x; then
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17567$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17568        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17569$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17570        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17571$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17572        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17573$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17574        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17575$as_echo "$as_me: seriously mess up just about everything." >&6;}
17576        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17577$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17578        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17579$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17580        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17581      fi
17582    fi
17583  fi
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17585$as_echo_n "checking what configuration name to use... " >&6; }
17586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17587$as_echo "$CONF_NAME" >&6; }
17588
17589
17590  # Only process if variable expands to non-empty
17591
17592  if test "x$OUTPUT_ROOT" != x; then
17593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17594
17595  # Input might be given as Windows format, start by converting to
17596  # unix format.
17597  path="$OUTPUT_ROOT"
17598  new_path=`$CYGPATH -u "$path"`
17599
17600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17603  # "foo.exe" is OK but "foo" is an error.
17604  #
17605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17606  # It is also a way to make sure we got the proper file name for the real test later on.
17607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17608  if test "x$test_shortpath" = x; then
17609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17610$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17611    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17612  fi
17613
17614  # Call helper function which possibly converts this using DOS-style short mode.
17615  # If so, the updated path is stored in $new_path.
17616
17617  input_path="$new_path"
17618  # Check if we need to convert this using DOS-style short mode. If the path
17619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17620  # take no chances and rewrite it.
17621  # Note: m4 eats our [], so we need to use [ and ] instead.
17622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17623  if test "x$has_forbidden_chars" != x; then
17624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17628      # Going to short mode and back again did indeed matter. Since short mode is
17629      # case insensitive, let's make it lowercase to improve readability.
17630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17631      # Now convert it back to Unix-style (cygpath)
17632      input_path=`$CYGPATH -u "$shortmode_path"`
17633      new_path="$input_path"
17634    fi
17635  fi
17636
17637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17638  if test "x$test_cygdrive_prefix" = x; then
17639    # As a simple fix, exclude /usr/bin since it's not a real path.
17640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17642      # a path prefixed by /cygdrive for fixpath to work.
17643      new_path="$CYGWIN_ROOT_PATH$input_path"
17644    fi
17645  fi
17646
17647
17648  if test "x$path" != "x$new_path"; then
17649    OUTPUT_ROOT="$new_path"
17650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17651$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17652  fi
17653
17654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17655
17656  path="$OUTPUT_ROOT"
17657  has_colon=`$ECHO $path | $GREP ^.:`
17658  new_path="$path"
17659  if test "x$has_colon" = x; then
17660    # Not in mixed or Windows style, start by that.
17661    new_path=`cmd //c echo $path`
17662  fi
17663
17664
17665  input_path="$new_path"
17666  # Check if we need to convert this using DOS-style short mode. If the path
17667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17668  # take no chances and rewrite it.
17669  # Note: m4 eats our [], so we need to use [ and ] instead.
17670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17671  if test "x$has_forbidden_chars" != x; then
17672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17674  fi
17675
17676
17677  windows_path="$new_path"
17678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17679    unix_path=`$CYGPATH -u "$windows_path"`
17680    new_path="$unix_path"
17681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17683    new_path="$unix_path"
17684  fi
17685
17686  if test "x$path" != "x$new_path"; then
17687    OUTPUT_ROOT="$new_path"
17688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17689$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17690  fi
17691
17692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17694
17695    else
17696      # We're on a unix platform. Hooray! :)
17697      path="$OUTPUT_ROOT"
17698      has_space=`$ECHO "$path" | $GREP " "`
17699      if test "x$has_space" != x; then
17700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17701$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17703      fi
17704
17705      # Use eval to expand a potential ~
17706      eval path="$path"
17707      if test ! -f "$path" && test ! -d "$path"; then
17708        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17709      fi
17710
17711      if test -d "$path"; then
17712        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17713      else
17714        dir="`$DIRNAME "$path"`"
17715        base="`$BASENAME "$path"`"
17716        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17717      fi
17718    fi
17719  fi
17720
17721
17722  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17723  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17724
17725  SPEC="$OUTPUT_ROOT/spec.gmk"
17726
17727
17728
17729
17730
17731  # The spec.gmk file contains all variables for the make system.
17732  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17733
17734  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17735  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17736
17737  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17738  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17739
17740  # The compare.sh is used to compare the build output to other builds.
17741  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17742
17743  # The generated Makefile knows where the spec.gmk is and where the source is.
17744  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17745  # which will look for generated configurations
17746  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17747
17748
17749
17750# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17751
17752  for ac_prog in apt-get yum brew port pkgutil pkgadd
17753do
17754  # Extract the first word of "$ac_prog", so it can be a program name with args.
17755set dummy $ac_prog; ac_word=$2
17756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17757$as_echo_n "checking for $ac_word... " >&6; }
17758if ${ac_cv_prog_PKGHANDLER+:} false; then :
17759  $as_echo_n "(cached) " >&6
17760else
17761  if test -n "$PKGHANDLER"; then
17762  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17763else
17764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17765for as_dir in $PATH
17766do
17767  IFS=$as_save_IFS
17768  test -z "$as_dir" && as_dir=.
17769    for ac_exec_ext in '' $ac_executable_extensions; do
17770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17771    ac_cv_prog_PKGHANDLER="$ac_prog"
17772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17773    break 2
17774  fi
17775done
17776  done
17777IFS=$as_save_IFS
17778
17779fi
17780fi
17781PKGHANDLER=$ac_cv_prog_PKGHANDLER
17782if test -n "$PKGHANDLER"; then
17783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17784$as_echo "$PKGHANDLER" >&6; }
17785else
17786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17787$as_echo "no" >&6; }
17788fi
17789
17790
17791  test -n "$PKGHANDLER" && break
17792done
17793
17794
17795
17796# Setup tools that requires more complex handling, or that is not needed by the configure script.
17797
17798
17799
17800  # Publish this variable in the help.
17801
17802
17803  if [ -z "${MAKE+x}" ]; then
17804    # The variable is not set by user, try to locate tool using the code snippet
17805
17806    # Try our hardest to locate a correct version of GNU make
17807    for ac_prog in gmake
17808do
17809  # Extract the first word of "$ac_prog", so it can be a program name with args.
17810set dummy $ac_prog; ac_word=$2
17811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17812$as_echo_n "checking for $ac_word... " >&6; }
17813if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17814  $as_echo_n "(cached) " >&6
17815else
17816  case $CHECK_GMAKE in
17817  [\\/]* | ?:[\\/]*)
17818  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17819  ;;
17820  *)
17821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17822for as_dir in $PATH
17823do
17824  IFS=$as_save_IFS
17825  test -z "$as_dir" && as_dir=.
17826    for ac_exec_ext in '' $ac_executable_extensions; do
17827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17828    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17830    break 2
17831  fi
17832done
17833  done
17834IFS=$as_save_IFS
17835
17836  ;;
17837esac
17838fi
17839CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17840if test -n "$CHECK_GMAKE"; then
17841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17842$as_echo "$CHECK_GMAKE" >&6; }
17843else
17844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17845$as_echo "no" >&6; }
17846fi
17847
17848
17849  test -n "$CHECK_GMAKE" && break
17850done
17851
17852
17853  MAKE_CANDIDATE=""$CHECK_GMAKE""
17854  DESCRIPTION="gmake in PATH"
17855
17856  # On Cygwin, we require a newer version of make than on other platforms
17857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17858    MAKE_VERSION_EXPR="-e 4\."
17859    MAKE_REQUIRED_VERSION="4.0"
17860   else
17861    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17862    MAKE_REQUIRED_VERSION="3.81"
17863  fi
17864
17865  if test "x$MAKE_CANDIDATE" != x; then
17866    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17867$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17868    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17869    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17870    if test "x$IS_GNU_MAKE" = x; then
17871      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17872$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17873    else
17874      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17875      if test "x$IS_MODERN_MAKE" = x; then
17876        { $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
17877$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;}
17878      else
17879        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17880          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17881            MAKE_EXPECTED_ENV='cygwin'
17882          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17883            MAKE_EXPECTED_ENV='msys'
17884          else
17885            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17886          fi
17887          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17888          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17889        else
17890          # Not relevant for non-Windows
17891          IS_MAKE_CORRECT_ENV=true
17892        fi
17893        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17894          { $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
17895$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;}
17896        else
17897          FOUND_MAKE=$MAKE_CANDIDATE
17898
17899  # Only process if variable expands to non-empty
17900
17901  if test "x$FOUND_MAKE" != x; then
17902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17903
17904  # First separate the path from the arguments. This will split at the first
17905  # space.
17906  complete="$FOUND_MAKE"
17907  path="${complete%% *}"
17908  tmp="$complete EOL"
17909  arguments="${tmp#* }"
17910
17911  # Input might be given as Windows format, start by converting to
17912  # unix format.
17913  new_path=`$CYGPATH -u "$path"`
17914
17915  # Now try to locate executable using which
17916  new_path=`$WHICH "$new_path" 2> /dev/null`
17917  # bat and cmd files are not always considered executable in cygwin causing which
17918  # to not find them
17919  if test "x$new_path" = x \
17920      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17921      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17922    new_path=`$CYGPATH -u "$path"`
17923  fi
17924  if test "x$new_path" = x; then
17925    # Oops. Which didn't find the executable.
17926    # The splitting of arguments from the executable at a space might have been incorrect,
17927    # since paths with space are more likely in Windows. Give it another try with the whole
17928    # argument.
17929    path="$complete"
17930    arguments="EOL"
17931    new_path=`$CYGPATH -u "$path"`
17932    new_path=`$WHICH "$new_path" 2> /dev/null`
17933    # bat and cmd files are not always considered executable in cygwin causing which
17934    # to not find them
17935    if test "x$new_path" = x \
17936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17938      new_path=`$CYGPATH -u "$path"`
17939    fi
17940    if test "x$new_path" = x; then
17941      # It's still not found. Now this is an unrecoverable error.
17942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17943$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17944      has_space=`$ECHO "$complete" | $GREP " "`
17945      if test "x$has_space" != x; then
17946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17948      fi
17949      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17950    fi
17951  fi
17952
17953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17956  # "foo.exe" is OK but "foo" is an error.
17957  #
17958  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17959  # It is also a way to make sure we got the proper file name for the real test later on.
17960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17961  if test "x$test_shortpath" = x; then
17962    # Short path failed, file does not exist as specified.
17963    # Try adding .exe or .cmd
17964    if test -f "${new_path}.exe"; then
17965      input_to_shortpath="${new_path}.exe"
17966    elif test -f "${new_path}.cmd"; then
17967      input_to_shortpath="${new_path}.cmd"
17968    else
17969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17970$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17971      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17973      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17974    fi
17975  else
17976    input_to_shortpath="$new_path"
17977  fi
17978
17979  # Call helper function which possibly converts this using DOS-style short mode.
17980  # If so, the updated path is stored in $new_path.
17981  new_path="$input_to_shortpath"
17982
17983  input_path="$input_to_shortpath"
17984  # Check if we need to convert this using DOS-style short mode. If the path
17985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17986  # take no chances and rewrite it.
17987  # Note: m4 eats our [], so we need to use [ and ] instead.
17988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17989  if test "x$has_forbidden_chars" != x; then
17990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17994      # Going to short mode and back again did indeed matter. Since short mode is
17995      # case insensitive, let's make it lowercase to improve readability.
17996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17997      # Now convert it back to Unix-style (cygpath)
17998      input_path=`$CYGPATH -u "$shortmode_path"`
17999      new_path="$input_path"
18000    fi
18001  fi
18002
18003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18004  if test "x$test_cygdrive_prefix" = x; then
18005    # As a simple fix, exclude /usr/bin since it's not a real path.
18006    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18008      # a path prefixed by /cygdrive for fixpath to work.
18009      new_path="$CYGWIN_ROOT_PATH$input_path"
18010    fi
18011  fi
18012
18013  # remove trailing .exe if any
18014  new_path="${new_path/%.exe/}"
18015
18016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18017
18018  # First separate the path from the arguments. This will split at the first
18019  # space.
18020  complete="$FOUND_MAKE"
18021  path="${complete%% *}"
18022  tmp="$complete EOL"
18023  arguments="${tmp#* }"
18024
18025  # Input might be given as Windows format, start by converting to
18026  # unix format.
18027  new_path="$path"
18028
18029  windows_path="$new_path"
18030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18031    unix_path=`$CYGPATH -u "$windows_path"`
18032    new_path="$unix_path"
18033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18035    new_path="$unix_path"
18036  fi
18037
18038
18039  # Now try to locate executable using which
18040  new_path=`$WHICH "$new_path" 2> /dev/null`
18041
18042  if test "x$new_path" = x; then
18043    # Oops. Which didn't find the executable.
18044    # The splitting of arguments from the executable at a space might have been incorrect,
18045    # since paths with space are more likely in Windows. Give it another try with the whole
18046    # argument.
18047    path="$complete"
18048    arguments="EOL"
18049    new_path="$path"
18050
18051  windows_path="$new_path"
18052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18053    unix_path=`$CYGPATH -u "$windows_path"`
18054    new_path="$unix_path"
18055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18057    new_path="$unix_path"
18058  fi
18059
18060
18061    new_path=`$WHICH "$new_path" 2> /dev/null`
18062    # bat and cmd files are not always considered executable in MSYS causing which
18063    # to not find them
18064    if test "x$new_path" = x \
18065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18067      new_path="$path"
18068
18069  windows_path="$new_path"
18070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18071    unix_path=`$CYGPATH -u "$windows_path"`
18072    new_path="$unix_path"
18073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18075    new_path="$unix_path"
18076  fi
18077
18078    fi
18079
18080    if test "x$new_path" = x; then
18081      # It's still not found. Now this is an unrecoverable error.
18082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18084      has_space=`$ECHO "$complete" | $GREP " "`
18085      if test "x$has_space" != x; then
18086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18088      fi
18089      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18090    fi
18091  fi
18092
18093  # Now new_path has a complete unix path to the binary
18094  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18095    # Keep paths in /bin as-is, but remove trailing .exe if any
18096    new_path="${new_path/%.exe/}"
18097    # Do not save /bin paths to all_fixpath_prefixes!
18098  else
18099    # Not in mixed or Windows style, start by that.
18100    new_path=`cmd //c echo $new_path`
18101
18102  input_path="$new_path"
18103  # Check if we need to convert this using DOS-style short mode. If the path
18104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18105  # take no chances and rewrite it.
18106  # Note: m4 eats our [], so we need to use [ and ] instead.
18107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18108  if test "x$has_forbidden_chars" != x; then
18109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18111  fi
18112
18113    # Output is in $new_path
18114
18115  windows_path="$new_path"
18116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18117    unix_path=`$CYGPATH -u "$windows_path"`
18118    new_path="$unix_path"
18119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18121    new_path="$unix_path"
18122  fi
18123
18124    # remove trailing .exe if any
18125    new_path="${new_path/%.exe/}"
18126
18127    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18128    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18129  fi
18130
18131    else
18132      # We're on a unix platform. Hooray! :)
18133      # First separate the path from the arguments. This will split at the first
18134      # space.
18135      complete="$FOUND_MAKE"
18136      path="${complete%% *}"
18137      tmp="$complete EOL"
18138      arguments="${tmp#* }"
18139
18140      # Cannot rely on the command "which" here since it doesn't always work.
18141      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18142      if test -z "$is_absolute_path"; then
18143        # Path to executable is not absolute. Find it.
18144        IFS_save="$IFS"
18145        IFS=:
18146        for p in $PATH; do
18147          if test -f "$p/$path" && test -x "$p/$path"; then
18148            new_path="$p/$path"
18149            break
18150          fi
18151        done
18152        IFS="$IFS_save"
18153      else
18154        # This is an absolute path, we can use it without further modifications.
18155        new_path="$path"
18156      fi
18157
18158      if test "x$new_path" = x; then
18159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18160$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18161        has_space=`$ECHO "$complete" | $GREP " "`
18162        if test "x$has_space" != x; then
18163          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18164$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18165        fi
18166        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18167      fi
18168    fi
18169
18170    # Now join together the path and the arguments once again
18171    if test "x$arguments" != xEOL; then
18172      new_complete="$new_path ${arguments% *}"
18173    else
18174      new_complete="$new_path"
18175    fi
18176
18177    if test "x$complete" != "x$new_complete"; then
18178      FOUND_MAKE="$new_complete"
18179      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18180$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18181    fi
18182  fi
18183
18184        fi
18185      fi
18186    fi
18187  fi
18188
18189
18190    if test "x$FOUND_MAKE" = x; then
18191      for ac_prog in make
18192do
18193  # Extract the first word of "$ac_prog", so it can be a program name with args.
18194set dummy $ac_prog; ac_word=$2
18195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18196$as_echo_n "checking for $ac_word... " >&6; }
18197if ${ac_cv_path_CHECK_MAKE+:} false; then :
18198  $as_echo_n "(cached) " >&6
18199else
18200  case $CHECK_MAKE in
18201  [\\/]* | ?:[\\/]*)
18202  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18203  ;;
18204  *)
18205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18206for as_dir in $PATH
18207do
18208  IFS=$as_save_IFS
18209  test -z "$as_dir" && as_dir=.
18210    for ac_exec_ext in '' $ac_executable_extensions; do
18211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18212    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18214    break 2
18215  fi
18216done
18217  done
18218IFS=$as_save_IFS
18219
18220  ;;
18221esac
18222fi
18223CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18224if test -n "$CHECK_MAKE"; then
18225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18226$as_echo "$CHECK_MAKE" >&6; }
18227else
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18229$as_echo "no" >&6; }
18230fi
18231
18232
18233  test -n "$CHECK_MAKE" && break
18234done
18235
18236
18237  MAKE_CANDIDATE=""$CHECK_MAKE""
18238  DESCRIPTION="make in PATH"
18239
18240  # On Cygwin, we require a newer version of make than on other platforms
18241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242    MAKE_VERSION_EXPR="-e 4\."
18243    MAKE_REQUIRED_VERSION="4.0"
18244   else
18245    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18246    MAKE_REQUIRED_VERSION="3.81"
18247  fi
18248
18249  if test "x$MAKE_CANDIDATE" != x; then
18250    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18251$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18252    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18253    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18254    if test "x$IS_GNU_MAKE" = x; then
18255      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18256$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18257    else
18258      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18259      if test "x$IS_MODERN_MAKE" = x; then
18260        { $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
18261$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;}
18262      else
18263        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18264          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18265            MAKE_EXPECTED_ENV='cygwin'
18266          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18267            MAKE_EXPECTED_ENV='msys'
18268          else
18269            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18270          fi
18271          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18272          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18273        else
18274          # Not relevant for non-Windows
18275          IS_MAKE_CORRECT_ENV=true
18276        fi
18277        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18278          { $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
18279$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;}
18280        else
18281          FOUND_MAKE=$MAKE_CANDIDATE
18282
18283  # Only process if variable expands to non-empty
18284
18285  if test "x$FOUND_MAKE" != x; then
18286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18287
18288  # First separate the path from the arguments. This will split at the first
18289  # space.
18290  complete="$FOUND_MAKE"
18291  path="${complete%% *}"
18292  tmp="$complete EOL"
18293  arguments="${tmp#* }"
18294
18295  # Input might be given as Windows format, start by converting to
18296  # unix format.
18297  new_path=`$CYGPATH -u "$path"`
18298
18299  # Now try to locate executable using which
18300  new_path=`$WHICH "$new_path" 2> /dev/null`
18301  # bat and cmd files are not always considered executable in cygwin causing which
18302  # to not find them
18303  if test "x$new_path" = x \
18304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18306    new_path=`$CYGPATH -u "$path"`
18307  fi
18308  if test "x$new_path" = x; then
18309    # Oops. Which didn't find the executable.
18310    # The splitting of arguments from the executable at a space might have been incorrect,
18311    # since paths with space are more likely in Windows. Give it another try with the whole
18312    # argument.
18313    path="$complete"
18314    arguments="EOL"
18315    new_path=`$CYGPATH -u "$path"`
18316    new_path=`$WHICH "$new_path" 2> /dev/null`
18317    # bat and cmd files are not always considered executable in cygwin causing which
18318    # to not find them
18319    if test "x$new_path" = x \
18320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18322      new_path=`$CYGPATH -u "$path"`
18323    fi
18324    if test "x$new_path" = x; then
18325      # It's still not found. Now this is an unrecoverable error.
18326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18327$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18328      has_space=`$ECHO "$complete" | $GREP " "`
18329      if test "x$has_space" != x; then
18330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18332      fi
18333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18334    fi
18335  fi
18336
18337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18340  # "foo.exe" is OK but "foo" is an error.
18341  #
18342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18343  # It is also a way to make sure we got the proper file name for the real test later on.
18344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18345  if test "x$test_shortpath" = x; then
18346    # Short path failed, file does not exist as specified.
18347    # Try adding .exe or .cmd
18348    if test -f "${new_path}.exe"; then
18349      input_to_shortpath="${new_path}.exe"
18350    elif test -f "${new_path}.cmd"; then
18351      input_to_shortpath="${new_path}.cmd"
18352    else
18353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18354$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18357      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18358    fi
18359  else
18360    input_to_shortpath="$new_path"
18361  fi
18362
18363  # Call helper function which possibly converts this using DOS-style short mode.
18364  # If so, the updated path is stored in $new_path.
18365  new_path="$input_to_shortpath"
18366
18367  input_path="$input_to_shortpath"
18368  # Check if we need to convert this using DOS-style short mode. If the path
18369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18370  # take no chances and rewrite it.
18371  # Note: m4 eats our [], so we need to use [ and ] instead.
18372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18373  if test "x$has_forbidden_chars" != x; then
18374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18378      # Going to short mode and back again did indeed matter. Since short mode is
18379      # case insensitive, let's make it lowercase to improve readability.
18380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18381      # Now convert it back to Unix-style (cygpath)
18382      input_path=`$CYGPATH -u "$shortmode_path"`
18383      new_path="$input_path"
18384    fi
18385  fi
18386
18387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18388  if test "x$test_cygdrive_prefix" = x; then
18389    # As a simple fix, exclude /usr/bin since it's not a real path.
18390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18392      # a path prefixed by /cygdrive for fixpath to work.
18393      new_path="$CYGWIN_ROOT_PATH$input_path"
18394    fi
18395  fi
18396
18397  # remove trailing .exe if any
18398  new_path="${new_path/%.exe/}"
18399
18400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18401
18402  # First separate the path from the arguments. This will split at the first
18403  # space.
18404  complete="$FOUND_MAKE"
18405  path="${complete%% *}"
18406  tmp="$complete EOL"
18407  arguments="${tmp#* }"
18408
18409  # Input might be given as Windows format, start by converting to
18410  # unix format.
18411  new_path="$path"
18412
18413  windows_path="$new_path"
18414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18415    unix_path=`$CYGPATH -u "$windows_path"`
18416    new_path="$unix_path"
18417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18419    new_path="$unix_path"
18420  fi
18421
18422
18423  # Now try to locate executable using which
18424  new_path=`$WHICH "$new_path" 2> /dev/null`
18425
18426  if test "x$new_path" = x; then
18427    # Oops. Which didn't find the executable.
18428    # The splitting of arguments from the executable at a space might have been incorrect,
18429    # since paths with space are more likely in Windows. Give it another try with the whole
18430    # argument.
18431    path="$complete"
18432    arguments="EOL"
18433    new_path="$path"
18434
18435  windows_path="$new_path"
18436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18437    unix_path=`$CYGPATH -u "$windows_path"`
18438    new_path="$unix_path"
18439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18441    new_path="$unix_path"
18442  fi
18443
18444
18445    new_path=`$WHICH "$new_path" 2> /dev/null`
18446    # bat and cmd files are not always considered executable in MSYS causing which
18447    # to not find them
18448    if test "x$new_path" = x \
18449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18451      new_path="$path"
18452
18453  windows_path="$new_path"
18454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18455    unix_path=`$CYGPATH -u "$windows_path"`
18456    new_path="$unix_path"
18457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18459    new_path="$unix_path"
18460  fi
18461
18462    fi
18463
18464    if test "x$new_path" = x; then
18465      # It's still not found. Now this is an unrecoverable error.
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18468      has_space=`$ECHO "$complete" | $GREP " "`
18469      if test "x$has_space" != x; then
18470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18472      fi
18473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18474    fi
18475  fi
18476
18477  # Now new_path has a complete unix path to the binary
18478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18479    # Keep paths in /bin as-is, but remove trailing .exe if any
18480    new_path="${new_path/%.exe/}"
18481    # Do not save /bin paths to all_fixpath_prefixes!
18482  else
18483    # Not in mixed or Windows style, start by that.
18484    new_path=`cmd //c echo $new_path`
18485
18486  input_path="$new_path"
18487  # Check if we need to convert this using DOS-style short mode. If the path
18488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18489  # take no chances and rewrite it.
18490  # Note: m4 eats our [], so we need to use [ and ] instead.
18491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18492  if test "x$has_forbidden_chars" != x; then
18493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18495  fi
18496
18497    # Output is in $new_path
18498
18499  windows_path="$new_path"
18500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18501    unix_path=`$CYGPATH -u "$windows_path"`
18502    new_path="$unix_path"
18503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18505    new_path="$unix_path"
18506  fi
18507
18508    # remove trailing .exe if any
18509    new_path="${new_path/%.exe/}"
18510
18511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18513  fi
18514
18515    else
18516      # We're on a unix platform. Hooray! :)
18517      # First separate the path from the arguments. This will split at the first
18518      # space.
18519      complete="$FOUND_MAKE"
18520      path="${complete%% *}"
18521      tmp="$complete EOL"
18522      arguments="${tmp#* }"
18523
18524      # Cannot rely on the command "which" here since it doesn't always work.
18525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18526      if test -z "$is_absolute_path"; then
18527        # Path to executable is not absolute. Find it.
18528        IFS_save="$IFS"
18529        IFS=:
18530        for p in $PATH; do
18531          if test -f "$p/$path" && test -x "$p/$path"; then
18532            new_path="$p/$path"
18533            break
18534          fi
18535        done
18536        IFS="$IFS_save"
18537      else
18538        # This is an absolute path, we can use it without further modifications.
18539        new_path="$path"
18540      fi
18541
18542      if test "x$new_path" = x; then
18543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18544$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18545        has_space=`$ECHO "$complete" | $GREP " "`
18546        if test "x$has_space" != x; then
18547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18549        fi
18550        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18551      fi
18552    fi
18553
18554    # Now join together the path and the arguments once again
18555    if test "x$arguments" != xEOL; then
18556      new_complete="$new_path ${arguments% *}"
18557    else
18558      new_complete="$new_path"
18559    fi
18560
18561    if test "x$complete" != "x$new_complete"; then
18562      FOUND_MAKE="$new_complete"
18563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18564$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18565    fi
18566  fi
18567
18568        fi
18569      fi
18570    fi
18571  fi
18572
18573    fi
18574
18575    if test "x$FOUND_MAKE" = x; then
18576      if test "x$TOOLCHAIN_PATH" != x; then
18577        # We have a toolchain path, check that as well before giving up.
18578        OLD_PATH=$PATH
18579        PATH=$TOOLCHAIN_PATH:$PATH
18580        for ac_prog in gmake
18581do
18582  # Extract the first word of "$ac_prog", so it can be a program name with args.
18583set dummy $ac_prog; ac_word=$2
18584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18585$as_echo_n "checking for $ac_word... " >&6; }
18586if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18587  $as_echo_n "(cached) " >&6
18588else
18589  case $CHECK_TOOLSDIR_GMAKE in
18590  [\\/]* | ?:[\\/]*)
18591  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18592  ;;
18593  *)
18594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18595for as_dir in $PATH
18596do
18597  IFS=$as_save_IFS
18598  test -z "$as_dir" && as_dir=.
18599    for ac_exec_ext in '' $ac_executable_extensions; do
18600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18601    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18603    break 2
18604  fi
18605done
18606  done
18607IFS=$as_save_IFS
18608
18609  ;;
18610esac
18611fi
18612CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18613if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18615$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18616else
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18618$as_echo "no" >&6; }
18619fi
18620
18621
18622  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18623done
18624
18625
18626  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18627  DESCRIPTION="gmake in tools-dir"
18628
18629  # On Cygwin, we require a newer version of make than on other platforms
18630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18631    MAKE_VERSION_EXPR="-e 4\."
18632    MAKE_REQUIRED_VERSION="4.0"
18633   else
18634    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18635    MAKE_REQUIRED_VERSION="3.81"
18636  fi
18637
18638  if test "x$MAKE_CANDIDATE" != x; then
18639    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18640$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18641    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18642    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18643    if test "x$IS_GNU_MAKE" = x; then
18644      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18645$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18646    else
18647      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18648      if test "x$IS_MODERN_MAKE" = x; then
18649        { $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
18650$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;}
18651      else
18652        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18653          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18654            MAKE_EXPECTED_ENV='cygwin'
18655          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18656            MAKE_EXPECTED_ENV='msys'
18657          else
18658            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18659          fi
18660          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18661          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18662        else
18663          # Not relevant for non-Windows
18664          IS_MAKE_CORRECT_ENV=true
18665        fi
18666        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18667          { $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
18668$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;}
18669        else
18670          FOUND_MAKE=$MAKE_CANDIDATE
18671
18672  # Only process if variable expands to non-empty
18673
18674  if test "x$FOUND_MAKE" != x; then
18675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18676
18677  # First separate the path from the arguments. This will split at the first
18678  # space.
18679  complete="$FOUND_MAKE"
18680  path="${complete%% *}"
18681  tmp="$complete EOL"
18682  arguments="${tmp#* }"
18683
18684  # Input might be given as Windows format, start by converting to
18685  # unix format.
18686  new_path=`$CYGPATH -u "$path"`
18687
18688  # Now try to locate executable using which
18689  new_path=`$WHICH "$new_path" 2> /dev/null`
18690  # bat and cmd files are not always considered executable in cygwin causing which
18691  # to not find them
18692  if test "x$new_path" = x \
18693      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18694      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18695    new_path=`$CYGPATH -u "$path"`
18696  fi
18697  if test "x$new_path" = x; then
18698    # Oops. Which didn't find the executable.
18699    # The splitting of arguments from the executable at a space might have been incorrect,
18700    # since paths with space are more likely in Windows. Give it another try with the whole
18701    # argument.
18702    path="$complete"
18703    arguments="EOL"
18704    new_path=`$CYGPATH -u "$path"`
18705    new_path=`$WHICH "$new_path" 2> /dev/null`
18706    # bat and cmd files are not always considered executable in cygwin causing which
18707    # to not find them
18708    if test "x$new_path" = x \
18709        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18710        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18711      new_path=`$CYGPATH -u "$path"`
18712    fi
18713    if test "x$new_path" = x; then
18714      # It's still not found. Now this is an unrecoverable error.
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18716$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18717      has_space=`$ECHO "$complete" | $GREP " "`
18718      if test "x$has_space" != x; then
18719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18721      fi
18722      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18723    fi
18724  fi
18725
18726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18729  # "foo.exe" is OK but "foo" is an error.
18730  #
18731  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18732  # It is also a way to make sure we got the proper file name for the real test later on.
18733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18734  if test "x$test_shortpath" = x; then
18735    # Short path failed, file does not exist as specified.
18736    # Try adding .exe or .cmd
18737    if test -f "${new_path}.exe"; then
18738      input_to_shortpath="${new_path}.exe"
18739    elif test -f "${new_path}.cmd"; then
18740      input_to_shortpath="${new_path}.cmd"
18741    else
18742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18743$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18744      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18746      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18747    fi
18748  else
18749    input_to_shortpath="$new_path"
18750  fi
18751
18752  # Call helper function which possibly converts this using DOS-style short mode.
18753  # If so, the updated path is stored in $new_path.
18754  new_path="$input_to_shortpath"
18755
18756  input_path="$input_to_shortpath"
18757  # Check if we need to convert this using DOS-style short mode. If the path
18758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18759  # take no chances and rewrite it.
18760  # Note: m4 eats our [], so we need to use [ and ] instead.
18761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18762  if test "x$has_forbidden_chars" != x; then
18763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18767      # Going to short mode and back again did indeed matter. Since short mode is
18768      # case insensitive, let's make it lowercase to improve readability.
18769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18770      # Now convert it back to Unix-style (cygpath)
18771      input_path=`$CYGPATH -u "$shortmode_path"`
18772      new_path="$input_path"
18773    fi
18774  fi
18775
18776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18777  if test "x$test_cygdrive_prefix" = x; then
18778    # As a simple fix, exclude /usr/bin since it's not a real path.
18779    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18781      # a path prefixed by /cygdrive for fixpath to work.
18782      new_path="$CYGWIN_ROOT_PATH$input_path"
18783    fi
18784  fi
18785
18786  # remove trailing .exe if any
18787  new_path="${new_path/%.exe/}"
18788
18789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18790
18791  # First separate the path from the arguments. This will split at the first
18792  # space.
18793  complete="$FOUND_MAKE"
18794  path="${complete%% *}"
18795  tmp="$complete EOL"
18796  arguments="${tmp#* }"
18797
18798  # Input might be given as Windows format, start by converting to
18799  # unix format.
18800  new_path="$path"
18801
18802  windows_path="$new_path"
18803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18804    unix_path=`$CYGPATH -u "$windows_path"`
18805    new_path="$unix_path"
18806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18808    new_path="$unix_path"
18809  fi
18810
18811
18812  # Now try to locate executable using which
18813  new_path=`$WHICH "$new_path" 2> /dev/null`
18814
18815  if test "x$new_path" = x; then
18816    # Oops. Which didn't find the executable.
18817    # The splitting of arguments from the executable at a space might have been incorrect,
18818    # since paths with space are more likely in Windows. Give it another try with the whole
18819    # argument.
18820    path="$complete"
18821    arguments="EOL"
18822    new_path="$path"
18823
18824  windows_path="$new_path"
18825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18826    unix_path=`$CYGPATH -u "$windows_path"`
18827    new_path="$unix_path"
18828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18830    new_path="$unix_path"
18831  fi
18832
18833
18834    new_path=`$WHICH "$new_path" 2> /dev/null`
18835    # bat and cmd files are not always considered executable in MSYS causing which
18836    # to not find them
18837    if test "x$new_path" = x \
18838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18840      new_path="$path"
18841
18842  windows_path="$new_path"
18843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18844    unix_path=`$CYGPATH -u "$windows_path"`
18845    new_path="$unix_path"
18846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18848    new_path="$unix_path"
18849  fi
18850
18851    fi
18852
18853    if test "x$new_path" = x; then
18854      # It's still not found. Now this is an unrecoverable error.
18855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18857      has_space=`$ECHO "$complete" | $GREP " "`
18858      if test "x$has_space" != x; then
18859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18861      fi
18862      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18863    fi
18864  fi
18865
18866  # Now new_path has a complete unix path to the binary
18867  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18868    # Keep paths in /bin as-is, but remove trailing .exe if any
18869    new_path="${new_path/%.exe/}"
18870    # Do not save /bin paths to all_fixpath_prefixes!
18871  else
18872    # Not in mixed or Windows style, start by that.
18873    new_path=`cmd //c echo $new_path`
18874
18875  input_path="$new_path"
18876  # Check if we need to convert this using DOS-style short mode. If the path
18877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18878  # take no chances and rewrite it.
18879  # Note: m4 eats our [], so we need to use [ and ] instead.
18880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18881  if test "x$has_forbidden_chars" != x; then
18882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18884  fi
18885
18886    # Output is in $new_path
18887
18888  windows_path="$new_path"
18889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18890    unix_path=`$CYGPATH -u "$windows_path"`
18891    new_path="$unix_path"
18892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18894    new_path="$unix_path"
18895  fi
18896
18897    # remove trailing .exe if any
18898    new_path="${new_path/%.exe/}"
18899
18900    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18901    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18902  fi
18903
18904    else
18905      # We're on a unix platform. Hooray! :)
18906      # First separate the path from the arguments. This will split at the first
18907      # space.
18908      complete="$FOUND_MAKE"
18909      path="${complete%% *}"
18910      tmp="$complete EOL"
18911      arguments="${tmp#* }"
18912
18913      # Cannot rely on the command "which" here since it doesn't always work.
18914      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18915      if test -z "$is_absolute_path"; then
18916        # Path to executable is not absolute. Find it.
18917        IFS_save="$IFS"
18918        IFS=:
18919        for p in $PATH; do
18920          if test -f "$p/$path" && test -x "$p/$path"; then
18921            new_path="$p/$path"
18922            break
18923          fi
18924        done
18925        IFS="$IFS_save"
18926      else
18927        # This is an absolute path, we can use it without further modifications.
18928        new_path="$path"
18929      fi
18930
18931      if test "x$new_path" = x; then
18932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18933$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18934        has_space=`$ECHO "$complete" | $GREP " "`
18935        if test "x$has_space" != x; then
18936          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18938        fi
18939        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18940      fi
18941    fi
18942
18943    # Now join together the path and the arguments once again
18944    if test "x$arguments" != xEOL; then
18945      new_complete="$new_path ${arguments% *}"
18946    else
18947      new_complete="$new_path"
18948    fi
18949
18950    if test "x$complete" != "x$new_complete"; then
18951      FOUND_MAKE="$new_complete"
18952      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18953$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18954    fi
18955  fi
18956
18957        fi
18958      fi
18959    fi
18960  fi
18961
18962        if test "x$FOUND_MAKE" = x; then
18963          for ac_prog in make
18964do
18965  # Extract the first word of "$ac_prog", so it can be a program name with args.
18966set dummy $ac_prog; ac_word=$2
18967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18968$as_echo_n "checking for $ac_word... " >&6; }
18969if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18970  $as_echo_n "(cached) " >&6
18971else
18972  case $CHECK_TOOLSDIR_MAKE in
18973  [\\/]* | ?:[\\/]*)
18974  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18975  ;;
18976  *)
18977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18978for as_dir in $PATH
18979do
18980  IFS=$as_save_IFS
18981  test -z "$as_dir" && as_dir=.
18982    for ac_exec_ext in '' $ac_executable_extensions; do
18983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18984    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18986    break 2
18987  fi
18988done
18989  done
18990IFS=$as_save_IFS
18991
18992  ;;
18993esac
18994fi
18995CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18996if test -n "$CHECK_TOOLSDIR_MAKE"; then
18997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18998$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18999else
19000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19001$as_echo "no" >&6; }
19002fi
19003
19004
19005  test -n "$CHECK_TOOLSDIR_MAKE" && break
19006done
19007
19008
19009  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19010  DESCRIPTION="make in tools-dir"
19011
19012  # On Cygwin, we require a newer version of make than on other platforms
19013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19014    MAKE_VERSION_EXPR="-e 4\."
19015    MAKE_REQUIRED_VERSION="4.0"
19016   else
19017    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19018    MAKE_REQUIRED_VERSION="3.81"
19019  fi
19020
19021  if test "x$MAKE_CANDIDATE" != x; then
19022    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19023$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19024    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19025    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19026    if test "x$IS_GNU_MAKE" = x; then
19027      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19028$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19029    else
19030      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19031      if test "x$IS_MODERN_MAKE" = x; then
19032        { $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
19033$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;}
19034      else
19035        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19036          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19037            MAKE_EXPECTED_ENV='cygwin'
19038          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19039            MAKE_EXPECTED_ENV='msys'
19040          else
19041            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19042          fi
19043          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19044          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19045        else
19046          # Not relevant for non-Windows
19047          IS_MAKE_CORRECT_ENV=true
19048        fi
19049        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19050          { $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
19051$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;}
19052        else
19053          FOUND_MAKE=$MAKE_CANDIDATE
19054
19055  # Only process if variable expands to non-empty
19056
19057  if test "x$FOUND_MAKE" != x; then
19058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19059
19060  # First separate the path from the arguments. This will split at the first
19061  # space.
19062  complete="$FOUND_MAKE"
19063  path="${complete%% *}"
19064  tmp="$complete EOL"
19065  arguments="${tmp#* }"
19066
19067  # Input might be given as Windows format, start by converting to
19068  # unix format.
19069  new_path=`$CYGPATH -u "$path"`
19070
19071  # Now try to locate executable using which
19072  new_path=`$WHICH "$new_path" 2> /dev/null`
19073  # bat and cmd files are not always considered executable in cygwin causing which
19074  # to not find them
19075  if test "x$new_path" = x \
19076      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19077      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19078    new_path=`$CYGPATH -u "$path"`
19079  fi
19080  if test "x$new_path" = x; then
19081    # Oops. Which didn't find the executable.
19082    # The splitting of arguments from the executable at a space might have been incorrect,
19083    # since paths with space are more likely in Windows. Give it another try with the whole
19084    # argument.
19085    path="$complete"
19086    arguments="EOL"
19087    new_path=`$CYGPATH -u "$path"`
19088    new_path=`$WHICH "$new_path" 2> /dev/null`
19089    # bat and cmd files are not always considered executable in cygwin causing which
19090    # to not find them
19091    if test "x$new_path" = x \
19092        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19093        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19094      new_path=`$CYGPATH -u "$path"`
19095    fi
19096    if test "x$new_path" = x; then
19097      # It's still not found. Now this is an unrecoverable error.
19098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19099$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19100      has_space=`$ECHO "$complete" | $GREP " "`
19101      if test "x$has_space" != x; then
19102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19104      fi
19105      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19106    fi
19107  fi
19108
19109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19112  # "foo.exe" is OK but "foo" is an error.
19113  #
19114  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19115  # It is also a way to make sure we got the proper file name for the real test later on.
19116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19117  if test "x$test_shortpath" = x; then
19118    # Short path failed, file does not exist as specified.
19119    # Try adding .exe or .cmd
19120    if test -f "${new_path}.exe"; then
19121      input_to_shortpath="${new_path}.exe"
19122    elif test -f "${new_path}.cmd"; then
19123      input_to_shortpath="${new_path}.cmd"
19124    else
19125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19126$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19129      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19130    fi
19131  else
19132    input_to_shortpath="$new_path"
19133  fi
19134
19135  # Call helper function which possibly converts this using DOS-style short mode.
19136  # If so, the updated path is stored in $new_path.
19137  new_path="$input_to_shortpath"
19138
19139  input_path="$input_to_shortpath"
19140  # Check if we need to convert this using DOS-style short mode. If the path
19141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19142  # take no chances and rewrite it.
19143  # Note: m4 eats our [], so we need to use [ and ] instead.
19144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19145  if test "x$has_forbidden_chars" != x; then
19146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19150      # Going to short mode and back again did indeed matter. Since short mode is
19151      # case insensitive, let's make it lowercase to improve readability.
19152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19153      # Now convert it back to Unix-style (cygpath)
19154      input_path=`$CYGPATH -u "$shortmode_path"`
19155      new_path="$input_path"
19156    fi
19157  fi
19158
19159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19160  if test "x$test_cygdrive_prefix" = x; then
19161    # As a simple fix, exclude /usr/bin since it's not a real path.
19162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19164      # a path prefixed by /cygdrive for fixpath to work.
19165      new_path="$CYGWIN_ROOT_PATH$input_path"
19166    fi
19167  fi
19168
19169  # remove trailing .exe if any
19170  new_path="${new_path/%.exe/}"
19171
19172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19173
19174  # First separate the path from the arguments. This will split at the first
19175  # space.
19176  complete="$FOUND_MAKE"
19177  path="${complete%% *}"
19178  tmp="$complete EOL"
19179  arguments="${tmp#* }"
19180
19181  # Input might be given as Windows format, start by converting to
19182  # unix format.
19183  new_path="$path"
19184
19185  windows_path="$new_path"
19186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19187    unix_path=`$CYGPATH -u "$windows_path"`
19188    new_path="$unix_path"
19189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19191    new_path="$unix_path"
19192  fi
19193
19194
19195  # Now try to locate executable using which
19196  new_path=`$WHICH "$new_path" 2> /dev/null`
19197
19198  if test "x$new_path" = x; then
19199    # Oops. Which didn't find the executable.
19200    # The splitting of arguments from the executable at a space might have been incorrect,
19201    # since paths with space are more likely in Windows. Give it another try with the whole
19202    # argument.
19203    path="$complete"
19204    arguments="EOL"
19205    new_path="$path"
19206
19207  windows_path="$new_path"
19208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19209    unix_path=`$CYGPATH -u "$windows_path"`
19210    new_path="$unix_path"
19211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19213    new_path="$unix_path"
19214  fi
19215
19216
19217    new_path=`$WHICH "$new_path" 2> /dev/null`
19218    # bat and cmd files are not always considered executable in MSYS causing which
19219    # to not find them
19220    if test "x$new_path" = x \
19221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19223      new_path="$path"
19224
19225  windows_path="$new_path"
19226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19227    unix_path=`$CYGPATH -u "$windows_path"`
19228    new_path="$unix_path"
19229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19231    new_path="$unix_path"
19232  fi
19233
19234    fi
19235
19236    if test "x$new_path" = x; then
19237      # It's still not found. Now this is an unrecoverable error.
19238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19240      has_space=`$ECHO "$complete" | $GREP " "`
19241      if test "x$has_space" != x; then
19242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19244      fi
19245      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19246    fi
19247  fi
19248
19249  # Now new_path has a complete unix path to the binary
19250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19251    # Keep paths in /bin as-is, but remove trailing .exe if any
19252    new_path="${new_path/%.exe/}"
19253    # Do not save /bin paths to all_fixpath_prefixes!
19254  else
19255    # Not in mixed or Windows style, start by that.
19256    new_path=`cmd //c echo $new_path`
19257
19258  input_path="$new_path"
19259  # Check if we need to convert this using DOS-style short mode. If the path
19260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19261  # take no chances and rewrite it.
19262  # Note: m4 eats our [], so we need to use [ and ] instead.
19263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19264  if test "x$has_forbidden_chars" != x; then
19265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19267  fi
19268
19269    # Output is in $new_path
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280    # remove trailing .exe if any
19281    new_path="${new_path/%.exe/}"
19282
19283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19285  fi
19286
19287    else
19288      # We're on a unix platform. Hooray! :)
19289      # First separate the path from the arguments. This will split at the first
19290      # space.
19291      complete="$FOUND_MAKE"
19292      path="${complete%% *}"
19293      tmp="$complete EOL"
19294      arguments="${tmp#* }"
19295
19296      # Cannot rely on the command "which" here since it doesn't always work.
19297      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19298      if test -z "$is_absolute_path"; then
19299        # Path to executable is not absolute. Find it.
19300        IFS_save="$IFS"
19301        IFS=:
19302        for p in $PATH; do
19303          if test -f "$p/$path" && test -x "$p/$path"; then
19304            new_path="$p/$path"
19305            break
19306          fi
19307        done
19308        IFS="$IFS_save"
19309      else
19310        # This is an absolute path, we can use it without further modifications.
19311        new_path="$path"
19312      fi
19313
19314      if test "x$new_path" = x; then
19315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19317        has_space=`$ECHO "$complete" | $GREP " "`
19318        if test "x$has_space" != x; then
19319          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19320$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19321        fi
19322        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19323      fi
19324    fi
19325
19326    # Now join together the path and the arguments once again
19327    if test "x$arguments" != xEOL; then
19328      new_complete="$new_path ${arguments% *}"
19329    else
19330      new_complete="$new_path"
19331    fi
19332
19333    if test "x$complete" != "x$new_complete"; then
19334      FOUND_MAKE="$new_complete"
19335      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19336$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19337    fi
19338  fi
19339
19340        fi
19341      fi
19342    fi
19343  fi
19344
19345        fi
19346        PATH=$OLD_PATH
19347      fi
19348    fi
19349
19350    if test "x$FOUND_MAKE" = x; then
19351      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
19352    fi
19353
19354  else
19355    # The variable is set, but is it from the command line or the environment?
19356
19357    # Try to remove the string !MAKE! from our list.
19358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19360      # If it failed, the variable was not from the command line. Ignore it,
19361      # but warn the user (except for BASH, which is always set by the calling BASH).
19362      if test "xMAKE" != xBASH; then
19363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19364$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19365      fi
19366      # Try to locate tool using the code snippet
19367
19368    # Try our hardest to locate a correct version of GNU make
19369    for ac_prog in gmake
19370do
19371  # Extract the first word of "$ac_prog", so it can be a program name with args.
19372set dummy $ac_prog; ac_word=$2
19373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19374$as_echo_n "checking for $ac_word... " >&6; }
19375if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19376  $as_echo_n "(cached) " >&6
19377else
19378  case $CHECK_GMAKE in
19379  [\\/]* | ?:[\\/]*)
19380  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19381  ;;
19382  *)
19383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19384for as_dir in $PATH
19385do
19386  IFS=$as_save_IFS
19387  test -z "$as_dir" && as_dir=.
19388    for ac_exec_ext in '' $ac_executable_extensions; do
19389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19390    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19392    break 2
19393  fi
19394done
19395  done
19396IFS=$as_save_IFS
19397
19398  ;;
19399esac
19400fi
19401CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19402if test -n "$CHECK_GMAKE"; then
19403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19404$as_echo "$CHECK_GMAKE" >&6; }
19405else
19406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19407$as_echo "no" >&6; }
19408fi
19409
19410
19411  test -n "$CHECK_GMAKE" && break
19412done
19413
19414
19415  MAKE_CANDIDATE=""$CHECK_GMAKE""
19416  DESCRIPTION="gmake in PATH"
19417
19418  # On Cygwin, we require a newer version of make than on other platforms
19419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19420    MAKE_VERSION_EXPR="-e 4\."
19421    MAKE_REQUIRED_VERSION="4.0"
19422   else
19423    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19424    MAKE_REQUIRED_VERSION="3.81"
19425  fi
19426
19427  if test "x$MAKE_CANDIDATE" != x; then
19428    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19429$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19430    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19431    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19432    if test "x$IS_GNU_MAKE" = x; then
19433      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19434$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19435    else
19436      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19437      if test "x$IS_MODERN_MAKE" = x; then
19438        { $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
19439$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;}
19440      else
19441        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19442          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19443            MAKE_EXPECTED_ENV='cygwin'
19444          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19445            MAKE_EXPECTED_ENV='msys'
19446          else
19447            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19448          fi
19449          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19450          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19451        else
19452          # Not relevant for non-Windows
19453          IS_MAKE_CORRECT_ENV=true
19454        fi
19455        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19456          { $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
19457$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;}
19458        else
19459          FOUND_MAKE=$MAKE_CANDIDATE
19460
19461  # Only process if variable expands to non-empty
19462
19463  if test "x$FOUND_MAKE" != x; then
19464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19465
19466  # First separate the path from the arguments. This will split at the first
19467  # space.
19468  complete="$FOUND_MAKE"
19469  path="${complete%% *}"
19470  tmp="$complete EOL"
19471  arguments="${tmp#* }"
19472
19473  # Input might be given as Windows format, start by converting to
19474  # unix format.
19475  new_path=`$CYGPATH -u "$path"`
19476
19477  # Now try to locate executable using which
19478  new_path=`$WHICH "$new_path" 2> /dev/null`
19479  # bat and cmd files are not always considered executable in cygwin causing which
19480  # to not find them
19481  if test "x$new_path" = x \
19482      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19483      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19484    new_path=`$CYGPATH -u "$path"`
19485  fi
19486  if test "x$new_path" = x; then
19487    # Oops. Which didn't find the executable.
19488    # The splitting of arguments from the executable at a space might have been incorrect,
19489    # since paths with space are more likely in Windows. Give it another try with the whole
19490    # argument.
19491    path="$complete"
19492    arguments="EOL"
19493    new_path=`$CYGPATH -u "$path"`
19494    new_path=`$WHICH "$new_path" 2> /dev/null`
19495    # bat and cmd files are not always considered executable in cygwin causing which
19496    # to not find them
19497    if test "x$new_path" = x \
19498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19500      new_path=`$CYGPATH -u "$path"`
19501    fi
19502    if test "x$new_path" = x; then
19503      # It's still not found. Now this is an unrecoverable error.
19504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19505$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19506      has_space=`$ECHO "$complete" | $GREP " "`
19507      if test "x$has_space" != x; then
19508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19510      fi
19511      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19512    fi
19513  fi
19514
19515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19518  # "foo.exe" is OK but "foo" is an error.
19519  #
19520  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19521  # It is also a way to make sure we got the proper file name for the real test later on.
19522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19523  if test "x$test_shortpath" = x; then
19524    # Short path failed, file does not exist as specified.
19525    # Try adding .exe or .cmd
19526    if test -f "${new_path}.exe"; then
19527      input_to_shortpath="${new_path}.exe"
19528    elif test -f "${new_path}.cmd"; then
19529      input_to_shortpath="${new_path}.cmd"
19530    else
19531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19532$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19533      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19534$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19535      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19536    fi
19537  else
19538    input_to_shortpath="$new_path"
19539  fi
19540
19541  # Call helper function which possibly converts this using DOS-style short mode.
19542  # If so, the updated path is stored in $new_path.
19543  new_path="$input_to_shortpath"
19544
19545  input_path="$input_to_shortpath"
19546  # Check if we need to convert this using DOS-style short mode. If the path
19547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19548  # take no chances and rewrite it.
19549  # Note: m4 eats our [], so we need to use [ and ] instead.
19550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19551  if test "x$has_forbidden_chars" != x; then
19552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19556      # Going to short mode and back again did indeed matter. Since short mode is
19557      # case insensitive, let's make it lowercase to improve readability.
19558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19559      # Now convert it back to Unix-style (cygpath)
19560      input_path=`$CYGPATH -u "$shortmode_path"`
19561      new_path="$input_path"
19562    fi
19563  fi
19564
19565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19566  if test "x$test_cygdrive_prefix" = x; then
19567    # As a simple fix, exclude /usr/bin since it's not a real path.
19568    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19570      # a path prefixed by /cygdrive for fixpath to work.
19571      new_path="$CYGWIN_ROOT_PATH$input_path"
19572    fi
19573  fi
19574
19575  # remove trailing .exe if any
19576  new_path="${new_path/%.exe/}"
19577
19578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19579
19580  # First separate the path from the arguments. This will split at the first
19581  # space.
19582  complete="$FOUND_MAKE"
19583  path="${complete%% *}"
19584  tmp="$complete EOL"
19585  arguments="${tmp#* }"
19586
19587  # Input might be given as Windows format, start by converting to
19588  # unix format.
19589  new_path="$path"
19590
19591  windows_path="$new_path"
19592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19593    unix_path=`$CYGPATH -u "$windows_path"`
19594    new_path="$unix_path"
19595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19597    new_path="$unix_path"
19598  fi
19599
19600
19601  # Now try to locate executable using which
19602  new_path=`$WHICH "$new_path" 2> /dev/null`
19603
19604  if test "x$new_path" = x; then
19605    # Oops. Which didn't find the executable.
19606    # The splitting of arguments from the executable at a space might have been incorrect,
19607    # since paths with space are more likely in Windows. Give it another try with the whole
19608    # argument.
19609    path="$complete"
19610    arguments="EOL"
19611    new_path="$path"
19612
19613  windows_path="$new_path"
19614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19615    unix_path=`$CYGPATH -u "$windows_path"`
19616    new_path="$unix_path"
19617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19619    new_path="$unix_path"
19620  fi
19621
19622
19623    new_path=`$WHICH "$new_path" 2> /dev/null`
19624    # bat and cmd files are not always considered executable in MSYS causing which
19625    # to not find them
19626    if test "x$new_path" = x \
19627        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19628        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19629      new_path="$path"
19630
19631  windows_path="$new_path"
19632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19633    unix_path=`$CYGPATH -u "$windows_path"`
19634    new_path="$unix_path"
19635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19637    new_path="$unix_path"
19638  fi
19639
19640    fi
19641
19642    if test "x$new_path" = x; then
19643      # It's still not found. Now this is an unrecoverable error.
19644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19646      has_space=`$ECHO "$complete" | $GREP " "`
19647      if test "x$has_space" != x; then
19648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19650      fi
19651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19652    fi
19653  fi
19654
19655  # Now new_path has a complete unix path to the binary
19656  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19657    # Keep paths in /bin as-is, but remove trailing .exe if any
19658    new_path="${new_path/%.exe/}"
19659    # Do not save /bin paths to all_fixpath_prefixes!
19660  else
19661    # Not in mixed or Windows style, start by that.
19662    new_path=`cmd //c echo $new_path`
19663
19664  input_path="$new_path"
19665  # Check if we need to convert this using DOS-style short mode. If the path
19666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19667  # take no chances and rewrite it.
19668  # Note: m4 eats our [], so we need to use [ and ] instead.
19669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19670  if test "x$has_forbidden_chars" != x; then
19671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19673  fi
19674
19675    # Output is in $new_path
19676
19677  windows_path="$new_path"
19678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19679    unix_path=`$CYGPATH -u "$windows_path"`
19680    new_path="$unix_path"
19681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19683    new_path="$unix_path"
19684  fi
19685
19686    # remove trailing .exe if any
19687    new_path="${new_path/%.exe/}"
19688
19689    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19690    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19691  fi
19692
19693    else
19694      # We're on a unix platform. Hooray! :)
19695      # First separate the path from the arguments. This will split at the first
19696      # space.
19697      complete="$FOUND_MAKE"
19698      path="${complete%% *}"
19699      tmp="$complete EOL"
19700      arguments="${tmp#* }"
19701
19702      # Cannot rely on the command "which" here since it doesn't always work.
19703      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19704      if test -z "$is_absolute_path"; then
19705        # Path to executable is not absolute. Find it.
19706        IFS_save="$IFS"
19707        IFS=:
19708        for p in $PATH; do
19709          if test -f "$p/$path" && test -x "$p/$path"; then
19710            new_path="$p/$path"
19711            break
19712          fi
19713        done
19714        IFS="$IFS_save"
19715      else
19716        # This is an absolute path, we can use it without further modifications.
19717        new_path="$path"
19718      fi
19719
19720      if test "x$new_path" = x; then
19721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19723        has_space=`$ECHO "$complete" | $GREP " "`
19724        if test "x$has_space" != x; then
19725          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19726$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19727        fi
19728        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19729      fi
19730    fi
19731
19732    # Now join together the path and the arguments once again
19733    if test "x$arguments" != xEOL; then
19734      new_complete="$new_path ${arguments% *}"
19735    else
19736      new_complete="$new_path"
19737    fi
19738
19739    if test "x$complete" != "x$new_complete"; then
19740      FOUND_MAKE="$new_complete"
19741      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19742$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19743    fi
19744  fi
19745
19746        fi
19747      fi
19748    fi
19749  fi
19750
19751
19752    if test "x$FOUND_MAKE" = x; then
19753      for ac_prog in make
19754do
19755  # Extract the first word of "$ac_prog", so it can be a program name with args.
19756set dummy $ac_prog; ac_word=$2
19757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19758$as_echo_n "checking for $ac_word... " >&6; }
19759if ${ac_cv_path_CHECK_MAKE+:} false; then :
19760  $as_echo_n "(cached) " >&6
19761else
19762  case $CHECK_MAKE in
19763  [\\/]* | ?:[\\/]*)
19764  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19765  ;;
19766  *)
19767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19768for as_dir in $PATH
19769do
19770  IFS=$as_save_IFS
19771  test -z "$as_dir" && as_dir=.
19772    for ac_exec_ext in '' $ac_executable_extensions; do
19773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19774    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19776    break 2
19777  fi
19778done
19779  done
19780IFS=$as_save_IFS
19781
19782  ;;
19783esac
19784fi
19785CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19786if test -n "$CHECK_MAKE"; then
19787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19788$as_echo "$CHECK_MAKE" >&6; }
19789else
19790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19791$as_echo "no" >&6; }
19792fi
19793
19794
19795  test -n "$CHECK_MAKE" && break
19796done
19797
19798
19799  MAKE_CANDIDATE=""$CHECK_MAKE""
19800  DESCRIPTION="make in PATH"
19801
19802  # On Cygwin, we require a newer version of make than on other platforms
19803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19804    MAKE_VERSION_EXPR="-e 4\."
19805    MAKE_REQUIRED_VERSION="4.0"
19806   else
19807    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19808    MAKE_REQUIRED_VERSION="3.81"
19809  fi
19810
19811  if test "x$MAKE_CANDIDATE" != x; then
19812    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19813$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19814    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19815    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19816    if test "x$IS_GNU_MAKE" = x; then
19817      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19818$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19819    else
19820      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19821      if test "x$IS_MODERN_MAKE" = x; then
19822        { $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
19823$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;}
19824      else
19825        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19826          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19827            MAKE_EXPECTED_ENV='cygwin'
19828          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19829            MAKE_EXPECTED_ENV='msys'
19830          else
19831            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19832          fi
19833          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19834          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19835        else
19836          # Not relevant for non-Windows
19837          IS_MAKE_CORRECT_ENV=true
19838        fi
19839        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19840          { $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
19841$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;}
19842        else
19843          FOUND_MAKE=$MAKE_CANDIDATE
19844
19845  # Only process if variable expands to non-empty
19846
19847  if test "x$FOUND_MAKE" != x; then
19848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19849
19850  # First separate the path from the arguments. This will split at the first
19851  # space.
19852  complete="$FOUND_MAKE"
19853  path="${complete%% *}"
19854  tmp="$complete EOL"
19855  arguments="${tmp#* }"
19856
19857  # Input might be given as Windows format, start by converting to
19858  # unix format.
19859  new_path=`$CYGPATH -u "$path"`
19860
19861  # Now try to locate executable using which
19862  new_path=`$WHICH "$new_path" 2> /dev/null`
19863  # bat and cmd files are not always considered executable in cygwin causing which
19864  # to not find them
19865  if test "x$new_path" = x \
19866      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19867      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19868    new_path=`$CYGPATH -u "$path"`
19869  fi
19870  if test "x$new_path" = x; then
19871    # Oops. Which didn't find the executable.
19872    # The splitting of arguments from the executable at a space might have been incorrect,
19873    # since paths with space are more likely in Windows. Give it another try with the whole
19874    # argument.
19875    path="$complete"
19876    arguments="EOL"
19877    new_path=`$CYGPATH -u "$path"`
19878    new_path=`$WHICH "$new_path" 2> /dev/null`
19879    # bat and cmd files are not always considered executable in cygwin causing which
19880    # to not find them
19881    if test "x$new_path" = x \
19882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19884      new_path=`$CYGPATH -u "$path"`
19885    fi
19886    if test "x$new_path" = x; then
19887      # It's still not found. Now this is an unrecoverable error.
19888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19889$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19890      has_space=`$ECHO "$complete" | $GREP " "`
19891      if test "x$has_space" != x; then
19892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19894      fi
19895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19896    fi
19897  fi
19898
19899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19902  # "foo.exe" is OK but "foo" is an error.
19903  #
19904  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19905  # It is also a way to make sure we got the proper file name for the real test later on.
19906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19907  if test "x$test_shortpath" = x; then
19908    # Short path failed, file does not exist as specified.
19909    # Try adding .exe or .cmd
19910    if test -f "${new_path}.exe"; then
19911      input_to_shortpath="${new_path}.exe"
19912    elif test -f "${new_path}.cmd"; then
19913      input_to_shortpath="${new_path}.cmd"
19914    else
19915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19916$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19919      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19920    fi
19921  else
19922    input_to_shortpath="$new_path"
19923  fi
19924
19925  # Call helper function which possibly converts this using DOS-style short mode.
19926  # If so, the updated path is stored in $new_path.
19927  new_path="$input_to_shortpath"
19928
19929  input_path="$input_to_shortpath"
19930  # Check if we need to convert this using DOS-style short mode. If the path
19931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19932  # take no chances and rewrite it.
19933  # Note: m4 eats our [], so we need to use [ and ] instead.
19934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19935  if test "x$has_forbidden_chars" != x; then
19936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19940      # Going to short mode and back again did indeed matter. Since short mode is
19941      # case insensitive, let's make it lowercase to improve readability.
19942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19943      # Now convert it back to Unix-style (cygpath)
19944      input_path=`$CYGPATH -u "$shortmode_path"`
19945      new_path="$input_path"
19946    fi
19947  fi
19948
19949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19950  if test "x$test_cygdrive_prefix" = x; then
19951    # As a simple fix, exclude /usr/bin since it's not a real path.
19952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19954      # a path prefixed by /cygdrive for fixpath to work.
19955      new_path="$CYGWIN_ROOT_PATH$input_path"
19956    fi
19957  fi
19958
19959  # remove trailing .exe if any
19960  new_path="${new_path/%.exe/}"
19961
19962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19963
19964  # First separate the path from the arguments. This will split at the first
19965  # space.
19966  complete="$FOUND_MAKE"
19967  path="${complete%% *}"
19968  tmp="$complete EOL"
19969  arguments="${tmp#* }"
19970
19971  # Input might be given as Windows format, start by converting to
19972  # unix format.
19973  new_path="$path"
19974
19975  windows_path="$new_path"
19976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19977    unix_path=`$CYGPATH -u "$windows_path"`
19978    new_path="$unix_path"
19979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19981    new_path="$unix_path"
19982  fi
19983
19984
19985  # Now try to locate executable using which
19986  new_path=`$WHICH "$new_path" 2> /dev/null`
19987
19988  if test "x$new_path" = x; then
19989    # Oops. Which didn't find the executable.
19990    # The splitting of arguments from the executable at a space might have been incorrect,
19991    # since paths with space are more likely in Windows. Give it another try with the whole
19992    # argument.
19993    path="$complete"
19994    arguments="EOL"
19995    new_path="$path"
19996
19997  windows_path="$new_path"
19998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19999    unix_path=`$CYGPATH -u "$windows_path"`
20000    new_path="$unix_path"
20001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20003    new_path="$unix_path"
20004  fi
20005
20006
20007    new_path=`$WHICH "$new_path" 2> /dev/null`
20008    # bat and cmd files are not always considered executable in MSYS causing which
20009    # to not find them
20010    if test "x$new_path" = x \
20011        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20012        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20013      new_path="$path"
20014
20015  windows_path="$new_path"
20016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20017    unix_path=`$CYGPATH -u "$windows_path"`
20018    new_path="$unix_path"
20019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20021    new_path="$unix_path"
20022  fi
20023
20024    fi
20025
20026    if test "x$new_path" = x; then
20027      # It's still not found. Now this is an unrecoverable error.
20028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20030      has_space=`$ECHO "$complete" | $GREP " "`
20031      if test "x$has_space" != x; then
20032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20034      fi
20035      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20036    fi
20037  fi
20038
20039  # Now new_path has a complete unix path to the binary
20040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20041    # Keep paths in /bin as-is, but remove trailing .exe if any
20042    new_path="${new_path/%.exe/}"
20043    # Do not save /bin paths to all_fixpath_prefixes!
20044  else
20045    # Not in mixed or Windows style, start by that.
20046    new_path=`cmd //c echo $new_path`
20047
20048  input_path="$new_path"
20049  # Check if we need to convert this using DOS-style short mode. If the path
20050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20051  # take no chances and rewrite it.
20052  # Note: m4 eats our [], so we need to use [ and ] instead.
20053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20054  if test "x$has_forbidden_chars" != x; then
20055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20057  fi
20058
20059    # Output is in $new_path
20060
20061  windows_path="$new_path"
20062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20063    unix_path=`$CYGPATH -u "$windows_path"`
20064    new_path="$unix_path"
20065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20067    new_path="$unix_path"
20068  fi
20069
20070    # remove trailing .exe if any
20071    new_path="${new_path/%.exe/}"
20072
20073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20075  fi
20076
20077    else
20078      # We're on a unix platform. Hooray! :)
20079      # First separate the path from the arguments. This will split at the first
20080      # space.
20081      complete="$FOUND_MAKE"
20082      path="${complete%% *}"
20083      tmp="$complete EOL"
20084      arguments="${tmp#* }"
20085
20086      # Cannot rely on the command "which" here since it doesn't always work.
20087      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20088      if test -z "$is_absolute_path"; then
20089        # Path to executable is not absolute. Find it.
20090        IFS_save="$IFS"
20091        IFS=:
20092        for p in $PATH; do
20093          if test -f "$p/$path" && test -x "$p/$path"; then
20094            new_path="$p/$path"
20095            break
20096          fi
20097        done
20098        IFS="$IFS_save"
20099      else
20100        # This is an absolute path, we can use it without further modifications.
20101        new_path="$path"
20102      fi
20103
20104      if test "x$new_path" = x; then
20105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20106$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20107        has_space=`$ECHO "$complete" | $GREP " "`
20108        if test "x$has_space" != x; then
20109          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20111        fi
20112        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20113      fi
20114    fi
20115
20116    # Now join together the path and the arguments once again
20117    if test "x$arguments" != xEOL; then
20118      new_complete="$new_path ${arguments% *}"
20119    else
20120      new_complete="$new_path"
20121    fi
20122
20123    if test "x$complete" != "x$new_complete"; then
20124      FOUND_MAKE="$new_complete"
20125      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20126$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20127    fi
20128  fi
20129
20130        fi
20131      fi
20132    fi
20133  fi
20134
20135    fi
20136
20137    if test "x$FOUND_MAKE" = x; then
20138      if test "x$TOOLCHAIN_PATH" != x; then
20139        # We have a toolchain path, check that as well before giving up.
20140        OLD_PATH=$PATH
20141        PATH=$TOOLCHAIN_PATH:$PATH
20142        for ac_prog in gmake
20143do
20144  # Extract the first word of "$ac_prog", so it can be a program name with args.
20145set dummy $ac_prog; ac_word=$2
20146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20147$as_echo_n "checking for $ac_word... " >&6; }
20148if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20149  $as_echo_n "(cached) " >&6
20150else
20151  case $CHECK_TOOLSDIR_GMAKE in
20152  [\\/]* | ?:[\\/]*)
20153  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20154  ;;
20155  *)
20156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20157for as_dir in $PATH
20158do
20159  IFS=$as_save_IFS
20160  test -z "$as_dir" && as_dir=.
20161    for ac_exec_ext in '' $ac_executable_extensions; do
20162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20163    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20165    break 2
20166  fi
20167done
20168  done
20169IFS=$as_save_IFS
20170
20171  ;;
20172esac
20173fi
20174CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20175if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20177$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20178else
20179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20180$as_echo "no" >&6; }
20181fi
20182
20183
20184  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20185done
20186
20187
20188  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20189  DESCRIPTION="gmake in tools-dir"
20190
20191  # On Cygwin, we require a newer version of make than on other platforms
20192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20193    MAKE_VERSION_EXPR="-e 4\."
20194    MAKE_REQUIRED_VERSION="4.0"
20195   else
20196    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20197    MAKE_REQUIRED_VERSION="3.81"
20198  fi
20199
20200  if test "x$MAKE_CANDIDATE" != x; then
20201    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20202$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20203    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20204    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20205    if test "x$IS_GNU_MAKE" = x; then
20206      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20207$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20208    else
20209      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20210      if test "x$IS_MODERN_MAKE" = x; then
20211        { $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
20212$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;}
20213      else
20214        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20215          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20216            MAKE_EXPECTED_ENV='cygwin'
20217          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20218            MAKE_EXPECTED_ENV='msys'
20219          else
20220            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20221          fi
20222          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20223          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20224        else
20225          # Not relevant for non-Windows
20226          IS_MAKE_CORRECT_ENV=true
20227        fi
20228        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20229          { $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
20230$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;}
20231        else
20232          FOUND_MAKE=$MAKE_CANDIDATE
20233
20234  # Only process if variable expands to non-empty
20235
20236  if test "x$FOUND_MAKE" != x; then
20237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20238
20239  # First separate the path from the arguments. This will split at the first
20240  # space.
20241  complete="$FOUND_MAKE"
20242  path="${complete%% *}"
20243  tmp="$complete EOL"
20244  arguments="${tmp#* }"
20245
20246  # Input might be given as Windows format, start by converting to
20247  # unix format.
20248  new_path=`$CYGPATH -u "$path"`
20249
20250  # Now try to locate executable using which
20251  new_path=`$WHICH "$new_path" 2> /dev/null`
20252  # bat and cmd files are not always considered executable in cygwin causing which
20253  # to not find them
20254  if test "x$new_path" = x \
20255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20257    new_path=`$CYGPATH -u "$path"`
20258  fi
20259  if test "x$new_path" = x; then
20260    # Oops. Which didn't find the executable.
20261    # The splitting of arguments from the executable at a space might have been incorrect,
20262    # since paths with space are more likely in Windows. Give it another try with the whole
20263    # argument.
20264    path="$complete"
20265    arguments="EOL"
20266    new_path=`$CYGPATH -u "$path"`
20267    new_path=`$WHICH "$new_path" 2> /dev/null`
20268    # bat and cmd files are not always considered executable in cygwin causing which
20269    # to not find them
20270    if test "x$new_path" = x \
20271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20273      new_path=`$CYGPATH -u "$path"`
20274    fi
20275    if test "x$new_path" = x; then
20276      # It's still not found. Now this is an unrecoverable error.
20277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20279      has_space=`$ECHO "$complete" | $GREP " "`
20280      if test "x$has_space" != x; then
20281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20283      fi
20284      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20285    fi
20286  fi
20287
20288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20291  # "foo.exe" is OK but "foo" is an error.
20292  #
20293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20294  # It is also a way to make sure we got the proper file name for the real test later on.
20295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20296  if test "x$test_shortpath" = x; then
20297    # Short path failed, file does not exist as specified.
20298    # Try adding .exe or .cmd
20299    if test -f "${new_path}.exe"; then
20300      input_to_shortpath="${new_path}.exe"
20301    elif test -f "${new_path}.cmd"; then
20302      input_to_shortpath="${new_path}.cmd"
20303    else
20304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20305$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20308      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20309    fi
20310  else
20311    input_to_shortpath="$new_path"
20312  fi
20313
20314  # Call helper function which possibly converts this using DOS-style short mode.
20315  # If so, the updated path is stored in $new_path.
20316  new_path="$input_to_shortpath"
20317
20318  input_path="$input_to_shortpath"
20319  # Check if we need to convert this using DOS-style short mode. If the path
20320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20321  # take no chances and rewrite it.
20322  # Note: m4 eats our [], so we need to use [ and ] instead.
20323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20324  if test "x$has_forbidden_chars" != x; then
20325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20329      # Going to short mode and back again did indeed matter. Since short mode is
20330      # case insensitive, let's make it lowercase to improve readability.
20331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20332      # Now convert it back to Unix-style (cygpath)
20333      input_path=`$CYGPATH -u "$shortmode_path"`
20334      new_path="$input_path"
20335    fi
20336  fi
20337
20338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20339  if test "x$test_cygdrive_prefix" = x; then
20340    # As a simple fix, exclude /usr/bin since it's not a real path.
20341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20343      # a path prefixed by /cygdrive for fixpath to work.
20344      new_path="$CYGWIN_ROOT_PATH$input_path"
20345    fi
20346  fi
20347
20348  # remove trailing .exe if any
20349  new_path="${new_path/%.exe/}"
20350
20351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20352
20353  # First separate the path from the arguments. This will split at the first
20354  # space.
20355  complete="$FOUND_MAKE"
20356  path="${complete%% *}"
20357  tmp="$complete EOL"
20358  arguments="${tmp#* }"
20359
20360  # Input might be given as Windows format, start by converting to
20361  # unix format.
20362  new_path="$path"
20363
20364  windows_path="$new_path"
20365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20366    unix_path=`$CYGPATH -u "$windows_path"`
20367    new_path="$unix_path"
20368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20370    new_path="$unix_path"
20371  fi
20372
20373
20374  # Now try to locate executable using which
20375  new_path=`$WHICH "$new_path" 2> /dev/null`
20376
20377  if test "x$new_path" = x; then
20378    # Oops. Which didn't find the executable.
20379    # The splitting of arguments from the executable at a space might have been incorrect,
20380    # since paths with space are more likely in Windows. Give it another try with the whole
20381    # argument.
20382    path="$complete"
20383    arguments="EOL"
20384    new_path="$path"
20385
20386  windows_path="$new_path"
20387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20388    unix_path=`$CYGPATH -u "$windows_path"`
20389    new_path="$unix_path"
20390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20392    new_path="$unix_path"
20393  fi
20394
20395
20396    new_path=`$WHICH "$new_path" 2> /dev/null`
20397    # bat and cmd files are not always considered executable in MSYS causing which
20398    # to not find them
20399    if test "x$new_path" = x \
20400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20402      new_path="$path"
20403
20404  windows_path="$new_path"
20405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20406    unix_path=`$CYGPATH -u "$windows_path"`
20407    new_path="$unix_path"
20408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20410    new_path="$unix_path"
20411  fi
20412
20413    fi
20414
20415    if test "x$new_path" = x; then
20416      # It's still not found. Now this is an unrecoverable error.
20417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20419      has_space=`$ECHO "$complete" | $GREP " "`
20420      if test "x$has_space" != x; then
20421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20423      fi
20424      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20425    fi
20426  fi
20427
20428  # Now new_path has a complete unix path to the binary
20429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20430    # Keep paths in /bin as-is, but remove trailing .exe if any
20431    new_path="${new_path/%.exe/}"
20432    # Do not save /bin paths to all_fixpath_prefixes!
20433  else
20434    # Not in mixed or Windows style, start by that.
20435    new_path=`cmd //c echo $new_path`
20436
20437  input_path="$new_path"
20438  # Check if we need to convert this using DOS-style short mode. If the path
20439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20440  # take no chances and rewrite it.
20441  # Note: m4 eats our [], so we need to use [ and ] instead.
20442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20443  if test "x$has_forbidden_chars" != x; then
20444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20446  fi
20447
20448    # Output is in $new_path
20449
20450  windows_path="$new_path"
20451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20452    unix_path=`$CYGPATH -u "$windows_path"`
20453    new_path="$unix_path"
20454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20456    new_path="$unix_path"
20457  fi
20458
20459    # remove trailing .exe if any
20460    new_path="${new_path/%.exe/}"
20461
20462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20464  fi
20465
20466    else
20467      # We're on a unix platform. Hooray! :)
20468      # First separate the path from the arguments. This will split at the first
20469      # space.
20470      complete="$FOUND_MAKE"
20471      path="${complete%% *}"
20472      tmp="$complete EOL"
20473      arguments="${tmp#* }"
20474
20475      # Cannot rely on the command "which" here since it doesn't always work.
20476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20477      if test -z "$is_absolute_path"; then
20478        # Path to executable is not absolute. Find it.
20479        IFS_save="$IFS"
20480        IFS=:
20481        for p in $PATH; do
20482          if test -f "$p/$path" && test -x "$p/$path"; then
20483            new_path="$p/$path"
20484            break
20485          fi
20486        done
20487        IFS="$IFS_save"
20488      else
20489        # This is an absolute path, we can use it without further modifications.
20490        new_path="$path"
20491      fi
20492
20493      if test "x$new_path" = x; then
20494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20495$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20496        has_space=`$ECHO "$complete" | $GREP " "`
20497        if test "x$has_space" != x; then
20498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20500        fi
20501        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20502      fi
20503    fi
20504
20505    # Now join together the path and the arguments once again
20506    if test "x$arguments" != xEOL; then
20507      new_complete="$new_path ${arguments% *}"
20508    else
20509      new_complete="$new_path"
20510    fi
20511
20512    if test "x$complete" != "x$new_complete"; then
20513      FOUND_MAKE="$new_complete"
20514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20515$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20516    fi
20517  fi
20518
20519        fi
20520      fi
20521    fi
20522  fi
20523
20524        if test "x$FOUND_MAKE" = x; then
20525          for ac_prog in make
20526do
20527  # Extract the first word of "$ac_prog", so it can be a program name with args.
20528set dummy $ac_prog; ac_word=$2
20529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20530$as_echo_n "checking for $ac_word... " >&6; }
20531if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20532  $as_echo_n "(cached) " >&6
20533else
20534  case $CHECK_TOOLSDIR_MAKE in
20535  [\\/]* | ?:[\\/]*)
20536  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20537  ;;
20538  *)
20539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20540for as_dir in $PATH
20541do
20542  IFS=$as_save_IFS
20543  test -z "$as_dir" && as_dir=.
20544    for ac_exec_ext in '' $ac_executable_extensions; do
20545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20546    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20548    break 2
20549  fi
20550done
20551  done
20552IFS=$as_save_IFS
20553
20554  ;;
20555esac
20556fi
20557CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20558if test -n "$CHECK_TOOLSDIR_MAKE"; then
20559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20560$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20561else
20562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20563$as_echo "no" >&6; }
20564fi
20565
20566
20567  test -n "$CHECK_TOOLSDIR_MAKE" && break
20568done
20569
20570
20571  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20572  DESCRIPTION="make in tools-dir"
20573
20574  # On Cygwin, we require a newer version of make than on other platforms
20575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20576    MAKE_VERSION_EXPR="-e 4\."
20577    MAKE_REQUIRED_VERSION="4.0"
20578   else
20579    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20580    MAKE_REQUIRED_VERSION="3.81"
20581  fi
20582
20583  if test "x$MAKE_CANDIDATE" != x; then
20584    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20585$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20586    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20587    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20588    if test "x$IS_GNU_MAKE" = x; then
20589      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20590$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20591    else
20592      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20593      if test "x$IS_MODERN_MAKE" = x; then
20594        { $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
20595$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;}
20596      else
20597        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20598          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20599            MAKE_EXPECTED_ENV='cygwin'
20600          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20601            MAKE_EXPECTED_ENV='msys'
20602          else
20603            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20604          fi
20605          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20606          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20607        else
20608          # Not relevant for non-Windows
20609          IS_MAKE_CORRECT_ENV=true
20610        fi
20611        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20612          { $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
20613$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;}
20614        else
20615          FOUND_MAKE=$MAKE_CANDIDATE
20616
20617  # Only process if variable expands to non-empty
20618
20619  if test "x$FOUND_MAKE" != x; then
20620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20621
20622  # First separate the path from the arguments. This will split at the first
20623  # space.
20624  complete="$FOUND_MAKE"
20625  path="${complete%% *}"
20626  tmp="$complete EOL"
20627  arguments="${tmp#* }"
20628
20629  # Input might be given as Windows format, start by converting to
20630  # unix format.
20631  new_path=`$CYGPATH -u "$path"`
20632
20633  # Now try to locate executable using which
20634  new_path=`$WHICH "$new_path" 2> /dev/null`
20635  # bat and cmd files are not always considered executable in cygwin causing which
20636  # to not find them
20637  if test "x$new_path" = x \
20638      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20639      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20640    new_path=`$CYGPATH -u "$path"`
20641  fi
20642  if test "x$new_path" = x; then
20643    # Oops. Which didn't find the executable.
20644    # The splitting of arguments from the executable at a space might have been incorrect,
20645    # since paths with space are more likely in Windows. Give it another try with the whole
20646    # argument.
20647    path="$complete"
20648    arguments="EOL"
20649    new_path=`$CYGPATH -u "$path"`
20650    new_path=`$WHICH "$new_path" 2> /dev/null`
20651    # bat and cmd files are not always considered executable in cygwin causing which
20652    # to not find them
20653    if test "x$new_path" = x \
20654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20656      new_path=`$CYGPATH -u "$path"`
20657    fi
20658    if test "x$new_path" = x; then
20659      # It's still not found. Now this is an unrecoverable error.
20660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20662      has_space=`$ECHO "$complete" | $GREP " "`
20663      if test "x$has_space" != x; then
20664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20666      fi
20667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20668    fi
20669  fi
20670
20671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20674  # "foo.exe" is OK but "foo" is an error.
20675  #
20676  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20677  # It is also a way to make sure we got the proper file name for the real test later on.
20678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20679  if test "x$test_shortpath" = x; then
20680    # Short path failed, file does not exist as specified.
20681    # Try adding .exe or .cmd
20682    if test -f "${new_path}.exe"; then
20683      input_to_shortpath="${new_path}.exe"
20684    elif test -f "${new_path}.cmd"; then
20685      input_to_shortpath="${new_path}.cmd"
20686    else
20687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20692    fi
20693  else
20694    input_to_shortpath="$new_path"
20695  fi
20696
20697  # Call helper function which possibly converts this using DOS-style short mode.
20698  # If so, the updated path is stored in $new_path.
20699  new_path="$input_to_shortpath"
20700
20701  input_path="$input_to_shortpath"
20702  # Check if we need to convert this using DOS-style short mode. If the path
20703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20704  # take no chances and rewrite it.
20705  # Note: m4 eats our [], so we need to use [ and ] instead.
20706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20707  if test "x$has_forbidden_chars" != x; then
20708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20712      # Going to short mode and back again did indeed matter. Since short mode is
20713      # case insensitive, let's make it lowercase to improve readability.
20714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20715      # Now convert it back to Unix-style (cygpath)
20716      input_path=`$CYGPATH -u "$shortmode_path"`
20717      new_path="$input_path"
20718    fi
20719  fi
20720
20721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20722  if test "x$test_cygdrive_prefix" = x; then
20723    # As a simple fix, exclude /usr/bin since it's not a real path.
20724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20726      # a path prefixed by /cygdrive for fixpath to work.
20727      new_path="$CYGWIN_ROOT_PATH$input_path"
20728    fi
20729  fi
20730
20731  # remove trailing .exe if any
20732  new_path="${new_path/%.exe/}"
20733
20734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20735
20736  # First separate the path from the arguments. This will split at the first
20737  # space.
20738  complete="$FOUND_MAKE"
20739  path="${complete%% *}"
20740  tmp="$complete EOL"
20741  arguments="${tmp#* }"
20742
20743  # Input might be given as Windows format, start by converting to
20744  # unix format.
20745  new_path="$path"
20746
20747  windows_path="$new_path"
20748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20749    unix_path=`$CYGPATH -u "$windows_path"`
20750    new_path="$unix_path"
20751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20753    new_path="$unix_path"
20754  fi
20755
20756
20757  # Now try to locate executable using which
20758  new_path=`$WHICH "$new_path" 2> /dev/null`
20759
20760  if test "x$new_path" = x; then
20761    # Oops. Which didn't find the executable.
20762    # The splitting of arguments from the executable at a space might have been incorrect,
20763    # since paths with space are more likely in Windows. Give it another try with the whole
20764    # argument.
20765    path="$complete"
20766    arguments="EOL"
20767    new_path="$path"
20768
20769  windows_path="$new_path"
20770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20771    unix_path=`$CYGPATH -u "$windows_path"`
20772    new_path="$unix_path"
20773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20775    new_path="$unix_path"
20776  fi
20777
20778
20779    new_path=`$WHICH "$new_path" 2> /dev/null`
20780    # bat and cmd files are not always considered executable in MSYS causing which
20781    # to not find them
20782    if test "x$new_path" = x \
20783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20785      new_path="$path"
20786
20787  windows_path="$new_path"
20788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20789    unix_path=`$CYGPATH -u "$windows_path"`
20790    new_path="$unix_path"
20791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20793    new_path="$unix_path"
20794  fi
20795
20796    fi
20797
20798    if test "x$new_path" = x; then
20799      # It's still not found. Now this is an unrecoverable error.
20800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20801$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20802      has_space=`$ECHO "$complete" | $GREP " "`
20803      if test "x$has_space" != x; then
20804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20806      fi
20807      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20808    fi
20809  fi
20810
20811  # Now new_path has a complete unix path to the binary
20812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20813    # Keep paths in /bin as-is, but remove trailing .exe if any
20814    new_path="${new_path/%.exe/}"
20815    # Do not save /bin paths to all_fixpath_prefixes!
20816  else
20817    # Not in mixed or Windows style, start by that.
20818    new_path=`cmd //c echo $new_path`
20819
20820  input_path="$new_path"
20821  # Check if we need to convert this using DOS-style short mode. If the path
20822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20823  # take no chances and rewrite it.
20824  # Note: m4 eats our [], so we need to use [ and ] instead.
20825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20826  if test "x$has_forbidden_chars" != x; then
20827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20829  fi
20830
20831    # Output is in $new_path
20832
20833  windows_path="$new_path"
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835    unix_path=`$CYGPATH -u "$windows_path"`
20836    new_path="$unix_path"
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839    new_path="$unix_path"
20840  fi
20841
20842    # remove trailing .exe if any
20843    new_path="${new_path/%.exe/}"
20844
20845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20847  fi
20848
20849    else
20850      # We're on a unix platform. Hooray! :)
20851      # First separate the path from the arguments. This will split at the first
20852      # space.
20853      complete="$FOUND_MAKE"
20854      path="${complete%% *}"
20855      tmp="$complete EOL"
20856      arguments="${tmp#* }"
20857
20858      # Cannot rely on the command "which" here since it doesn't always work.
20859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20860      if test -z "$is_absolute_path"; then
20861        # Path to executable is not absolute. Find it.
20862        IFS_save="$IFS"
20863        IFS=:
20864        for p in $PATH; do
20865          if test -f "$p/$path" && test -x "$p/$path"; then
20866            new_path="$p/$path"
20867            break
20868          fi
20869        done
20870        IFS="$IFS_save"
20871      else
20872        # This is an absolute path, we can use it without further modifications.
20873        new_path="$path"
20874      fi
20875
20876      if test "x$new_path" = x; then
20877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20878$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20879        has_space=`$ECHO "$complete" | $GREP " "`
20880        if test "x$has_space" != x; then
20881          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20883        fi
20884        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20885      fi
20886    fi
20887
20888    # Now join together the path and the arguments once again
20889    if test "x$arguments" != xEOL; then
20890      new_complete="$new_path ${arguments% *}"
20891    else
20892      new_complete="$new_path"
20893    fi
20894
20895    if test "x$complete" != "x$new_complete"; then
20896      FOUND_MAKE="$new_complete"
20897      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20898$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20899    fi
20900  fi
20901
20902        fi
20903      fi
20904    fi
20905  fi
20906
20907        fi
20908        PATH=$OLD_PATH
20909      fi
20910    fi
20911
20912    if test "x$FOUND_MAKE" = x; then
20913      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
20914    fi
20915
20916    else
20917      # If it succeeded, then it was overridden by the user. We will use it
20918      # for the tool.
20919
20920      # First remove it from the list of overridden variables, so we can test
20921      # for unknown variables in the end.
20922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20923
20924      # Check if we try to supply an empty value
20925      if test "x$MAKE" = x; then
20926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20927$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20929$as_echo_n "checking for MAKE... " >&6; }
20930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20931$as_echo "disabled" >&6; }
20932      else
20933        # Check if the provided tool contains a complete path.
20934        tool_specified="$MAKE"
20935        tool_basename="${tool_specified##*/}"
20936        if test "x$tool_basename" = "x$tool_specified"; then
20937          # A command without a complete path is provided, search $PATH.
20938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20939$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20940          # Extract the first word of "$tool_basename", so it can be a program name with args.
20941set dummy $tool_basename; ac_word=$2
20942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20943$as_echo_n "checking for $ac_word... " >&6; }
20944if ${ac_cv_path_MAKE+:} false; then :
20945  $as_echo_n "(cached) " >&6
20946else
20947  case $MAKE in
20948  [\\/]* | ?:[\\/]*)
20949  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20950  ;;
20951  *)
20952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20953for as_dir in $PATH
20954do
20955  IFS=$as_save_IFS
20956  test -z "$as_dir" && as_dir=.
20957    for ac_exec_ext in '' $ac_executable_extensions; do
20958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20959    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20961    break 2
20962  fi
20963done
20964  done
20965IFS=$as_save_IFS
20966
20967  ;;
20968esac
20969fi
20970MAKE=$ac_cv_path_MAKE
20971if test -n "$MAKE"; then
20972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20973$as_echo "$MAKE" >&6; }
20974else
20975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20976$as_echo "no" >&6; }
20977fi
20978
20979
20980          if test "x$MAKE" = x; then
20981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20982          fi
20983        else
20984          # Otherwise we believe it is a complete path. Use it as it is.
20985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20986$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20988$as_echo_n "checking for MAKE... " >&6; }
20989          if test ! -x "$tool_specified"; then
20990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20991$as_echo "not found" >&6; }
20992            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20993          fi
20994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20995$as_echo "$tool_specified" >&6; }
20996        fi
20997      fi
20998    fi
20999
21000    # If MAKE was set by user, verify the version
21001
21002  MAKE_CANDIDATE=""$MAKE""
21003  DESCRIPTION="user supplied MAKE=$MAKE"
21004
21005  # On Cygwin, we require a newer version of make than on other platforms
21006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21007    MAKE_VERSION_EXPR="-e 4\."
21008    MAKE_REQUIRED_VERSION="4.0"
21009   else
21010    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21011    MAKE_REQUIRED_VERSION="3.81"
21012  fi
21013
21014  if test "x$MAKE_CANDIDATE" != x; then
21015    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21016$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21017    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21018    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21019    if test "x$IS_GNU_MAKE" = x; then
21020      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21021$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21022    else
21023      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21024      if test "x$IS_MODERN_MAKE" = x; then
21025        { $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
21026$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;}
21027      else
21028        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21029          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21030            MAKE_EXPECTED_ENV='cygwin'
21031          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21032            MAKE_EXPECTED_ENV='msys'
21033          else
21034            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21035          fi
21036          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21037          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21038        else
21039          # Not relevant for non-Windows
21040          IS_MAKE_CORRECT_ENV=true
21041        fi
21042        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21043          { $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
21044$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;}
21045        else
21046          FOUND_MAKE=$MAKE_CANDIDATE
21047
21048  # Only process if variable expands to non-empty
21049
21050  if test "x$FOUND_MAKE" != x; then
21051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21052
21053  # First separate the path from the arguments. This will split at the first
21054  # space.
21055  complete="$FOUND_MAKE"
21056  path="${complete%% *}"
21057  tmp="$complete EOL"
21058  arguments="${tmp#* }"
21059
21060  # Input might be given as Windows format, start by converting to
21061  # unix format.
21062  new_path=`$CYGPATH -u "$path"`
21063
21064  # Now try to locate executable using which
21065  new_path=`$WHICH "$new_path" 2> /dev/null`
21066  # bat and cmd files are not always considered executable in cygwin causing which
21067  # to not find them
21068  if test "x$new_path" = x \
21069      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21070      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21071    new_path=`$CYGPATH -u "$path"`
21072  fi
21073  if test "x$new_path" = x; then
21074    # Oops. Which didn't find the executable.
21075    # The splitting of arguments from the executable at a space might have been incorrect,
21076    # since paths with space are more likely in Windows. Give it another try with the whole
21077    # argument.
21078    path="$complete"
21079    arguments="EOL"
21080    new_path=`$CYGPATH -u "$path"`
21081    new_path=`$WHICH "$new_path" 2> /dev/null`
21082    # bat and cmd files are not always considered executable in cygwin causing which
21083    # to not find them
21084    if test "x$new_path" = x \
21085        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21086        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21087      new_path=`$CYGPATH -u "$path"`
21088    fi
21089    if test "x$new_path" = x; then
21090      # It's still not found. Now this is an unrecoverable error.
21091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21092$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21093      has_space=`$ECHO "$complete" | $GREP " "`
21094      if test "x$has_space" != x; then
21095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21097      fi
21098      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21099    fi
21100  fi
21101
21102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21105  # "foo.exe" is OK but "foo" is an error.
21106  #
21107  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21108  # It is also a way to make sure we got the proper file name for the real test later on.
21109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21110  if test "x$test_shortpath" = x; then
21111    # Short path failed, file does not exist as specified.
21112    # Try adding .exe or .cmd
21113    if test -f "${new_path}.exe"; then
21114      input_to_shortpath="${new_path}.exe"
21115    elif test -f "${new_path}.cmd"; then
21116      input_to_shortpath="${new_path}.cmd"
21117    else
21118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21119$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21120      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21121$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21122      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21123    fi
21124  else
21125    input_to_shortpath="$new_path"
21126  fi
21127
21128  # Call helper function which possibly converts this using DOS-style short mode.
21129  # If so, the updated path is stored in $new_path.
21130  new_path="$input_to_shortpath"
21131
21132  input_path="$input_to_shortpath"
21133  # Check if we need to convert this using DOS-style short mode. If the path
21134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21135  # take no chances and rewrite it.
21136  # Note: m4 eats our [], so we need to use [ and ] instead.
21137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21138  if test "x$has_forbidden_chars" != x; then
21139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21143      # Going to short mode and back again did indeed matter. Since short mode is
21144      # case insensitive, let's make it lowercase to improve readability.
21145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21146      # Now convert it back to Unix-style (cygpath)
21147      input_path=`$CYGPATH -u "$shortmode_path"`
21148      new_path="$input_path"
21149    fi
21150  fi
21151
21152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21153  if test "x$test_cygdrive_prefix" = x; then
21154    # As a simple fix, exclude /usr/bin since it's not a real path.
21155    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21157      # a path prefixed by /cygdrive for fixpath to work.
21158      new_path="$CYGWIN_ROOT_PATH$input_path"
21159    fi
21160  fi
21161
21162  # remove trailing .exe if any
21163  new_path="${new_path/%.exe/}"
21164
21165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21166
21167  # First separate the path from the arguments. This will split at the first
21168  # space.
21169  complete="$FOUND_MAKE"
21170  path="${complete%% *}"
21171  tmp="$complete EOL"
21172  arguments="${tmp#* }"
21173
21174  # Input might be given as Windows format, start by converting to
21175  # unix format.
21176  new_path="$path"
21177
21178  windows_path="$new_path"
21179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21180    unix_path=`$CYGPATH -u "$windows_path"`
21181    new_path="$unix_path"
21182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21184    new_path="$unix_path"
21185  fi
21186
21187
21188  # Now try to locate executable using which
21189  new_path=`$WHICH "$new_path" 2> /dev/null`
21190
21191  if test "x$new_path" = x; then
21192    # Oops. Which didn't find the executable.
21193    # The splitting of arguments from the executable at a space might have been incorrect,
21194    # since paths with space are more likely in Windows. Give it another try with the whole
21195    # argument.
21196    path="$complete"
21197    arguments="EOL"
21198    new_path="$path"
21199
21200  windows_path="$new_path"
21201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21202    unix_path=`$CYGPATH -u "$windows_path"`
21203    new_path="$unix_path"
21204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21206    new_path="$unix_path"
21207  fi
21208
21209
21210    new_path=`$WHICH "$new_path" 2> /dev/null`
21211    # bat and cmd files are not always considered executable in MSYS causing which
21212    # to not find them
21213    if test "x$new_path" = x \
21214        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21215        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21216      new_path="$path"
21217
21218  windows_path="$new_path"
21219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21220    unix_path=`$CYGPATH -u "$windows_path"`
21221    new_path="$unix_path"
21222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21224    new_path="$unix_path"
21225  fi
21226
21227    fi
21228
21229    if test "x$new_path" = x; then
21230      # It's still not found. Now this is an unrecoverable error.
21231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21232$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21233      has_space=`$ECHO "$complete" | $GREP " "`
21234      if test "x$has_space" != x; then
21235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21237      fi
21238      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21239    fi
21240  fi
21241
21242  # Now new_path has a complete unix path to the binary
21243  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21244    # Keep paths in /bin as-is, but remove trailing .exe if any
21245    new_path="${new_path/%.exe/}"
21246    # Do not save /bin paths to all_fixpath_prefixes!
21247  else
21248    # Not in mixed or Windows style, start by that.
21249    new_path=`cmd //c echo $new_path`
21250
21251  input_path="$new_path"
21252  # Check if we need to convert this using DOS-style short mode. If the path
21253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21254  # take no chances and rewrite it.
21255  # Note: m4 eats our [], so we need to use [ and ] instead.
21256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21257  if test "x$has_forbidden_chars" != x; then
21258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21260  fi
21261
21262    # Output is in $new_path
21263
21264  windows_path="$new_path"
21265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21266    unix_path=`$CYGPATH -u "$windows_path"`
21267    new_path="$unix_path"
21268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21270    new_path="$unix_path"
21271  fi
21272
21273    # remove trailing .exe if any
21274    new_path="${new_path/%.exe/}"
21275
21276    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21277    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21278  fi
21279
21280    else
21281      # We're on a unix platform. Hooray! :)
21282      # First separate the path from the arguments. This will split at the first
21283      # space.
21284      complete="$FOUND_MAKE"
21285      path="${complete%% *}"
21286      tmp="$complete EOL"
21287      arguments="${tmp#* }"
21288
21289      # Cannot rely on the command "which" here since it doesn't always work.
21290      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21291      if test -z "$is_absolute_path"; then
21292        # Path to executable is not absolute. Find it.
21293        IFS_save="$IFS"
21294        IFS=:
21295        for p in $PATH; do
21296          if test -f "$p/$path" && test -x "$p/$path"; then
21297            new_path="$p/$path"
21298            break
21299          fi
21300        done
21301        IFS="$IFS_save"
21302      else
21303        # This is an absolute path, we can use it without further modifications.
21304        new_path="$path"
21305      fi
21306
21307      if test "x$new_path" = x; then
21308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21309$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21310        has_space=`$ECHO "$complete" | $GREP " "`
21311        if test "x$has_space" != x; then
21312          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21314        fi
21315        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21316      fi
21317    fi
21318
21319    # Now join together the path and the arguments once again
21320    if test "x$arguments" != xEOL; then
21321      new_complete="$new_path ${arguments% *}"
21322    else
21323      new_complete="$new_path"
21324    fi
21325
21326    if test "x$complete" != "x$new_complete"; then
21327      FOUND_MAKE="$new_complete"
21328      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21329$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21330    fi
21331  fi
21332
21333        fi
21334      fi
21335    fi
21336  fi
21337
21338    if test "x$FOUND_MAKE" = x; then
21339      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21340    fi
21341
21342  fi
21343
21344
21345  MAKE=$FOUND_MAKE
21346
21347  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21348$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21349
21350
21351  # Check if make supports the output sync option and if so, setup using it.
21352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21353$as_echo_n "checking if make --output-sync is supported... " >&6; }
21354  if $MAKE --version -O > /dev/null 2>&1; then
21355    OUTPUT_SYNC_SUPPORTED=true
21356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21357$as_echo "yes" >&6; }
21358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21359$as_echo_n "checking for output-sync value... " >&6; }
21360
21361# Check whether --with-output-sync was given.
21362if test "${with_output_sync+set}" = set; then :
21363  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21364fi
21365
21366    if test "x$OUTPUT_SYNC" = "x"; then
21367      OUTPUT_SYNC=none
21368    fi
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21370$as_echo "$OUTPUT_SYNC" >&6; }
21371    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21372      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21373    fi
21374  else
21375    OUTPUT_SYNC_SUPPORTED=false
21376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21377$as_echo "no" >&6; }
21378  fi
21379
21380
21381
21382
21383
21384
21385  # Test if find supports -delete
21386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21387$as_echo_n "checking if find supports -delete... " >&6; }
21388  FIND_DELETE="-delete"
21389
21390  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21391
21392  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21393
21394  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21395  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21396    # No, it does not.
21397    $RM $DELETEDIR/TestIfFindSupportsDelete
21398    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21399      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21400      FIND_DELETE="-print | $XARGS $RM"
21401    else
21402      FIND_DELETE="-exec $RM \{\} \+"
21403    fi
21404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21405$as_echo "no" >&6; }
21406  else
21407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21408$as_echo "yes" >&6; }
21409  fi
21410  $RMDIR $DELETEDIR
21411
21412
21413
21414  # Test which kind of tar was found
21415  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21416    TAR_TYPE="gnu"
21417  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21418    TAR_TYPE="bsd"
21419  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21420    TAR_TYPE="bsd"
21421  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21422    TAR_TYPE="solaris"
21423  fi
21424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21425$as_echo_n "checking what type of tar was found... " >&6; }
21426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21427$as_echo "$TAR_TYPE" >&6; }
21428
21429  TAR_CREATE_FILE_PARAM=""
21430
21431  if test "x$TAR_TYPE" = "xgnu"; then
21432    TAR_INCLUDE_PARAM="T"
21433    TAR_SUPPORTS_TRANSFORM="true"
21434    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21435      # When using gnu tar for Solaris targets, need to use compatibility mode
21436      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21437    fi
21438  else
21439    TAR_INCLUDE_PARAM="I"
21440    TAR_SUPPORTS_TRANSFORM="false"
21441  fi
21442
21443
21444
21445
21446
21447
21448  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21449  # This is a problem for the grep resident on AIX.
21450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21451$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21452  # Multiple subsequent spaces..
21453  STACK_SPACES='aaa   bbb   ccc'
21454  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21455  # patterns in it.
21456  STACK_LIST=${STACK_SPACES// /$'\n'}
21457  NEEDLE_SPACES='ccc bbb aaa'
21458  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21459  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21460  if test "x$RESULT" == "x"; then
21461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21462$as_echo "yes" >&6; }
21463  else
21464    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21465      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21466    fi
21467    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21468  fi
21469
21470
21471  # These tools might not be installed by default,
21472  # need hint on how to install them.
21473
21474
21475
21476  # Publish this variable in the help.
21477
21478
21479  if [ -z "${UNZIP+x}" ]; then
21480    # The variable is not set by user, try to locate tool using the code snippet
21481    for ac_prog in unzip
21482do
21483  # Extract the first word of "$ac_prog", so it can be a program name with args.
21484set dummy $ac_prog; ac_word=$2
21485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21486$as_echo_n "checking for $ac_word... " >&6; }
21487if ${ac_cv_path_UNZIP+:} false; then :
21488  $as_echo_n "(cached) " >&6
21489else
21490  case $UNZIP in
21491  [\\/]* | ?:[\\/]*)
21492  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21493  ;;
21494  *)
21495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21496for as_dir in $PATH
21497do
21498  IFS=$as_save_IFS
21499  test -z "$as_dir" && as_dir=.
21500    for ac_exec_ext in '' $ac_executable_extensions; do
21501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21502    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21504    break 2
21505  fi
21506done
21507  done
21508IFS=$as_save_IFS
21509
21510  ;;
21511esac
21512fi
21513UNZIP=$ac_cv_path_UNZIP
21514if test -n "$UNZIP"; then
21515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21516$as_echo "$UNZIP" >&6; }
21517else
21518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21519$as_echo "no" >&6; }
21520fi
21521
21522
21523  test -n "$UNZIP" && break
21524done
21525
21526  else
21527    # The variable is set, but is it from the command line or the environment?
21528
21529    # Try to remove the string !UNZIP! from our list.
21530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21532      # If it failed, the variable was not from the command line. Ignore it,
21533      # but warn the user (except for BASH, which is always set by the calling BASH).
21534      if test "xUNZIP" != xBASH; then
21535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21536$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21537      fi
21538      # Try to locate tool using the code snippet
21539      for ac_prog in unzip
21540do
21541  # Extract the first word of "$ac_prog", so it can be a program name with args.
21542set dummy $ac_prog; ac_word=$2
21543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21544$as_echo_n "checking for $ac_word... " >&6; }
21545if ${ac_cv_path_UNZIP+:} false; then :
21546  $as_echo_n "(cached) " >&6
21547else
21548  case $UNZIP in
21549  [\\/]* | ?:[\\/]*)
21550  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21551  ;;
21552  *)
21553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21554for as_dir in $PATH
21555do
21556  IFS=$as_save_IFS
21557  test -z "$as_dir" && as_dir=.
21558    for ac_exec_ext in '' $ac_executable_extensions; do
21559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21560    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21562    break 2
21563  fi
21564done
21565  done
21566IFS=$as_save_IFS
21567
21568  ;;
21569esac
21570fi
21571UNZIP=$ac_cv_path_UNZIP
21572if test -n "$UNZIP"; then
21573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21574$as_echo "$UNZIP" >&6; }
21575else
21576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21577$as_echo "no" >&6; }
21578fi
21579
21580
21581  test -n "$UNZIP" && break
21582done
21583
21584    else
21585      # If it succeeded, then it was overridden by the user. We will use it
21586      # for the tool.
21587
21588      # First remove it from the list of overridden variables, so we can test
21589      # for unknown variables in the end.
21590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21591
21592      # Check if we try to supply an empty value
21593      if test "x$UNZIP" = x; then
21594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21595$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21597$as_echo_n "checking for UNZIP... " >&6; }
21598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21599$as_echo "disabled" >&6; }
21600      else
21601        # Check if the provided tool contains a complete path.
21602        tool_specified="$UNZIP"
21603        tool_basename="${tool_specified##*/}"
21604        if test "x$tool_basename" = "x$tool_specified"; then
21605          # A command without a complete path is provided, search $PATH.
21606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21607$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21608          # Extract the first word of "$tool_basename", so it can be a program name with args.
21609set dummy $tool_basename; ac_word=$2
21610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21611$as_echo_n "checking for $ac_word... " >&6; }
21612if ${ac_cv_path_UNZIP+:} false; then :
21613  $as_echo_n "(cached) " >&6
21614else
21615  case $UNZIP in
21616  [\\/]* | ?:[\\/]*)
21617  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21618  ;;
21619  *)
21620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21621for as_dir in $PATH
21622do
21623  IFS=$as_save_IFS
21624  test -z "$as_dir" && as_dir=.
21625    for ac_exec_ext in '' $ac_executable_extensions; do
21626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21627    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21629    break 2
21630  fi
21631done
21632  done
21633IFS=$as_save_IFS
21634
21635  ;;
21636esac
21637fi
21638UNZIP=$ac_cv_path_UNZIP
21639if test -n "$UNZIP"; then
21640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21641$as_echo "$UNZIP" >&6; }
21642else
21643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21644$as_echo "no" >&6; }
21645fi
21646
21647
21648          if test "x$UNZIP" = x; then
21649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21650          fi
21651        else
21652          # Otherwise we believe it is a complete path. Use it as it is.
21653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21654$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21656$as_echo_n "checking for UNZIP... " >&6; }
21657          if test ! -x "$tool_specified"; then
21658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21659$as_echo "not found" >&6; }
21660            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21661          fi
21662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21663$as_echo "$tool_specified" >&6; }
21664        fi
21665      fi
21666    fi
21667
21668  fi
21669
21670
21671
21672  if test "x$UNZIP" = x; then
21673    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21674  fi
21675
21676
21677  # Since zip uses "ZIP" as a environment variable for passing options, we need
21678  # to name our variable differently, hence ZIPEXE.
21679
21680
21681
21682  # Publish this variable in the help.
21683
21684
21685  if [ -z "${ZIPEXE+x}" ]; then
21686    # The variable is not set by user, try to locate tool using the code snippet
21687    for ac_prog in zip
21688do
21689  # Extract the first word of "$ac_prog", so it can be a program name with args.
21690set dummy $ac_prog; ac_word=$2
21691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21692$as_echo_n "checking for $ac_word... " >&6; }
21693if ${ac_cv_path_ZIPEXE+:} false; then :
21694  $as_echo_n "(cached) " >&6
21695else
21696  case $ZIPEXE in
21697  [\\/]* | ?:[\\/]*)
21698  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21699  ;;
21700  *)
21701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21702for as_dir in $PATH
21703do
21704  IFS=$as_save_IFS
21705  test -z "$as_dir" && as_dir=.
21706    for ac_exec_ext in '' $ac_executable_extensions; do
21707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21708    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21710    break 2
21711  fi
21712done
21713  done
21714IFS=$as_save_IFS
21715
21716  ;;
21717esac
21718fi
21719ZIPEXE=$ac_cv_path_ZIPEXE
21720if test -n "$ZIPEXE"; then
21721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21722$as_echo "$ZIPEXE" >&6; }
21723else
21724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21725$as_echo "no" >&6; }
21726fi
21727
21728
21729  test -n "$ZIPEXE" && break
21730done
21731
21732  else
21733    # The variable is set, but is it from the command line or the environment?
21734
21735    # Try to remove the string !ZIPEXE! from our list.
21736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21738      # If it failed, the variable was not from the command line. Ignore it,
21739      # but warn the user (except for BASH, which is always set by the calling BASH).
21740      if test "xZIPEXE" != xBASH; then
21741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21742$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21743      fi
21744      # Try to locate tool using the code snippet
21745      for ac_prog in zip
21746do
21747  # Extract the first word of "$ac_prog", so it can be a program name with args.
21748set dummy $ac_prog; ac_word=$2
21749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21750$as_echo_n "checking for $ac_word... " >&6; }
21751if ${ac_cv_path_ZIPEXE+:} false; then :
21752  $as_echo_n "(cached) " >&6
21753else
21754  case $ZIPEXE in
21755  [\\/]* | ?:[\\/]*)
21756  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21757  ;;
21758  *)
21759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21760for as_dir in $PATH
21761do
21762  IFS=$as_save_IFS
21763  test -z "$as_dir" && as_dir=.
21764    for ac_exec_ext in '' $ac_executable_extensions; do
21765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21766    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21768    break 2
21769  fi
21770done
21771  done
21772IFS=$as_save_IFS
21773
21774  ;;
21775esac
21776fi
21777ZIPEXE=$ac_cv_path_ZIPEXE
21778if test -n "$ZIPEXE"; then
21779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21780$as_echo "$ZIPEXE" >&6; }
21781else
21782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21783$as_echo "no" >&6; }
21784fi
21785
21786
21787  test -n "$ZIPEXE" && break
21788done
21789
21790    else
21791      # If it succeeded, then it was overridden by the user. We will use it
21792      # for the tool.
21793
21794      # First remove it from the list of overridden variables, so we can test
21795      # for unknown variables in the end.
21796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21797
21798      # Check if we try to supply an empty value
21799      if test "x$ZIPEXE" = x; then
21800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21801$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21803$as_echo_n "checking for ZIPEXE... " >&6; }
21804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21805$as_echo "disabled" >&6; }
21806      else
21807        # Check if the provided tool contains a complete path.
21808        tool_specified="$ZIPEXE"
21809        tool_basename="${tool_specified##*/}"
21810        if test "x$tool_basename" = "x$tool_specified"; then
21811          # A command without a complete path is provided, search $PATH.
21812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21813$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21814          # Extract the first word of "$tool_basename", so it can be a program name with args.
21815set dummy $tool_basename; ac_word=$2
21816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21817$as_echo_n "checking for $ac_word... " >&6; }
21818if ${ac_cv_path_ZIPEXE+:} false; then :
21819  $as_echo_n "(cached) " >&6
21820else
21821  case $ZIPEXE in
21822  [\\/]* | ?:[\\/]*)
21823  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21824  ;;
21825  *)
21826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21827for as_dir in $PATH
21828do
21829  IFS=$as_save_IFS
21830  test -z "$as_dir" && as_dir=.
21831    for ac_exec_ext in '' $ac_executable_extensions; do
21832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21833    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21835    break 2
21836  fi
21837done
21838  done
21839IFS=$as_save_IFS
21840
21841  ;;
21842esac
21843fi
21844ZIPEXE=$ac_cv_path_ZIPEXE
21845if test -n "$ZIPEXE"; then
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21847$as_echo "$ZIPEXE" >&6; }
21848else
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21850$as_echo "no" >&6; }
21851fi
21852
21853
21854          if test "x$ZIPEXE" = x; then
21855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21856          fi
21857        else
21858          # Otherwise we believe it is a complete path. Use it as it is.
21859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21860$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21862$as_echo_n "checking for ZIPEXE... " >&6; }
21863          if test ! -x "$tool_specified"; then
21864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21865$as_echo "not found" >&6; }
21866            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21867          fi
21868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21869$as_echo "$tool_specified" >&6; }
21870        fi
21871      fi
21872    fi
21873
21874  fi
21875
21876
21877
21878  if test "x$ZIPEXE" = x; then
21879    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21880  fi
21881
21882
21883
21884  # Non-required basic tools
21885
21886
21887
21888  # Publish this variable in the help.
21889
21890
21891  if [ -z "${LDD+x}" ]; then
21892    # The variable is not set by user, try to locate tool using the code snippet
21893    for ac_prog in ldd
21894do
21895  # Extract the first word of "$ac_prog", so it can be a program name with args.
21896set dummy $ac_prog; ac_word=$2
21897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21898$as_echo_n "checking for $ac_word... " >&6; }
21899if ${ac_cv_path_LDD+:} false; then :
21900  $as_echo_n "(cached) " >&6
21901else
21902  case $LDD in
21903  [\\/]* | ?:[\\/]*)
21904  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21905  ;;
21906  *)
21907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21908for as_dir in $PATH
21909do
21910  IFS=$as_save_IFS
21911  test -z "$as_dir" && as_dir=.
21912    for ac_exec_ext in '' $ac_executable_extensions; do
21913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21914    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21916    break 2
21917  fi
21918done
21919  done
21920IFS=$as_save_IFS
21921
21922  ;;
21923esac
21924fi
21925LDD=$ac_cv_path_LDD
21926if test -n "$LDD"; then
21927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21928$as_echo "$LDD" >&6; }
21929else
21930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21931$as_echo "no" >&6; }
21932fi
21933
21934
21935  test -n "$LDD" && break
21936done
21937
21938  else
21939    # The variable is set, but is it from the command line or the environment?
21940
21941    # Try to remove the string !LDD! from our list.
21942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21944      # If it failed, the variable was not from the command line. Ignore it,
21945      # but warn the user (except for BASH, which is always set by the calling BASH).
21946      if test "xLDD" != xBASH; then
21947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21948$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21949      fi
21950      # Try to locate tool using the code snippet
21951      for ac_prog in ldd
21952do
21953  # Extract the first word of "$ac_prog", so it can be a program name with args.
21954set dummy $ac_prog; ac_word=$2
21955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21956$as_echo_n "checking for $ac_word... " >&6; }
21957if ${ac_cv_path_LDD+:} false; then :
21958  $as_echo_n "(cached) " >&6
21959else
21960  case $LDD in
21961  [\\/]* | ?:[\\/]*)
21962  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21963  ;;
21964  *)
21965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21966for as_dir in $PATH
21967do
21968  IFS=$as_save_IFS
21969  test -z "$as_dir" && as_dir=.
21970    for ac_exec_ext in '' $ac_executable_extensions; do
21971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21972    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21974    break 2
21975  fi
21976done
21977  done
21978IFS=$as_save_IFS
21979
21980  ;;
21981esac
21982fi
21983LDD=$ac_cv_path_LDD
21984if test -n "$LDD"; then
21985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21986$as_echo "$LDD" >&6; }
21987else
21988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21989$as_echo "no" >&6; }
21990fi
21991
21992
21993  test -n "$LDD" && break
21994done
21995
21996    else
21997      # If it succeeded, then it was overridden by the user. We will use it
21998      # for the tool.
21999
22000      # First remove it from the list of overridden variables, so we can test
22001      # for unknown variables in the end.
22002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22003
22004      # Check if we try to supply an empty value
22005      if test "x$LDD" = x; then
22006        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22007$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22009$as_echo_n "checking for LDD... " >&6; }
22010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22011$as_echo "disabled" >&6; }
22012      else
22013        # Check if the provided tool contains a complete path.
22014        tool_specified="$LDD"
22015        tool_basename="${tool_specified##*/}"
22016        if test "x$tool_basename" = "x$tool_specified"; then
22017          # A command without a complete path is provided, search $PATH.
22018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22019$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22020          # Extract the first word of "$tool_basename", so it can be a program name with args.
22021set dummy $tool_basename; ac_word=$2
22022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22023$as_echo_n "checking for $ac_word... " >&6; }
22024if ${ac_cv_path_LDD+:} false; then :
22025  $as_echo_n "(cached) " >&6
22026else
22027  case $LDD in
22028  [\\/]* | ?:[\\/]*)
22029  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22030  ;;
22031  *)
22032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22033for as_dir in $PATH
22034do
22035  IFS=$as_save_IFS
22036  test -z "$as_dir" && as_dir=.
22037    for ac_exec_ext in '' $ac_executable_extensions; do
22038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22039    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22041    break 2
22042  fi
22043done
22044  done
22045IFS=$as_save_IFS
22046
22047  ;;
22048esac
22049fi
22050LDD=$ac_cv_path_LDD
22051if test -n "$LDD"; then
22052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22053$as_echo "$LDD" >&6; }
22054else
22055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22056$as_echo "no" >&6; }
22057fi
22058
22059
22060          if test "x$LDD" = x; then
22061            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22062          fi
22063        else
22064          # Otherwise we believe it is a complete path. Use it as it is.
22065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22066$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22067          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22068$as_echo_n "checking for LDD... " >&6; }
22069          if test ! -x "$tool_specified"; then
22070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22071$as_echo "not found" >&6; }
22072            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22073          fi
22074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22075$as_echo "$tool_specified" >&6; }
22076        fi
22077      fi
22078    fi
22079
22080  fi
22081
22082
22083  if test "x$LDD" = "x"; then
22084    # List shared lib dependencies is used for
22085    # debug output and checking for forbidden dependencies.
22086    # We can build without it.
22087    LDD="true"
22088  fi
22089
22090
22091  # Publish this variable in the help.
22092
22093
22094  if [ -z "${OTOOL+x}" ]; then
22095    # The variable is not set by user, try to locate tool using the code snippet
22096    for ac_prog in otool
22097do
22098  # Extract the first word of "$ac_prog", so it can be a program name with args.
22099set dummy $ac_prog; ac_word=$2
22100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22101$as_echo_n "checking for $ac_word... " >&6; }
22102if ${ac_cv_path_OTOOL+:} false; then :
22103  $as_echo_n "(cached) " >&6
22104else
22105  case $OTOOL in
22106  [\\/]* | ?:[\\/]*)
22107  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22108  ;;
22109  *)
22110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22111for as_dir in $PATH
22112do
22113  IFS=$as_save_IFS
22114  test -z "$as_dir" && as_dir=.
22115    for ac_exec_ext in '' $ac_executable_extensions; do
22116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22117    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22119    break 2
22120  fi
22121done
22122  done
22123IFS=$as_save_IFS
22124
22125  ;;
22126esac
22127fi
22128OTOOL=$ac_cv_path_OTOOL
22129if test -n "$OTOOL"; then
22130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22131$as_echo "$OTOOL" >&6; }
22132else
22133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22134$as_echo "no" >&6; }
22135fi
22136
22137
22138  test -n "$OTOOL" && break
22139done
22140
22141  else
22142    # The variable is set, but is it from the command line or the environment?
22143
22144    # Try to remove the string !OTOOL! from our list.
22145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22147      # If it failed, the variable was not from the command line. Ignore it,
22148      # but warn the user (except for BASH, which is always set by the calling BASH).
22149      if test "xOTOOL" != xBASH; then
22150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22151$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22152      fi
22153      # Try to locate tool using the code snippet
22154      for ac_prog in otool
22155do
22156  # Extract the first word of "$ac_prog", so it can be a program name with args.
22157set dummy $ac_prog; ac_word=$2
22158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22159$as_echo_n "checking for $ac_word... " >&6; }
22160if ${ac_cv_path_OTOOL+:} false; then :
22161  $as_echo_n "(cached) " >&6
22162else
22163  case $OTOOL in
22164  [\\/]* | ?:[\\/]*)
22165  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22166  ;;
22167  *)
22168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22169for as_dir in $PATH
22170do
22171  IFS=$as_save_IFS
22172  test -z "$as_dir" && as_dir=.
22173    for ac_exec_ext in '' $ac_executable_extensions; do
22174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22175    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22177    break 2
22178  fi
22179done
22180  done
22181IFS=$as_save_IFS
22182
22183  ;;
22184esac
22185fi
22186OTOOL=$ac_cv_path_OTOOL
22187if test -n "$OTOOL"; then
22188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22189$as_echo "$OTOOL" >&6; }
22190else
22191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22192$as_echo "no" >&6; }
22193fi
22194
22195
22196  test -n "$OTOOL" && break
22197done
22198
22199    else
22200      # If it succeeded, then it was overridden by the user. We will use it
22201      # for the tool.
22202
22203      # First remove it from the list of overridden variables, so we can test
22204      # for unknown variables in the end.
22205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22206
22207      # Check if we try to supply an empty value
22208      if test "x$OTOOL" = x; then
22209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22210$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22212$as_echo_n "checking for OTOOL... " >&6; }
22213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22214$as_echo "disabled" >&6; }
22215      else
22216        # Check if the provided tool contains a complete path.
22217        tool_specified="$OTOOL"
22218        tool_basename="${tool_specified##*/}"
22219        if test "x$tool_basename" = "x$tool_specified"; then
22220          # A command without a complete path is provided, search $PATH.
22221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22222$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22223          # Extract the first word of "$tool_basename", so it can be a program name with args.
22224set dummy $tool_basename; ac_word=$2
22225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22226$as_echo_n "checking for $ac_word... " >&6; }
22227if ${ac_cv_path_OTOOL+:} false; then :
22228  $as_echo_n "(cached) " >&6
22229else
22230  case $OTOOL in
22231  [\\/]* | ?:[\\/]*)
22232  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22233  ;;
22234  *)
22235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22236for as_dir in $PATH
22237do
22238  IFS=$as_save_IFS
22239  test -z "$as_dir" && as_dir=.
22240    for ac_exec_ext in '' $ac_executable_extensions; do
22241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22242    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22244    break 2
22245  fi
22246done
22247  done
22248IFS=$as_save_IFS
22249
22250  ;;
22251esac
22252fi
22253OTOOL=$ac_cv_path_OTOOL
22254if test -n "$OTOOL"; then
22255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22256$as_echo "$OTOOL" >&6; }
22257else
22258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22259$as_echo "no" >&6; }
22260fi
22261
22262
22263          if test "x$OTOOL" = x; then
22264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22265          fi
22266        else
22267          # Otherwise we believe it is a complete path. Use it as it is.
22268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22269$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22271$as_echo_n "checking for OTOOL... " >&6; }
22272          if test ! -x "$tool_specified"; then
22273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22274$as_echo "not found" >&6; }
22275            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22276          fi
22277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22278$as_echo "$tool_specified" >&6; }
22279        fi
22280      fi
22281    fi
22282
22283  fi
22284
22285
22286  if test "x$OTOOL" = "x"; then
22287    OTOOL="true"
22288  fi
22289
22290
22291  # Publish this variable in the help.
22292
22293
22294  if [ -z "${READELF+x}" ]; then
22295    # The variable is not set by user, try to locate tool using the code snippet
22296    for ac_prog in greadelf readelf
22297do
22298  # Extract the first word of "$ac_prog", so it can be a program name with args.
22299set dummy $ac_prog; ac_word=$2
22300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22301$as_echo_n "checking for $ac_word... " >&6; }
22302if ${ac_cv_path_READELF+:} false; then :
22303  $as_echo_n "(cached) " >&6
22304else
22305  case $READELF in
22306  [\\/]* | ?:[\\/]*)
22307  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22308  ;;
22309  *)
22310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22311for as_dir in $PATH
22312do
22313  IFS=$as_save_IFS
22314  test -z "$as_dir" && as_dir=.
22315    for ac_exec_ext in '' $ac_executable_extensions; do
22316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22317    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22319    break 2
22320  fi
22321done
22322  done
22323IFS=$as_save_IFS
22324
22325  ;;
22326esac
22327fi
22328READELF=$ac_cv_path_READELF
22329if test -n "$READELF"; then
22330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22331$as_echo "$READELF" >&6; }
22332else
22333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22334$as_echo "no" >&6; }
22335fi
22336
22337
22338  test -n "$READELF" && break
22339done
22340
22341  else
22342    # The variable is set, but is it from the command line or the environment?
22343
22344    # Try to remove the string !READELF! from our list.
22345    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22346    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22347      # If it failed, the variable was not from the command line. Ignore it,
22348      # but warn the user (except for BASH, which is always set by the calling BASH).
22349      if test "xREADELF" != xBASH; then
22350        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22351$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22352      fi
22353      # Try to locate tool using the code snippet
22354      for ac_prog in greadelf readelf
22355do
22356  # Extract the first word of "$ac_prog", so it can be a program name with args.
22357set dummy $ac_prog; ac_word=$2
22358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22359$as_echo_n "checking for $ac_word... " >&6; }
22360if ${ac_cv_path_READELF+:} false; then :
22361  $as_echo_n "(cached) " >&6
22362else
22363  case $READELF in
22364  [\\/]* | ?:[\\/]*)
22365  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22366  ;;
22367  *)
22368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22369for as_dir in $PATH
22370do
22371  IFS=$as_save_IFS
22372  test -z "$as_dir" && as_dir=.
22373    for ac_exec_ext in '' $ac_executable_extensions; do
22374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22375    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22377    break 2
22378  fi
22379done
22380  done
22381IFS=$as_save_IFS
22382
22383  ;;
22384esac
22385fi
22386READELF=$ac_cv_path_READELF
22387if test -n "$READELF"; then
22388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22389$as_echo "$READELF" >&6; }
22390else
22391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22392$as_echo "no" >&6; }
22393fi
22394
22395
22396  test -n "$READELF" && break
22397done
22398
22399    else
22400      # If it succeeded, then it was overridden by the user. We will use it
22401      # for the tool.
22402
22403      # First remove it from the list of overridden variables, so we can test
22404      # for unknown variables in the end.
22405      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22406
22407      # Check if we try to supply an empty value
22408      if test "x$READELF" = x; then
22409        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22410$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22412$as_echo_n "checking for READELF... " >&6; }
22413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22414$as_echo "disabled" >&6; }
22415      else
22416        # Check if the provided tool contains a complete path.
22417        tool_specified="$READELF"
22418        tool_basename="${tool_specified##*/}"
22419        if test "x$tool_basename" = "x$tool_specified"; then
22420          # A command without a complete path is provided, search $PATH.
22421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22422$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22423          # Extract the first word of "$tool_basename", so it can be a program name with args.
22424set dummy $tool_basename; ac_word=$2
22425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22426$as_echo_n "checking for $ac_word... " >&6; }
22427if ${ac_cv_path_READELF+:} false; then :
22428  $as_echo_n "(cached) " >&6
22429else
22430  case $READELF in
22431  [\\/]* | ?:[\\/]*)
22432  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22433  ;;
22434  *)
22435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22436for as_dir in $PATH
22437do
22438  IFS=$as_save_IFS
22439  test -z "$as_dir" && as_dir=.
22440    for ac_exec_ext in '' $ac_executable_extensions; do
22441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22442    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22444    break 2
22445  fi
22446done
22447  done
22448IFS=$as_save_IFS
22449
22450  ;;
22451esac
22452fi
22453READELF=$ac_cv_path_READELF
22454if test -n "$READELF"; then
22455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22456$as_echo "$READELF" >&6; }
22457else
22458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22459$as_echo "no" >&6; }
22460fi
22461
22462
22463          if test "x$READELF" = x; then
22464            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22465          fi
22466        else
22467          # Otherwise we believe it is a complete path. Use it as it is.
22468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22469$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22470          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22471$as_echo_n "checking for READELF... " >&6; }
22472          if test ! -x "$tool_specified"; then
22473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22474$as_echo "not found" >&6; }
22475            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22476          fi
22477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22478$as_echo "$tool_specified" >&6; }
22479        fi
22480      fi
22481    fi
22482
22483  fi
22484
22485
22486
22487
22488  # Publish this variable in the help.
22489
22490
22491  if [ -z "${DOT+x}" ]; then
22492    # The variable is not set by user, try to locate tool using the code snippet
22493    for ac_prog in dot
22494do
22495  # Extract the first word of "$ac_prog", so it can be a program name with args.
22496set dummy $ac_prog; ac_word=$2
22497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22498$as_echo_n "checking for $ac_word... " >&6; }
22499if ${ac_cv_path_DOT+:} false; then :
22500  $as_echo_n "(cached) " >&6
22501else
22502  case $DOT in
22503  [\\/]* | ?:[\\/]*)
22504  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22505  ;;
22506  *)
22507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22508for as_dir in $PATH
22509do
22510  IFS=$as_save_IFS
22511  test -z "$as_dir" && as_dir=.
22512    for ac_exec_ext in '' $ac_executable_extensions; do
22513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22514    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22516    break 2
22517  fi
22518done
22519  done
22520IFS=$as_save_IFS
22521
22522  ;;
22523esac
22524fi
22525DOT=$ac_cv_path_DOT
22526if test -n "$DOT"; then
22527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22528$as_echo "$DOT" >&6; }
22529else
22530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22531$as_echo "no" >&6; }
22532fi
22533
22534
22535  test -n "$DOT" && break
22536done
22537
22538  else
22539    # The variable is set, but is it from the command line or the environment?
22540
22541    # Try to remove the string !DOT! from our list.
22542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22544      # If it failed, the variable was not from the command line. Ignore it,
22545      # but warn the user (except for BASH, which is always set by the calling BASH).
22546      if test "xDOT" != xBASH; then
22547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22548$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22549      fi
22550      # Try to locate tool using the code snippet
22551      for ac_prog in dot
22552do
22553  # Extract the first word of "$ac_prog", so it can be a program name with args.
22554set dummy $ac_prog; ac_word=$2
22555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22556$as_echo_n "checking for $ac_word... " >&6; }
22557if ${ac_cv_path_DOT+:} false; then :
22558  $as_echo_n "(cached) " >&6
22559else
22560  case $DOT in
22561  [\\/]* | ?:[\\/]*)
22562  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22563  ;;
22564  *)
22565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22566for as_dir in $PATH
22567do
22568  IFS=$as_save_IFS
22569  test -z "$as_dir" && as_dir=.
22570    for ac_exec_ext in '' $ac_executable_extensions; do
22571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22572    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22574    break 2
22575  fi
22576done
22577  done
22578IFS=$as_save_IFS
22579
22580  ;;
22581esac
22582fi
22583DOT=$ac_cv_path_DOT
22584if test -n "$DOT"; then
22585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22586$as_echo "$DOT" >&6; }
22587else
22588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22589$as_echo "no" >&6; }
22590fi
22591
22592
22593  test -n "$DOT" && break
22594done
22595
22596    else
22597      # If it succeeded, then it was overridden by the user. We will use it
22598      # for the tool.
22599
22600      # First remove it from the list of overridden variables, so we can test
22601      # for unknown variables in the end.
22602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22603
22604      # Check if we try to supply an empty value
22605      if test "x$DOT" = x; then
22606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22607$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22609$as_echo_n "checking for DOT... " >&6; }
22610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22611$as_echo "disabled" >&6; }
22612      else
22613        # Check if the provided tool contains a complete path.
22614        tool_specified="$DOT"
22615        tool_basename="${tool_specified##*/}"
22616        if test "x$tool_basename" = "x$tool_specified"; then
22617          # A command without a complete path is provided, search $PATH.
22618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22619$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22620          # Extract the first word of "$tool_basename", so it can be a program name with args.
22621set dummy $tool_basename; ac_word=$2
22622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22623$as_echo_n "checking for $ac_word... " >&6; }
22624if ${ac_cv_path_DOT+:} false; then :
22625  $as_echo_n "(cached) " >&6
22626else
22627  case $DOT in
22628  [\\/]* | ?:[\\/]*)
22629  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22630  ;;
22631  *)
22632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22633for as_dir in $PATH
22634do
22635  IFS=$as_save_IFS
22636  test -z "$as_dir" && as_dir=.
22637    for ac_exec_ext in '' $ac_executable_extensions; do
22638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22639    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22641    break 2
22642  fi
22643done
22644  done
22645IFS=$as_save_IFS
22646
22647  ;;
22648esac
22649fi
22650DOT=$ac_cv_path_DOT
22651if test -n "$DOT"; then
22652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22653$as_echo "$DOT" >&6; }
22654else
22655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22656$as_echo "no" >&6; }
22657fi
22658
22659
22660          if test "x$DOT" = x; then
22661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22662          fi
22663        else
22664          # Otherwise we believe it is a complete path. Use it as it is.
22665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22666$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22668$as_echo_n "checking for DOT... " >&6; }
22669          if test ! -x "$tool_specified"; then
22670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22671$as_echo "not found" >&6; }
22672            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22673          fi
22674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22675$as_echo "$tool_specified" >&6; }
22676        fi
22677      fi
22678    fi
22679
22680  fi
22681
22682
22683
22684
22685  # Publish this variable in the help.
22686
22687
22688  if [ -z "${HG+x}" ]; then
22689    # The variable is not set by user, try to locate tool using the code snippet
22690    for ac_prog in hg
22691do
22692  # Extract the first word of "$ac_prog", so it can be a program name with args.
22693set dummy $ac_prog; ac_word=$2
22694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22695$as_echo_n "checking for $ac_word... " >&6; }
22696if ${ac_cv_path_HG+:} false; then :
22697  $as_echo_n "(cached) " >&6
22698else
22699  case $HG in
22700  [\\/]* | ?:[\\/]*)
22701  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22702  ;;
22703  *)
22704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22705for as_dir in $PATH
22706do
22707  IFS=$as_save_IFS
22708  test -z "$as_dir" && as_dir=.
22709    for ac_exec_ext in '' $ac_executable_extensions; do
22710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22711    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22713    break 2
22714  fi
22715done
22716  done
22717IFS=$as_save_IFS
22718
22719  ;;
22720esac
22721fi
22722HG=$ac_cv_path_HG
22723if test -n "$HG"; then
22724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22725$as_echo "$HG" >&6; }
22726else
22727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22728$as_echo "no" >&6; }
22729fi
22730
22731
22732  test -n "$HG" && break
22733done
22734
22735  else
22736    # The variable is set, but is it from the command line or the environment?
22737
22738    # Try to remove the string !HG! from our list.
22739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22741      # If it failed, the variable was not from the command line. Ignore it,
22742      # but warn the user (except for BASH, which is always set by the calling BASH).
22743      if test "xHG" != xBASH; then
22744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22745$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22746      fi
22747      # Try to locate tool using the code snippet
22748      for ac_prog in hg
22749do
22750  # Extract the first word of "$ac_prog", so it can be a program name with args.
22751set dummy $ac_prog; ac_word=$2
22752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22753$as_echo_n "checking for $ac_word... " >&6; }
22754if ${ac_cv_path_HG+:} false; then :
22755  $as_echo_n "(cached) " >&6
22756else
22757  case $HG in
22758  [\\/]* | ?:[\\/]*)
22759  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22760  ;;
22761  *)
22762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22763for as_dir in $PATH
22764do
22765  IFS=$as_save_IFS
22766  test -z "$as_dir" && as_dir=.
22767    for ac_exec_ext in '' $ac_executable_extensions; do
22768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22769    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22771    break 2
22772  fi
22773done
22774  done
22775IFS=$as_save_IFS
22776
22777  ;;
22778esac
22779fi
22780HG=$ac_cv_path_HG
22781if test -n "$HG"; then
22782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22783$as_echo "$HG" >&6; }
22784else
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22786$as_echo "no" >&6; }
22787fi
22788
22789
22790  test -n "$HG" && break
22791done
22792
22793    else
22794      # If it succeeded, then it was overridden by the user. We will use it
22795      # for the tool.
22796
22797      # First remove it from the list of overridden variables, so we can test
22798      # for unknown variables in the end.
22799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22800
22801      # Check if we try to supply an empty value
22802      if test "x$HG" = x; then
22803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22804$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22806$as_echo_n "checking for HG... " >&6; }
22807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22808$as_echo "disabled" >&6; }
22809      else
22810        # Check if the provided tool contains a complete path.
22811        tool_specified="$HG"
22812        tool_basename="${tool_specified##*/}"
22813        if test "x$tool_basename" = "x$tool_specified"; then
22814          # A command without a complete path is provided, search $PATH.
22815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22816$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22817          # Extract the first word of "$tool_basename", so it can be a program name with args.
22818set dummy $tool_basename; ac_word=$2
22819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22820$as_echo_n "checking for $ac_word... " >&6; }
22821if ${ac_cv_path_HG+:} false; then :
22822  $as_echo_n "(cached) " >&6
22823else
22824  case $HG in
22825  [\\/]* | ?:[\\/]*)
22826  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22827  ;;
22828  *)
22829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22830for as_dir in $PATH
22831do
22832  IFS=$as_save_IFS
22833  test -z "$as_dir" && as_dir=.
22834    for ac_exec_ext in '' $ac_executable_extensions; do
22835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22836    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22838    break 2
22839  fi
22840done
22841  done
22842IFS=$as_save_IFS
22843
22844  ;;
22845esac
22846fi
22847HG=$ac_cv_path_HG
22848if test -n "$HG"; then
22849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22850$as_echo "$HG" >&6; }
22851else
22852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22853$as_echo "no" >&6; }
22854fi
22855
22856
22857          if test "x$HG" = x; then
22858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22859          fi
22860        else
22861          # Otherwise we believe it is a complete path. Use it as it is.
22862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22863$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22865$as_echo_n "checking for HG... " >&6; }
22866          if test ! -x "$tool_specified"; then
22867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22868$as_echo "not found" >&6; }
22869            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22870          fi
22871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22872$as_echo "$tool_specified" >&6; }
22873        fi
22874      fi
22875    fi
22876
22877  fi
22878
22879
22880
22881
22882  # Publish this variable in the help.
22883
22884
22885  if [ -z "${STAT+x}" ]; then
22886    # The variable is not set by user, try to locate tool using the code snippet
22887    for ac_prog in stat
22888do
22889  # Extract the first word of "$ac_prog", so it can be a program name with args.
22890set dummy $ac_prog; ac_word=$2
22891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22892$as_echo_n "checking for $ac_word... " >&6; }
22893if ${ac_cv_path_STAT+:} false; then :
22894  $as_echo_n "(cached) " >&6
22895else
22896  case $STAT in
22897  [\\/]* | ?:[\\/]*)
22898  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22899  ;;
22900  *)
22901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22902for as_dir in $PATH
22903do
22904  IFS=$as_save_IFS
22905  test -z "$as_dir" && as_dir=.
22906    for ac_exec_ext in '' $ac_executable_extensions; do
22907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22908    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22910    break 2
22911  fi
22912done
22913  done
22914IFS=$as_save_IFS
22915
22916  ;;
22917esac
22918fi
22919STAT=$ac_cv_path_STAT
22920if test -n "$STAT"; then
22921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22922$as_echo "$STAT" >&6; }
22923else
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22925$as_echo "no" >&6; }
22926fi
22927
22928
22929  test -n "$STAT" && break
22930done
22931
22932  else
22933    # The variable is set, but is it from the command line or the environment?
22934
22935    # Try to remove the string !STAT! from our list.
22936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22938      # If it failed, the variable was not from the command line. Ignore it,
22939      # but warn the user (except for BASH, which is always set by the calling BASH).
22940      if test "xSTAT" != xBASH; then
22941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22942$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22943      fi
22944      # Try to locate tool using the code snippet
22945      for ac_prog in stat
22946do
22947  # Extract the first word of "$ac_prog", so it can be a program name with args.
22948set dummy $ac_prog; ac_word=$2
22949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22950$as_echo_n "checking for $ac_word... " >&6; }
22951if ${ac_cv_path_STAT+:} false; then :
22952  $as_echo_n "(cached) " >&6
22953else
22954  case $STAT in
22955  [\\/]* | ?:[\\/]*)
22956  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22957  ;;
22958  *)
22959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22960for as_dir in $PATH
22961do
22962  IFS=$as_save_IFS
22963  test -z "$as_dir" && as_dir=.
22964    for ac_exec_ext in '' $ac_executable_extensions; do
22965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22966    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22968    break 2
22969  fi
22970done
22971  done
22972IFS=$as_save_IFS
22973
22974  ;;
22975esac
22976fi
22977STAT=$ac_cv_path_STAT
22978if test -n "$STAT"; then
22979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22980$as_echo "$STAT" >&6; }
22981else
22982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22983$as_echo "no" >&6; }
22984fi
22985
22986
22987  test -n "$STAT" && break
22988done
22989
22990    else
22991      # If it succeeded, then it was overridden by the user. We will use it
22992      # for the tool.
22993
22994      # First remove it from the list of overridden variables, so we can test
22995      # for unknown variables in the end.
22996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22997
22998      # Check if we try to supply an empty value
22999      if test "x$STAT" = x; then
23000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23001$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23003$as_echo_n "checking for STAT... " >&6; }
23004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23005$as_echo "disabled" >&6; }
23006      else
23007        # Check if the provided tool contains a complete path.
23008        tool_specified="$STAT"
23009        tool_basename="${tool_specified##*/}"
23010        if test "x$tool_basename" = "x$tool_specified"; then
23011          # A command without a complete path is provided, search $PATH.
23012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23013$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23014          # Extract the first word of "$tool_basename", so it can be a program name with args.
23015set dummy $tool_basename; ac_word=$2
23016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23017$as_echo_n "checking for $ac_word... " >&6; }
23018if ${ac_cv_path_STAT+:} false; then :
23019  $as_echo_n "(cached) " >&6
23020else
23021  case $STAT in
23022  [\\/]* | ?:[\\/]*)
23023  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23024  ;;
23025  *)
23026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23027for as_dir in $PATH
23028do
23029  IFS=$as_save_IFS
23030  test -z "$as_dir" && as_dir=.
23031    for ac_exec_ext in '' $ac_executable_extensions; do
23032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23033    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23035    break 2
23036  fi
23037done
23038  done
23039IFS=$as_save_IFS
23040
23041  ;;
23042esac
23043fi
23044STAT=$ac_cv_path_STAT
23045if test -n "$STAT"; then
23046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23047$as_echo "$STAT" >&6; }
23048else
23049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23050$as_echo "no" >&6; }
23051fi
23052
23053
23054          if test "x$STAT" = x; then
23055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23056          fi
23057        else
23058          # Otherwise we believe it is a complete path. Use it as it is.
23059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23060$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23062$as_echo_n "checking for STAT... " >&6; }
23063          if test ! -x "$tool_specified"; then
23064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23065$as_echo "not found" >&6; }
23066            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23067          fi
23068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23069$as_echo "$tool_specified" >&6; }
23070        fi
23071      fi
23072    fi
23073
23074  fi
23075
23076
23077
23078
23079  # Publish this variable in the help.
23080
23081
23082  if [ -z "${TIME+x}" ]; then
23083    # The variable is not set by user, try to locate tool using the code snippet
23084    for ac_prog in time
23085do
23086  # Extract the first word of "$ac_prog", so it can be a program name with args.
23087set dummy $ac_prog; ac_word=$2
23088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23089$as_echo_n "checking for $ac_word... " >&6; }
23090if ${ac_cv_path_TIME+:} false; then :
23091  $as_echo_n "(cached) " >&6
23092else
23093  case $TIME in
23094  [\\/]* | ?:[\\/]*)
23095  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23096  ;;
23097  *)
23098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23099for as_dir in $PATH
23100do
23101  IFS=$as_save_IFS
23102  test -z "$as_dir" && as_dir=.
23103    for ac_exec_ext in '' $ac_executable_extensions; do
23104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23105    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23107    break 2
23108  fi
23109done
23110  done
23111IFS=$as_save_IFS
23112
23113  ;;
23114esac
23115fi
23116TIME=$ac_cv_path_TIME
23117if test -n "$TIME"; then
23118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23119$as_echo "$TIME" >&6; }
23120else
23121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23122$as_echo "no" >&6; }
23123fi
23124
23125
23126  test -n "$TIME" && break
23127done
23128
23129  else
23130    # The variable is set, but is it from the command line or the environment?
23131
23132    # Try to remove the string !TIME! from our list.
23133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23135      # If it failed, the variable was not from the command line. Ignore it,
23136      # but warn the user (except for BASH, which is always set by the calling BASH).
23137      if test "xTIME" != xBASH; then
23138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23139$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23140      fi
23141      # Try to locate tool using the code snippet
23142      for ac_prog in time
23143do
23144  # Extract the first word of "$ac_prog", so it can be a program name with args.
23145set dummy $ac_prog; ac_word=$2
23146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23147$as_echo_n "checking for $ac_word... " >&6; }
23148if ${ac_cv_path_TIME+:} false; then :
23149  $as_echo_n "(cached) " >&6
23150else
23151  case $TIME in
23152  [\\/]* | ?:[\\/]*)
23153  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23154  ;;
23155  *)
23156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23157for as_dir in $PATH
23158do
23159  IFS=$as_save_IFS
23160  test -z "$as_dir" && as_dir=.
23161    for ac_exec_ext in '' $ac_executable_extensions; do
23162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23163    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23165    break 2
23166  fi
23167done
23168  done
23169IFS=$as_save_IFS
23170
23171  ;;
23172esac
23173fi
23174TIME=$ac_cv_path_TIME
23175if test -n "$TIME"; then
23176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23177$as_echo "$TIME" >&6; }
23178else
23179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23180$as_echo "no" >&6; }
23181fi
23182
23183
23184  test -n "$TIME" && break
23185done
23186
23187    else
23188      # If it succeeded, then it was overridden by the user. We will use it
23189      # for the tool.
23190
23191      # First remove it from the list of overridden variables, so we can test
23192      # for unknown variables in the end.
23193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23194
23195      # Check if we try to supply an empty value
23196      if test "x$TIME" = x; then
23197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23198$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23200$as_echo_n "checking for TIME... " >&6; }
23201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23202$as_echo "disabled" >&6; }
23203      else
23204        # Check if the provided tool contains a complete path.
23205        tool_specified="$TIME"
23206        tool_basename="${tool_specified##*/}"
23207        if test "x$tool_basename" = "x$tool_specified"; then
23208          # A command without a complete path is provided, search $PATH.
23209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23210$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23211          # Extract the first word of "$tool_basename", so it can be a program name with args.
23212set dummy $tool_basename; ac_word=$2
23213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23214$as_echo_n "checking for $ac_word... " >&6; }
23215if ${ac_cv_path_TIME+:} false; then :
23216  $as_echo_n "(cached) " >&6
23217else
23218  case $TIME in
23219  [\\/]* | ?:[\\/]*)
23220  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23221  ;;
23222  *)
23223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23224for as_dir in $PATH
23225do
23226  IFS=$as_save_IFS
23227  test -z "$as_dir" && as_dir=.
23228    for ac_exec_ext in '' $ac_executable_extensions; do
23229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23230    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23232    break 2
23233  fi
23234done
23235  done
23236IFS=$as_save_IFS
23237
23238  ;;
23239esac
23240fi
23241TIME=$ac_cv_path_TIME
23242if test -n "$TIME"; then
23243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23244$as_echo "$TIME" >&6; }
23245else
23246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23247$as_echo "no" >&6; }
23248fi
23249
23250
23251          if test "x$TIME" = x; then
23252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23253          fi
23254        else
23255          # Otherwise we believe it is a complete path. Use it as it is.
23256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23257$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23259$as_echo_n "checking for TIME... " >&6; }
23260          if test ! -x "$tool_specified"; then
23261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23262$as_echo "not found" >&6; }
23263            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23264          fi
23265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23266$as_echo "$tool_specified" >&6; }
23267        fi
23268      fi
23269    fi
23270
23271  fi
23272
23273
23274  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23275  # be in the user path.
23276
23277
23278  # Publish this variable in the help.
23279
23280
23281  if [ -z "${DTRACE+x}" ]; then
23282    # The variable is not set by user, try to locate tool using the code snippet
23283    for ac_prog in dtrace
23284do
23285  # Extract the first word of "$ac_prog", so it can be a program name with args.
23286set dummy $ac_prog; ac_word=$2
23287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23288$as_echo_n "checking for $ac_word... " >&6; }
23289if ${ac_cv_path_DTRACE+:} false; then :
23290  $as_echo_n "(cached) " >&6
23291else
23292  case $DTRACE in
23293  [\\/]* | ?:[\\/]*)
23294  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23295  ;;
23296  *)
23297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23298as_dummy="$PATH:/usr/sbin"
23299for as_dir in $as_dummy
23300do
23301  IFS=$as_save_IFS
23302  test -z "$as_dir" && as_dir=.
23303    for ac_exec_ext in '' $ac_executable_extensions; do
23304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23305    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23307    break 2
23308  fi
23309done
23310  done
23311IFS=$as_save_IFS
23312
23313  ;;
23314esac
23315fi
23316DTRACE=$ac_cv_path_DTRACE
23317if test -n "$DTRACE"; then
23318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23319$as_echo "$DTRACE" >&6; }
23320else
23321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23322$as_echo "no" >&6; }
23323fi
23324
23325
23326  test -n "$DTRACE" && break
23327done
23328
23329  else
23330    # The variable is set, but is it from the command line or the environment?
23331
23332    # Try to remove the string !DTRACE! from our list.
23333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23335      # If it failed, the variable was not from the command line. Ignore it,
23336      # but warn the user (except for BASH, which is always set by the calling BASH).
23337      if test "xDTRACE" != xBASH; then
23338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23339$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23340      fi
23341      # Try to locate tool using the code snippet
23342      for ac_prog in dtrace
23343do
23344  # Extract the first word of "$ac_prog", so it can be a program name with args.
23345set dummy $ac_prog; ac_word=$2
23346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23347$as_echo_n "checking for $ac_word... " >&6; }
23348if ${ac_cv_path_DTRACE+:} false; then :
23349  $as_echo_n "(cached) " >&6
23350else
23351  case $DTRACE in
23352  [\\/]* | ?:[\\/]*)
23353  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23354  ;;
23355  *)
23356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23357as_dummy="$PATH:/usr/sbin"
23358for as_dir in $as_dummy
23359do
23360  IFS=$as_save_IFS
23361  test -z "$as_dir" && as_dir=.
23362    for ac_exec_ext in '' $ac_executable_extensions; do
23363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23364    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23366    break 2
23367  fi
23368done
23369  done
23370IFS=$as_save_IFS
23371
23372  ;;
23373esac
23374fi
23375DTRACE=$ac_cv_path_DTRACE
23376if test -n "$DTRACE"; then
23377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23378$as_echo "$DTRACE" >&6; }
23379else
23380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23381$as_echo "no" >&6; }
23382fi
23383
23384
23385  test -n "$DTRACE" && break
23386done
23387
23388    else
23389      # If it succeeded, then it was overridden by the user. We will use it
23390      # for the tool.
23391
23392      # First remove it from the list of overridden variables, so we can test
23393      # for unknown variables in the end.
23394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23395
23396      # Check if we try to supply an empty value
23397      if test "x$DTRACE" = x; then
23398        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23399$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23401$as_echo_n "checking for DTRACE... " >&6; }
23402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23403$as_echo "disabled" >&6; }
23404      else
23405        # Check if the provided tool contains a complete path.
23406        tool_specified="$DTRACE"
23407        tool_basename="${tool_specified##*/}"
23408        if test "x$tool_basename" = "x$tool_specified"; then
23409          # A command without a complete path is provided, search $PATH.
23410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23411$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23412          # Extract the first word of "$tool_basename", so it can be a program name with args.
23413set dummy $tool_basename; ac_word=$2
23414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23415$as_echo_n "checking for $ac_word... " >&6; }
23416if ${ac_cv_path_DTRACE+:} false; then :
23417  $as_echo_n "(cached) " >&6
23418else
23419  case $DTRACE in
23420  [\\/]* | ?:[\\/]*)
23421  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23422  ;;
23423  *)
23424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23425for as_dir in $PATH
23426do
23427  IFS=$as_save_IFS
23428  test -z "$as_dir" && as_dir=.
23429    for ac_exec_ext in '' $ac_executable_extensions; do
23430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23431    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23433    break 2
23434  fi
23435done
23436  done
23437IFS=$as_save_IFS
23438
23439  ;;
23440esac
23441fi
23442DTRACE=$ac_cv_path_DTRACE
23443if test -n "$DTRACE"; then
23444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23445$as_echo "$DTRACE" >&6; }
23446else
23447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23448$as_echo "no" >&6; }
23449fi
23450
23451
23452          if test "x$DTRACE" = x; then
23453            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23454          fi
23455        else
23456          # Otherwise we believe it is a complete path. Use it as it is.
23457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23458$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23459          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23460$as_echo_n "checking for DTRACE... " >&6; }
23461          if test ! -x "$tool_specified"; then
23462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23463$as_echo "not found" >&6; }
23464            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23465          fi
23466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23467$as_echo "$tool_specified" >&6; }
23468        fi
23469      fi
23470    fi
23471
23472  fi
23473
23474
23475
23476
23477  # Publish this variable in the help.
23478
23479
23480  if [ -z "${PATCH+x}" ]; then
23481    # The variable is not set by user, try to locate tool using the code snippet
23482    for ac_prog in gpatch patch
23483do
23484  # Extract the first word of "$ac_prog", so it can be a program name with args.
23485set dummy $ac_prog; ac_word=$2
23486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23487$as_echo_n "checking for $ac_word... " >&6; }
23488if ${ac_cv_path_PATCH+:} false; then :
23489  $as_echo_n "(cached) " >&6
23490else
23491  case $PATCH in
23492  [\\/]* | ?:[\\/]*)
23493  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23494  ;;
23495  *)
23496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23497for as_dir in $PATH
23498do
23499  IFS=$as_save_IFS
23500  test -z "$as_dir" && as_dir=.
23501    for ac_exec_ext in '' $ac_executable_extensions; do
23502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23503    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23505    break 2
23506  fi
23507done
23508  done
23509IFS=$as_save_IFS
23510
23511  ;;
23512esac
23513fi
23514PATCH=$ac_cv_path_PATCH
23515if test -n "$PATCH"; then
23516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23517$as_echo "$PATCH" >&6; }
23518else
23519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23520$as_echo "no" >&6; }
23521fi
23522
23523
23524  test -n "$PATCH" && break
23525done
23526
23527  else
23528    # The variable is set, but is it from the command line or the environment?
23529
23530    # Try to remove the string !PATCH! from our list.
23531    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23532    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23533      # If it failed, the variable was not from the command line. Ignore it,
23534      # but warn the user (except for BASH, which is always set by the calling BASH).
23535      if test "xPATCH" != xBASH; then
23536        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23537$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23538      fi
23539      # Try to locate tool using the code snippet
23540      for ac_prog in gpatch patch
23541do
23542  # Extract the first word of "$ac_prog", so it can be a program name with args.
23543set dummy $ac_prog; ac_word=$2
23544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23545$as_echo_n "checking for $ac_word... " >&6; }
23546if ${ac_cv_path_PATCH+:} false; then :
23547  $as_echo_n "(cached) " >&6
23548else
23549  case $PATCH in
23550  [\\/]* | ?:[\\/]*)
23551  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23552  ;;
23553  *)
23554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23555for as_dir in $PATH
23556do
23557  IFS=$as_save_IFS
23558  test -z "$as_dir" && as_dir=.
23559    for ac_exec_ext in '' $ac_executable_extensions; do
23560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23561    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23563    break 2
23564  fi
23565done
23566  done
23567IFS=$as_save_IFS
23568
23569  ;;
23570esac
23571fi
23572PATCH=$ac_cv_path_PATCH
23573if test -n "$PATCH"; then
23574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23575$as_echo "$PATCH" >&6; }
23576else
23577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23578$as_echo "no" >&6; }
23579fi
23580
23581
23582  test -n "$PATCH" && break
23583done
23584
23585    else
23586      # If it succeeded, then it was overridden by the user. We will use it
23587      # for the tool.
23588
23589      # First remove it from the list of overridden variables, so we can test
23590      # for unknown variables in the end.
23591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23592
23593      # Check if we try to supply an empty value
23594      if test "x$PATCH" = x; then
23595        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23596$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23598$as_echo_n "checking for PATCH... " >&6; }
23599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23600$as_echo "disabled" >&6; }
23601      else
23602        # Check if the provided tool contains a complete path.
23603        tool_specified="$PATCH"
23604        tool_basename="${tool_specified##*/}"
23605        if test "x$tool_basename" = "x$tool_specified"; then
23606          # A command without a complete path is provided, search $PATH.
23607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23608$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23609          # Extract the first word of "$tool_basename", so it can be a program name with args.
23610set dummy $tool_basename; ac_word=$2
23611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23612$as_echo_n "checking for $ac_word... " >&6; }
23613if ${ac_cv_path_PATCH+:} false; then :
23614  $as_echo_n "(cached) " >&6
23615else
23616  case $PATCH in
23617  [\\/]* | ?:[\\/]*)
23618  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23619  ;;
23620  *)
23621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23622for as_dir in $PATH
23623do
23624  IFS=$as_save_IFS
23625  test -z "$as_dir" && as_dir=.
23626    for ac_exec_ext in '' $ac_executable_extensions; do
23627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23628    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23630    break 2
23631  fi
23632done
23633  done
23634IFS=$as_save_IFS
23635
23636  ;;
23637esac
23638fi
23639PATCH=$ac_cv_path_PATCH
23640if test -n "$PATCH"; then
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23642$as_echo "$PATCH" >&6; }
23643else
23644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23645$as_echo "no" >&6; }
23646fi
23647
23648
23649          if test "x$PATCH" = x; then
23650            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23651          fi
23652        else
23653          # Otherwise we believe it is a complete path. Use it as it is.
23654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23655$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23656          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23657$as_echo_n "checking for PATCH... " >&6; }
23658          if test ! -x "$tool_specified"; then
23659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23660$as_echo "not found" >&6; }
23661            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23662          fi
23663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23664$as_echo "$tool_specified" >&6; }
23665        fi
23666      fi
23667    fi
23668
23669  fi
23670
23671
23672  # Check if it's GNU time
23673  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23674  if test "x$IS_GNU_TIME" != x; then
23675    IS_GNU_TIME=yes
23676  else
23677    IS_GNU_TIME=no
23678  fi
23679
23680
23681  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23682
23683
23684
23685  # Publish this variable in the help.
23686
23687
23688  if [ -z "${DSYMUTIL+x}" ]; then
23689    # The variable is not set by user, try to locate tool using the code snippet
23690    for ac_prog in dsymutil
23691do
23692  # Extract the first word of "$ac_prog", so it can be a program name with args.
23693set dummy $ac_prog; ac_word=$2
23694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23695$as_echo_n "checking for $ac_word... " >&6; }
23696if ${ac_cv_path_DSYMUTIL+:} false; then :
23697  $as_echo_n "(cached) " >&6
23698else
23699  case $DSYMUTIL in
23700  [\\/]* | ?:[\\/]*)
23701  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23702  ;;
23703  *)
23704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23705for as_dir in $PATH
23706do
23707  IFS=$as_save_IFS
23708  test -z "$as_dir" && as_dir=.
23709    for ac_exec_ext in '' $ac_executable_extensions; do
23710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23711    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23713    break 2
23714  fi
23715done
23716  done
23717IFS=$as_save_IFS
23718
23719  ;;
23720esac
23721fi
23722DSYMUTIL=$ac_cv_path_DSYMUTIL
23723if test -n "$DSYMUTIL"; then
23724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23725$as_echo "$DSYMUTIL" >&6; }
23726else
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23728$as_echo "no" >&6; }
23729fi
23730
23731
23732  test -n "$DSYMUTIL" && break
23733done
23734
23735  else
23736    # The variable is set, but is it from the command line or the environment?
23737
23738    # Try to remove the string !DSYMUTIL! from our list.
23739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23741      # If it failed, the variable was not from the command line. Ignore it,
23742      # but warn the user (except for BASH, which is always set by the calling BASH).
23743      if test "xDSYMUTIL" != xBASH; then
23744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23745$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23746      fi
23747      # Try to locate tool using the code snippet
23748      for ac_prog in dsymutil
23749do
23750  # Extract the first word of "$ac_prog", so it can be a program name with args.
23751set dummy $ac_prog; ac_word=$2
23752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23753$as_echo_n "checking for $ac_word... " >&6; }
23754if ${ac_cv_path_DSYMUTIL+:} false; then :
23755  $as_echo_n "(cached) " >&6
23756else
23757  case $DSYMUTIL in
23758  [\\/]* | ?:[\\/]*)
23759  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23760  ;;
23761  *)
23762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23763for as_dir in $PATH
23764do
23765  IFS=$as_save_IFS
23766  test -z "$as_dir" && as_dir=.
23767    for ac_exec_ext in '' $ac_executable_extensions; do
23768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23769    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23771    break 2
23772  fi
23773done
23774  done
23775IFS=$as_save_IFS
23776
23777  ;;
23778esac
23779fi
23780DSYMUTIL=$ac_cv_path_DSYMUTIL
23781if test -n "$DSYMUTIL"; then
23782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23783$as_echo "$DSYMUTIL" >&6; }
23784else
23785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23786$as_echo "no" >&6; }
23787fi
23788
23789
23790  test -n "$DSYMUTIL" && break
23791done
23792
23793    else
23794      # If it succeeded, then it was overridden by the user. We will use it
23795      # for the tool.
23796
23797      # First remove it from the list of overridden variables, so we can test
23798      # for unknown variables in the end.
23799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23800
23801      # Check if we try to supply an empty value
23802      if test "x$DSYMUTIL" = x; then
23803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23804$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23806$as_echo_n "checking for DSYMUTIL... " >&6; }
23807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23808$as_echo "disabled" >&6; }
23809      else
23810        # Check if the provided tool contains a complete path.
23811        tool_specified="$DSYMUTIL"
23812        tool_basename="${tool_specified##*/}"
23813        if test "x$tool_basename" = "x$tool_specified"; then
23814          # A command without a complete path is provided, search $PATH.
23815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23816$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23817          # Extract the first word of "$tool_basename", so it can be a program name with args.
23818set dummy $tool_basename; ac_word=$2
23819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23820$as_echo_n "checking for $ac_word... " >&6; }
23821if ${ac_cv_path_DSYMUTIL+:} false; then :
23822  $as_echo_n "(cached) " >&6
23823else
23824  case $DSYMUTIL in
23825  [\\/]* | ?:[\\/]*)
23826  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23827  ;;
23828  *)
23829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23830for as_dir in $PATH
23831do
23832  IFS=$as_save_IFS
23833  test -z "$as_dir" && as_dir=.
23834    for ac_exec_ext in '' $ac_executable_extensions; do
23835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23836    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23838    break 2
23839  fi
23840done
23841  done
23842IFS=$as_save_IFS
23843
23844  ;;
23845esac
23846fi
23847DSYMUTIL=$ac_cv_path_DSYMUTIL
23848if test -n "$DSYMUTIL"; then
23849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23850$as_echo "$DSYMUTIL" >&6; }
23851else
23852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23853$as_echo "no" >&6; }
23854fi
23855
23856
23857          if test "x$DSYMUTIL" = x; then
23858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23859          fi
23860        else
23861          # Otherwise we believe it is a complete path. Use it as it is.
23862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23863$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23865$as_echo_n "checking for DSYMUTIL... " >&6; }
23866          if test ! -x "$tool_specified"; then
23867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23868$as_echo "not found" >&6; }
23869            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23870          fi
23871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23872$as_echo "$tool_specified" >&6; }
23873        fi
23874      fi
23875    fi
23876
23877  fi
23878
23879
23880
23881  if test "x$DSYMUTIL" = x; then
23882    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23883  fi
23884
23885
23886
23887
23888
23889  # Publish this variable in the help.
23890
23891
23892  if [ -z "${XATTR+x}" ]; then
23893    # The variable is not set by user, try to locate tool using the code snippet
23894    for ac_prog in xattr
23895do
23896  # Extract the first word of "$ac_prog", so it can be a program name with args.
23897set dummy $ac_prog; ac_word=$2
23898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23899$as_echo_n "checking for $ac_word... " >&6; }
23900if ${ac_cv_path_XATTR+:} false; then :
23901  $as_echo_n "(cached) " >&6
23902else
23903  case $XATTR in
23904  [\\/]* | ?:[\\/]*)
23905  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23906  ;;
23907  *)
23908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23909for as_dir in $PATH
23910do
23911  IFS=$as_save_IFS
23912  test -z "$as_dir" && as_dir=.
23913    for ac_exec_ext in '' $ac_executable_extensions; do
23914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23915    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23917    break 2
23918  fi
23919done
23920  done
23921IFS=$as_save_IFS
23922
23923  ;;
23924esac
23925fi
23926XATTR=$ac_cv_path_XATTR
23927if test -n "$XATTR"; then
23928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23929$as_echo "$XATTR" >&6; }
23930else
23931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23932$as_echo "no" >&6; }
23933fi
23934
23935
23936  test -n "$XATTR" && break
23937done
23938
23939  else
23940    # The variable is set, but is it from the command line or the environment?
23941
23942    # Try to remove the string !XATTR! from our list.
23943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23945      # If it failed, the variable was not from the command line. Ignore it,
23946      # but warn the user (except for BASH, which is always set by the calling BASH).
23947      if test "xXATTR" != xBASH; then
23948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23949$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23950      fi
23951      # Try to locate tool using the code snippet
23952      for ac_prog in xattr
23953do
23954  # Extract the first word of "$ac_prog", so it can be a program name with args.
23955set dummy $ac_prog; ac_word=$2
23956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23957$as_echo_n "checking for $ac_word... " >&6; }
23958if ${ac_cv_path_XATTR+:} false; then :
23959  $as_echo_n "(cached) " >&6
23960else
23961  case $XATTR in
23962  [\\/]* | ?:[\\/]*)
23963  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23964  ;;
23965  *)
23966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23967for as_dir in $PATH
23968do
23969  IFS=$as_save_IFS
23970  test -z "$as_dir" && as_dir=.
23971    for ac_exec_ext in '' $ac_executable_extensions; do
23972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23973    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23975    break 2
23976  fi
23977done
23978  done
23979IFS=$as_save_IFS
23980
23981  ;;
23982esac
23983fi
23984XATTR=$ac_cv_path_XATTR
23985if test -n "$XATTR"; then
23986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23987$as_echo "$XATTR" >&6; }
23988else
23989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23990$as_echo "no" >&6; }
23991fi
23992
23993
23994  test -n "$XATTR" && break
23995done
23996
23997    else
23998      # If it succeeded, then it was overridden by the user. We will use it
23999      # for the tool.
24000
24001      # First remove it from the list of overridden variables, so we can test
24002      # for unknown variables in the end.
24003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24004
24005      # Check if we try to supply an empty value
24006      if test "x$XATTR" = x; then
24007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24008$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24010$as_echo_n "checking for XATTR... " >&6; }
24011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24012$as_echo "disabled" >&6; }
24013      else
24014        # Check if the provided tool contains a complete path.
24015        tool_specified="$XATTR"
24016        tool_basename="${tool_specified##*/}"
24017        if test "x$tool_basename" = "x$tool_specified"; then
24018          # A command without a complete path is provided, search $PATH.
24019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24020$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24021          # Extract the first word of "$tool_basename", so it can be a program name with args.
24022set dummy $tool_basename; ac_word=$2
24023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24024$as_echo_n "checking for $ac_word... " >&6; }
24025if ${ac_cv_path_XATTR+:} false; then :
24026  $as_echo_n "(cached) " >&6
24027else
24028  case $XATTR in
24029  [\\/]* | ?:[\\/]*)
24030  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24031  ;;
24032  *)
24033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24034for as_dir in $PATH
24035do
24036  IFS=$as_save_IFS
24037  test -z "$as_dir" && as_dir=.
24038    for ac_exec_ext in '' $ac_executable_extensions; do
24039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24040    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24042    break 2
24043  fi
24044done
24045  done
24046IFS=$as_save_IFS
24047
24048  ;;
24049esac
24050fi
24051XATTR=$ac_cv_path_XATTR
24052if test -n "$XATTR"; then
24053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24054$as_echo "$XATTR" >&6; }
24055else
24056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24057$as_echo "no" >&6; }
24058fi
24059
24060
24061          if test "x$XATTR" = x; then
24062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24063          fi
24064        else
24065          # Otherwise we believe it is a complete path. Use it as it is.
24066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24067$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24069$as_echo_n "checking for XATTR... " >&6; }
24070          if test ! -x "$tool_specified"; then
24071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24072$as_echo "not found" >&6; }
24073            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24074          fi
24075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24076$as_echo "$tool_specified" >&6; }
24077        fi
24078      fi
24079    fi
24080
24081  fi
24082
24083
24084
24085  if test "x$XATTR" = x; then
24086    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24087  fi
24088
24089
24090
24091
24092  # Publish this variable in the help.
24093
24094
24095  if [ -z "${CODESIGN+x}" ]; then
24096    # The variable is not set by user, try to locate tool using the code snippet
24097    for ac_prog in codesign
24098do
24099  # Extract the first word of "$ac_prog", so it can be a program name with args.
24100set dummy $ac_prog; ac_word=$2
24101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24102$as_echo_n "checking for $ac_word... " >&6; }
24103if ${ac_cv_path_CODESIGN+:} false; then :
24104  $as_echo_n "(cached) " >&6
24105else
24106  case $CODESIGN in
24107  [\\/]* | ?:[\\/]*)
24108  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24109  ;;
24110  *)
24111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24112for as_dir in $PATH
24113do
24114  IFS=$as_save_IFS
24115  test -z "$as_dir" && as_dir=.
24116    for ac_exec_ext in '' $ac_executable_extensions; do
24117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24118    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24120    break 2
24121  fi
24122done
24123  done
24124IFS=$as_save_IFS
24125
24126  ;;
24127esac
24128fi
24129CODESIGN=$ac_cv_path_CODESIGN
24130if test -n "$CODESIGN"; then
24131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24132$as_echo "$CODESIGN" >&6; }
24133else
24134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24135$as_echo "no" >&6; }
24136fi
24137
24138
24139  test -n "$CODESIGN" && break
24140done
24141
24142  else
24143    # The variable is set, but is it from the command line or the environment?
24144
24145    # Try to remove the string !CODESIGN! from our list.
24146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24148      # If it failed, the variable was not from the command line. Ignore it,
24149      # but warn the user (except for BASH, which is always set by the calling BASH).
24150      if test "xCODESIGN" != xBASH; then
24151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24152$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24153      fi
24154      # Try to locate tool using the code snippet
24155      for ac_prog in codesign
24156do
24157  # Extract the first word of "$ac_prog", so it can be a program name with args.
24158set dummy $ac_prog; ac_word=$2
24159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24160$as_echo_n "checking for $ac_word... " >&6; }
24161if ${ac_cv_path_CODESIGN+:} false; then :
24162  $as_echo_n "(cached) " >&6
24163else
24164  case $CODESIGN in
24165  [\\/]* | ?:[\\/]*)
24166  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24167  ;;
24168  *)
24169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24170for as_dir in $PATH
24171do
24172  IFS=$as_save_IFS
24173  test -z "$as_dir" && as_dir=.
24174    for ac_exec_ext in '' $ac_executable_extensions; do
24175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24176    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24178    break 2
24179  fi
24180done
24181  done
24182IFS=$as_save_IFS
24183
24184  ;;
24185esac
24186fi
24187CODESIGN=$ac_cv_path_CODESIGN
24188if test -n "$CODESIGN"; then
24189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24190$as_echo "$CODESIGN" >&6; }
24191else
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24193$as_echo "no" >&6; }
24194fi
24195
24196
24197  test -n "$CODESIGN" && break
24198done
24199
24200    else
24201      # If it succeeded, then it was overridden by the user. We will use it
24202      # for the tool.
24203
24204      # First remove it from the list of overridden variables, so we can test
24205      # for unknown variables in the end.
24206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24207
24208      # Check if we try to supply an empty value
24209      if test "x$CODESIGN" = x; then
24210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24211$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24213$as_echo_n "checking for CODESIGN... " >&6; }
24214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24215$as_echo "disabled" >&6; }
24216      else
24217        # Check if the provided tool contains a complete path.
24218        tool_specified="$CODESIGN"
24219        tool_basename="${tool_specified##*/}"
24220        if test "x$tool_basename" = "x$tool_specified"; then
24221          # A command without a complete path is provided, search $PATH.
24222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24223$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24224          # Extract the first word of "$tool_basename", so it can be a program name with args.
24225set dummy $tool_basename; ac_word=$2
24226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24227$as_echo_n "checking for $ac_word... " >&6; }
24228if ${ac_cv_path_CODESIGN+:} false; then :
24229  $as_echo_n "(cached) " >&6
24230else
24231  case $CODESIGN in
24232  [\\/]* | ?:[\\/]*)
24233  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24234  ;;
24235  *)
24236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24237for as_dir in $PATH
24238do
24239  IFS=$as_save_IFS
24240  test -z "$as_dir" && as_dir=.
24241    for ac_exec_ext in '' $ac_executable_extensions; do
24242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24243    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24245    break 2
24246  fi
24247done
24248  done
24249IFS=$as_save_IFS
24250
24251  ;;
24252esac
24253fi
24254CODESIGN=$ac_cv_path_CODESIGN
24255if test -n "$CODESIGN"; then
24256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24257$as_echo "$CODESIGN" >&6; }
24258else
24259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24260$as_echo "no" >&6; }
24261fi
24262
24263
24264          if test "x$CODESIGN" = x; then
24265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24266          fi
24267        else
24268          # Otherwise we believe it is a complete path. Use it as it is.
24269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24270$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24272$as_echo_n "checking for CODESIGN... " >&6; }
24273          if test ! -x "$tool_specified"; then
24274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24275$as_echo "not found" >&6; }
24276            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24277          fi
24278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24279$as_echo "$tool_specified" >&6; }
24280        fi
24281      fi
24282    fi
24283
24284  fi
24285
24286
24287    if test "x$CODESIGN" != "x"; then
24288      # Verify that the openjdk_codesign certificate is present
24289      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24290$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24291      $RM codesign-testfile
24292      $TOUCH codesign-testfile
24293      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24294      $RM codesign-testfile
24295      if test "x$CODESIGN" = x; then
24296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24297$as_echo "no" >&6; }
24298      else
24299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24300$as_echo "yes" >&6; }
24301      fi
24302    fi
24303
24304
24305
24306  # Publish this variable in the help.
24307
24308
24309  if [ -z "${SETFILE+x}" ]; then
24310    # The variable is not set by user, try to locate tool using the code snippet
24311    for ac_prog in SetFile
24312do
24313  # Extract the first word of "$ac_prog", so it can be a program name with args.
24314set dummy $ac_prog; ac_word=$2
24315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24316$as_echo_n "checking for $ac_word... " >&6; }
24317if ${ac_cv_path_SETFILE+:} false; then :
24318  $as_echo_n "(cached) " >&6
24319else
24320  case $SETFILE in
24321  [\\/]* | ?:[\\/]*)
24322  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24323  ;;
24324  *)
24325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24326for as_dir in $PATH
24327do
24328  IFS=$as_save_IFS
24329  test -z "$as_dir" && as_dir=.
24330    for ac_exec_ext in '' $ac_executable_extensions; do
24331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24332    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24334    break 2
24335  fi
24336done
24337  done
24338IFS=$as_save_IFS
24339
24340  ;;
24341esac
24342fi
24343SETFILE=$ac_cv_path_SETFILE
24344if test -n "$SETFILE"; then
24345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24346$as_echo "$SETFILE" >&6; }
24347else
24348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24349$as_echo "no" >&6; }
24350fi
24351
24352
24353  test -n "$SETFILE" && break
24354done
24355
24356  else
24357    # The variable is set, but is it from the command line or the environment?
24358
24359    # Try to remove the string !SETFILE! from our list.
24360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24362      # If it failed, the variable was not from the command line. Ignore it,
24363      # but warn the user (except for BASH, which is always set by the calling BASH).
24364      if test "xSETFILE" != xBASH; then
24365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24366$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24367      fi
24368      # Try to locate tool using the code snippet
24369      for ac_prog in SetFile
24370do
24371  # Extract the first word of "$ac_prog", so it can be a program name with args.
24372set dummy $ac_prog; ac_word=$2
24373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24374$as_echo_n "checking for $ac_word... " >&6; }
24375if ${ac_cv_path_SETFILE+:} false; then :
24376  $as_echo_n "(cached) " >&6
24377else
24378  case $SETFILE in
24379  [\\/]* | ?:[\\/]*)
24380  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24381  ;;
24382  *)
24383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24384for as_dir in $PATH
24385do
24386  IFS=$as_save_IFS
24387  test -z "$as_dir" && as_dir=.
24388    for ac_exec_ext in '' $ac_executable_extensions; do
24389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24390    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24392    break 2
24393  fi
24394done
24395  done
24396IFS=$as_save_IFS
24397
24398  ;;
24399esac
24400fi
24401SETFILE=$ac_cv_path_SETFILE
24402if test -n "$SETFILE"; then
24403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24404$as_echo "$SETFILE" >&6; }
24405else
24406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24407$as_echo "no" >&6; }
24408fi
24409
24410
24411  test -n "$SETFILE" && break
24412done
24413
24414    else
24415      # If it succeeded, then it was overridden by the user. We will use it
24416      # for the tool.
24417
24418      # First remove it from the list of overridden variables, so we can test
24419      # for unknown variables in the end.
24420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24421
24422      # Check if we try to supply an empty value
24423      if test "x$SETFILE" = x; then
24424        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24425$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24426        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24427$as_echo_n "checking for SETFILE... " >&6; }
24428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24429$as_echo "disabled" >&6; }
24430      else
24431        # Check if the provided tool contains a complete path.
24432        tool_specified="$SETFILE"
24433        tool_basename="${tool_specified##*/}"
24434        if test "x$tool_basename" = "x$tool_specified"; then
24435          # A command without a complete path is provided, search $PATH.
24436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24437$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24438          # Extract the first word of "$tool_basename", so it can be a program name with args.
24439set dummy $tool_basename; ac_word=$2
24440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24441$as_echo_n "checking for $ac_word... " >&6; }
24442if ${ac_cv_path_SETFILE+:} false; then :
24443  $as_echo_n "(cached) " >&6
24444else
24445  case $SETFILE in
24446  [\\/]* | ?:[\\/]*)
24447  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24448  ;;
24449  *)
24450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24451for as_dir in $PATH
24452do
24453  IFS=$as_save_IFS
24454  test -z "$as_dir" && as_dir=.
24455    for ac_exec_ext in '' $ac_executable_extensions; do
24456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24457    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24459    break 2
24460  fi
24461done
24462  done
24463IFS=$as_save_IFS
24464
24465  ;;
24466esac
24467fi
24468SETFILE=$ac_cv_path_SETFILE
24469if test -n "$SETFILE"; then
24470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24471$as_echo "$SETFILE" >&6; }
24472else
24473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24474$as_echo "no" >&6; }
24475fi
24476
24477
24478          if test "x$SETFILE" = x; then
24479            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24480          fi
24481        else
24482          # Otherwise we believe it is a complete path. Use it as it is.
24483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24484$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24485          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24486$as_echo_n "checking for SETFILE... " >&6; }
24487          if test ! -x "$tool_specified"; then
24488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24489$as_echo "not found" >&6; }
24490            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24491          fi
24492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24493$as_echo "$tool_specified" >&6; }
24494        fi
24495      fi
24496    fi
24497
24498  fi
24499
24500
24501
24502  if test "x$SETFILE" = x; then
24503    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24504  fi
24505
24506
24507  fi
24508
24509
24510  # Check bash version
24511  # Extra [ ] to stop m4 mangling
24512   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24514$as_echo_n "checking bash version... " >&6; }
24515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24516$as_echo "$BASH_VER" >&6; }
24517
24518  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24519  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24520  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24521    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24522  fi
24523
24524  # Test if bash supports pipefail.
24525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24526$as_echo_n "checking if bash supports pipefail... " >&6; }
24527  if ${BASH} -c 'set -o pipefail'; then
24528    BASH_ARGS="$BASH_ARGS -o pipefail"
24529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24530$as_echo "yes" >&6; }
24531  else
24532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24533$as_echo "no" >&6; }
24534  fi
24535
24536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24537$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24538  if ${BASH} -e -c 'true'; then
24539    BASH_ARGS="$BASH_ARGS -e"
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24541$as_echo "yes" >&6; }
24542  else
24543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24544$as_echo "no" >&6; }
24545  fi
24546
24547
24548
24549
24550# Check if pkg-config is available.
24551
24552
24553if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24554	if test -n "$ac_tool_prefix"; then
24555  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24556set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24558$as_echo_n "checking for $ac_word... " >&6; }
24559if ${ac_cv_path_PKG_CONFIG+:} false; then :
24560  $as_echo_n "(cached) " >&6
24561else
24562  case $PKG_CONFIG in
24563  [\\/]* | ?:[\\/]*)
24564  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24565  ;;
24566  *)
24567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24568for as_dir in $PATH
24569do
24570  IFS=$as_save_IFS
24571  test -z "$as_dir" && as_dir=.
24572    for ac_exec_ext in '' $ac_executable_extensions; do
24573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24574    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24576    break 2
24577  fi
24578done
24579  done
24580IFS=$as_save_IFS
24581
24582  ;;
24583esac
24584fi
24585PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24586if test -n "$PKG_CONFIG"; then
24587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24588$as_echo "$PKG_CONFIG" >&6; }
24589else
24590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24591$as_echo "no" >&6; }
24592fi
24593
24594
24595fi
24596if test -z "$ac_cv_path_PKG_CONFIG"; then
24597  ac_pt_PKG_CONFIG=$PKG_CONFIG
24598  # Extract the first word of "pkg-config", so it can be a program name with args.
24599set dummy pkg-config; ac_word=$2
24600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24601$as_echo_n "checking for $ac_word... " >&6; }
24602if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24603  $as_echo_n "(cached) " >&6
24604else
24605  case $ac_pt_PKG_CONFIG in
24606  [\\/]* | ?:[\\/]*)
24607  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24608  ;;
24609  *)
24610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24611for as_dir in $PATH
24612do
24613  IFS=$as_save_IFS
24614  test -z "$as_dir" && as_dir=.
24615    for ac_exec_ext in '' $ac_executable_extensions; do
24616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24617    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24619    break 2
24620  fi
24621done
24622  done
24623IFS=$as_save_IFS
24624
24625  ;;
24626esac
24627fi
24628ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24629if test -n "$ac_pt_PKG_CONFIG"; then
24630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24631$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24632else
24633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24634$as_echo "no" >&6; }
24635fi
24636
24637  if test "x$ac_pt_PKG_CONFIG" = x; then
24638    PKG_CONFIG=""
24639  else
24640    case $cross_compiling:$ac_tool_warned in
24641yes:)
24642{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24643$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24644ac_tool_warned=yes ;;
24645esac
24646    PKG_CONFIG=$ac_pt_PKG_CONFIG
24647  fi
24648else
24649  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24650fi
24651
24652fi
24653if test -n "$PKG_CONFIG"; then
24654	_pkg_min_version=0.9.0
24655	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24656$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24657	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24658		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24659$as_echo "yes" >&6; }
24660	else
24661		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24662$as_echo "no" >&6; }
24663		PKG_CONFIG=""
24664	fi
24665
24666fi
24667
24668# After basic tools have been setup, we can check build os specific details.
24669
24670  ###############################################################################
24671
24672  # Note that this is the build platform OS version!
24673
24674  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24675  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24676  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24677  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24678
24679
24680
24681
24682
24683# Misc basic settings
24684
24685
24686# Check whether --with-default-make-target was given.
24687if test "${with_default_make_target+set}" = set; then :
24688  withval=$with_default_make_target;
24689fi
24690
24691  if test "x$with_default_make_target" = "x" \
24692      || test "x$with_default_make_target" = "xyes"; then
24693    DEFAULT_MAKE_TARGET="exploded-image"
24694  elif test "x$with_default_make_target" = "xno"; then
24695    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24696  else
24697    DEFAULT_MAKE_TARGET="$with_default_make_target"
24698  fi
24699
24700
24701
24702
24703###############################################################################
24704#
24705# Determine OpenJDK variants, options and version numbers.
24706#
24707###############################################################################
24708
24709# We need build & target for this.
24710
24711  # Should we build a JDK without a graphical UI?
24712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24713$as_echo_n "checking headless only... " >&6; }
24714  # Check whether --enable-headless-only was given.
24715if test "${enable_headless_only+set}" = set; then :
24716  enableval=$enable_headless_only;
24717fi
24718
24719
24720  if test "x$enable_headless_only" = "xyes"; then
24721    ENABLE_HEADLESS_ONLY="true"
24722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24723$as_echo "yes" >&6; }
24724  elif test "x$enable_headless_only" = "xno"; then
24725    ENABLE_HEADLESS_ONLY="false"
24726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24727$as_echo "no" >&6; }
24728  elif test "x$enable_headless_only" = "x"; then
24729    ENABLE_HEADLESS_ONLY="false"
24730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24731$as_echo "no" >&6; }
24732  else
24733    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24734  fi
24735
24736
24737
24738  # Should we build the complete docs, or just a lightweight version?
24739  # Check whether --enable-full-docs was given.
24740if test "${enable_full_docs+set}" = set; then :
24741  enableval=$enable_full_docs;
24742fi
24743
24744
24745  # Verify dependencies
24746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24747$as_echo_n "checking for graphviz dot... " >&6; }
24748  if test "x$DOT" != "x"; then
24749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24750$as_echo "yes" >&6; }
24751  else
24752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24753$as_echo "no, cannot generate full docs" >&6; }
24754    FULL_DOCS_DEP_MISSING=true
24755  fi
24756
24757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24758$as_echo_n "checking for pandoc... " >&6; }
24759  if test "x$PANDOC" != "x"; then
24760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24761$as_echo "yes" >&6; }
24762  else
24763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24764$as_echo "no, cannot generate full docs" >&6; }
24765    FULL_DOCS_DEP_MISSING=true
24766  fi
24767
24768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24769$as_echo_n "checking full docs... " >&6; }
24770  if test "x$enable_full_docs" = xyes; then
24771    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24773$as_echo "no, missing dependencies" >&6; }
24774
24775  # Print a helpful message on how to acquire the necessary build dependency.
24776  # dot is the help tag: freetype, cups, alsa etc
24777  MISSING_DEPENDENCY=dot
24778
24779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24780    cygwin_help $MISSING_DEPENDENCY
24781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24782    msys_help $MISSING_DEPENDENCY
24783  else
24784    PKGHANDLER_COMMAND=
24785
24786    case $PKGHANDLER in
24787      apt-get)
24788        apt_help     $MISSING_DEPENDENCY ;;
24789      yum)
24790        yum_help     $MISSING_DEPENDENCY ;;
24791      brew)
24792        brew_help    $MISSING_DEPENDENCY ;;
24793      port)
24794        port_help    $MISSING_DEPENDENCY ;;
24795      pkgutil)
24796        pkgutil_help $MISSING_DEPENDENCY ;;
24797      pkgadd)
24798        pkgadd_help  $MISSING_DEPENDENCY ;;
24799    esac
24800
24801    if test "x$PKGHANDLER_COMMAND" != x; then
24802      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24803    fi
24804  fi
24805
24806      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24807    else
24808      ENABLE_FULL_DOCS=true
24809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24810$as_echo "yes, forced" >&6; }
24811    fi
24812  elif test "x$enable_full_docs" = xno; then
24813    ENABLE_FULL_DOCS=false
24814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24815$as_echo "no, forced" >&6; }
24816  elif test "x$enable_full_docs" = x; then
24817    # Check for prerequisites
24818    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24819      ENABLE_FULL_DOCS=false
24820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24821$as_echo "no, missing dependencies" >&6; }
24822    else
24823      ENABLE_FULL_DOCS=true
24824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24825$as_echo "yes, dependencies present" >&6; }
24826    fi
24827  else
24828    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24829  fi
24830
24831
24832
24833  # Choose cacerts source file
24834
24835# Check whether --with-cacerts-file was given.
24836if test "${with_cacerts_file+set}" = set; then :
24837  withval=$with_cacerts_file;
24838fi
24839
24840  if test "x$with_cacerts_file" != x; then
24841    CACERTS_FILE=$with_cacerts_file
24842  fi
24843
24844
24845  # Enable or disable unlimited crypto
24846  # Check whether --enable-unlimited-crypto was given.
24847if test "${enable_unlimited_crypto+set}" = set; then :
24848  enableval=$enable_unlimited_crypto;
24849else
24850  enable_unlimited_crypto=yes
24851fi
24852
24853  if test "x$enable_unlimited_crypto" = "xyes"; then
24854    UNLIMITED_CRYPTO=true
24855  else
24856    UNLIMITED_CRYPTO=false
24857  fi
24858
24859
24860  # Should we build the serviceability agent (SA)?
24861  INCLUDE_SA=true
24862  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24863    INCLUDE_SA=false
24864  fi
24865  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24866    INCLUDE_SA=false
24867  fi
24868
24869
24870  # Compress jars
24871  COMPRESS_JARS=false
24872
24873
24874
24875  # Setup default copyright year. Mostly overridden when building close to a new year.
24876
24877# Check whether --with-copyright-year was given.
24878if test "${with_copyright_year+set}" = set; then :
24879  withval=$with_copyright_year;
24880fi
24881
24882  if test "x$with_copyright_year" = xyes; then
24883    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24884  elif test "x$with_copyright_year" != x; then
24885    COPYRIGHT_YEAR="$with_copyright_year"
24886  else
24887    COPYRIGHT_YEAR=`$DATE +'%Y'`
24888  fi
24889
24890
24891
24892  # Check whether --enable-keep-packaged-modules was given.
24893if test "${enable_keep_packaged_modules+set}" = set; then :
24894  enableval=$enable_keep_packaged_modules;
24895fi
24896
24897
24898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24899$as_echo_n "checking if packaged modules are kept... " >&6; }
24900  if test "x$enable_keep_packaged_modules" = "xyes"; then
24901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24902$as_echo "yes" >&6; }
24903    JLINK_KEEP_PACKAGED_MODULES=true
24904  elif test "x$enable_keep_packaged_modules" = "xno"; then
24905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24906$as_echo "no" >&6; }
24907    JLINK_KEEP_PACKAGED_MODULES=false
24908  elif test "x$enable_keep_packaged_modules" = "x"; then
24909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24910$as_echo "yes (default)" >&6; }
24911    JLINK_KEEP_PACKAGED_MODULES=true
24912  else
24913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24914$as_echo "error" >&6; }
24915    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24916  fi
24917
24918
24919
24920
24921  # Warn user that old version arguments are deprecated.
24922
24923
24924# Check whether --with-milestone was given.
24925if test "${with_milestone+set}" = set; then :
24926  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24927$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24928fi
24929
24930
24931
24932
24933# Check whether --with-update-version was given.
24934if test "${with_update_version+set}" = set; then :
24935  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24936$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24937fi
24938
24939
24940
24941
24942# Check whether --with-user-release-suffix was given.
24943if test "${with_user_release_suffix+set}" = set; then :
24944  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
24945$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24946fi
24947
24948
24949
24950
24951# Check whether --with-build-number was given.
24952if test "${with_build_number+set}" = set; then :
24953  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24954$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24955fi
24956
24957
24958
24959  # Source the version numbers file
24960  . $AUTOCONF_DIR/version-numbers
24961
24962  # Some non-version number information is set in that file
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972  # Override version from arguments
24973
24974  # If --with-version-string is set, process it first. It is possible to
24975  # override parts with more specific flags, since these are processed later.
24976
24977# Check whether --with-version-string was given.
24978if test "${with_version_string+set}" = set; then :
24979  withval=$with_version_string;
24980fi
24981
24982  if test "x$with_version_string" = xyes; then
24983    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24984  elif test "x$with_version_string" != x; then
24985    # Additional [] needed to keep m4 from mangling shell constructs.
24986    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24987      VERSION_MAJOR=${BASH_REMATCH[1]}
24988      VERSION_MINOR=${BASH_REMATCH[3]}
24989      VERSION_SECURITY=${BASH_REMATCH[5]}
24990      VERSION_PATCH=${BASH_REMATCH[7]}
24991      VERSION_PRE=${BASH_REMATCH[9]}
24992      version_plus_separator=${BASH_REMATCH[11]}
24993      VERSION_BUILD=${BASH_REMATCH[12]}
24994      VERSION_OPT=${BASH_REMATCH[14]}
24995      # Unspecified numerical fields are interpreted as 0.
24996      if test "x$VERSION_MINOR" = x; then
24997        VERSION_MINOR=0
24998      fi
24999      if test "x$VERSION_SECURITY" = x; then
25000        VERSION_SECURITY=0
25001      fi
25002      if test "x$VERSION_PATCH" = x; then
25003        VERSION_PATCH=0
25004      fi
25005      if test "x$version_plus_separator" != x \
25006          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25007        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25008      fi
25009      # Stop the version part process from setting default values.
25010      # We still allow them to explicitly override though.
25011      NO_DEFAULT_VERSION_PARTS=true
25012    else
25013      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25014    fi
25015  fi
25016
25017
25018# Check whether --with-version-pre was given.
25019if test "${with_version_pre+set}" = set; then :
25020  withval=$with_version_pre; with_version_pre_present=true
25021else
25022  with_version_pre_present=false
25023fi
25024
25025
25026  if test "x$with_version_pre_present" = xtrue; then
25027    if test "x$with_version_pre" = xyes; then
25028      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25029    elif test "x$with_version_pre" = xno; then
25030      # Interpret --without-* as empty string instead of the literal "no"
25031      VERSION_PRE=
25032    else
25033      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25034       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25035      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25037$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25038      fi
25039    fi
25040  else
25041    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25042      # Default is to use "internal" as pre
25043      VERSION_PRE="internal"
25044    fi
25045  fi
25046
25047
25048# Check whether --with-version-opt was given.
25049if test "${with_version_opt+set}" = set; then :
25050  withval=$with_version_opt; with_version_opt_present=true
25051else
25052  with_version_opt_present=false
25053fi
25054
25055
25056  if test "x$with_version_opt_present" = xtrue; then
25057    if test "x$with_version_opt" = xyes; then
25058      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25059    elif test "x$with_version_opt" = xno; then
25060      # Interpret --without-* as empty string instead of the literal "no"
25061      VERSION_OPT=
25062    else
25063      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25064       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25065      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25067$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25068      fi
25069    fi
25070  else
25071    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25072      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25073      # Outer [ ] to quote m4.
25074       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25075      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25076    fi
25077  fi
25078
25079
25080# Check whether --with-version-build was given.
25081if test "${with_version_build+set}" = set; then :
25082  withval=$with_version_build; with_version_build_present=true
25083else
25084  with_version_build_present=false
25085fi
25086
25087
25088  if test "x$with_version_build_present" = xtrue; then
25089    if test "x$with_version_build" = xyes; then
25090      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25091    elif test "x$with_version_build" = xno; then
25092      # Interpret --without-* as empty string instead of the literal "no"
25093      VERSION_BUILD=
25094    elif test "x$with_version_build" = x; then
25095      VERSION_BUILD=
25096    else
25097
25098  # Additional [] needed to keep m4 from mangling shell constructs.
25099  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25100    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25101  fi
25102  # Extract the version number without leading zeros.
25103  cleaned_value=${BASH_REMATCH[1]}
25104  if test "x$cleaned_value" = x; then
25105    # Special case for zero
25106    cleaned_value=${BASH_REMATCH[2]}
25107  fi
25108
25109  if test $cleaned_value -gt 255; then
25110    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25111  fi
25112  if test "x$cleaned_value" != "x$with_version_build"; then
25113    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25114$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25115  fi
25116  VERSION_BUILD=$cleaned_value
25117
25118    fi
25119  else
25120    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25121      # Default is to not have a build number.
25122      VERSION_BUILD=""
25123      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25124      VERSION_BUILD=0
25125    fi
25126  fi
25127
25128
25129# Check whether --with-version-major was given.
25130if test "${with_version_major+set}" = set; then :
25131  withval=$with_version_major; with_version_major_present=true
25132else
25133  with_version_major_present=false
25134fi
25135
25136
25137  if test "x$with_version_major_present" = xtrue; then
25138    if test "x$with_version_major" = xyes; then
25139      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25140    else
25141
25142  # Additional [] needed to keep m4 from mangling shell constructs.
25143  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25144    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25145  fi
25146  # Extract the version number without leading zeros.
25147  cleaned_value=${BASH_REMATCH[1]}
25148  if test "x$cleaned_value" = x; then
25149    # Special case for zero
25150    cleaned_value=${BASH_REMATCH[2]}
25151  fi
25152
25153  if test $cleaned_value -gt 255; then
25154    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25155  fi
25156  if test "x$cleaned_value" != "x$with_version_major"; then
25157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25158$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25159  fi
25160  VERSION_MAJOR=$cleaned_value
25161
25162    fi
25163  else
25164    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25165      # Default is to get value from version-numbers
25166      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25167    fi
25168  fi
25169
25170
25171# Check whether --with-version-minor was given.
25172if test "${with_version_minor+set}" = set; then :
25173  withval=$with_version_minor; with_version_minor_present=true
25174else
25175  with_version_minor_present=false
25176fi
25177
25178
25179  if test "x$with_version_minor_present" = xtrue; then
25180    if test "x$with_version_minor" = xyes; then
25181      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25182    elif test "x$with_version_minor" = xno; then
25183      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25184      VERSION_MINOR=0
25185    elif test "x$with_version_minor" = x; then
25186      VERSION_MINOR=0
25187    else
25188
25189  # Additional [] needed to keep m4 from mangling shell constructs.
25190  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25191    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25192  fi
25193  # Extract the version number without leading zeros.
25194  cleaned_value=${BASH_REMATCH[1]}
25195  if test "x$cleaned_value" = x; then
25196    # Special case for zero
25197    cleaned_value=${BASH_REMATCH[2]}
25198  fi
25199
25200  if test $cleaned_value -gt 255; then
25201    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25202  fi
25203  if test "x$cleaned_value" != "x$with_version_minor"; then
25204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25205$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25206  fi
25207  VERSION_MINOR=$cleaned_value
25208
25209    fi
25210  else
25211    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25212      # Default is 0, if unspecified
25213      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25214    fi
25215  fi
25216
25217
25218# Check whether --with-version-security was given.
25219if test "${with_version_security+set}" = set; then :
25220  withval=$with_version_security; with_version_security_present=true
25221else
25222  with_version_security_present=false
25223fi
25224
25225
25226  if test "x$with_version_security_present" = xtrue; then
25227    if test "x$with_version_security" = xyes; then
25228      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25229    elif test "x$with_version_security" = xno; then
25230      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25231      VERSION_SECURITY=0
25232    elif test "x$with_version_security" = x; then
25233      VERSION_SECURITY=0
25234    else
25235
25236  # Additional [] needed to keep m4 from mangling shell constructs.
25237  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25238    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25239  fi
25240  # Extract the version number without leading zeros.
25241  cleaned_value=${BASH_REMATCH[1]}
25242  if test "x$cleaned_value" = x; then
25243    # Special case for zero
25244    cleaned_value=${BASH_REMATCH[2]}
25245  fi
25246
25247  if test $cleaned_value -gt 255; then
25248    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25249  fi
25250  if test "x$cleaned_value" != "x$with_version_security"; then
25251    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25252$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25253  fi
25254  VERSION_SECURITY=$cleaned_value
25255
25256    fi
25257  else
25258    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25259      # Default is 0, if unspecified
25260      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25261    fi
25262  fi
25263
25264
25265# Check whether --with-version-patch was given.
25266if test "${with_version_patch+set}" = set; then :
25267  withval=$with_version_patch; with_version_patch_present=true
25268else
25269  with_version_patch_present=false
25270fi
25271
25272
25273  if test "x$with_version_patch_present" = xtrue; then
25274    if test "x$with_version_patch" = xyes; then
25275      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25276    elif test "x$with_version_patch" = xno; then
25277      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25278      VERSION_PATCH=0
25279    elif test "x$with_version_patch" = x; then
25280      VERSION_PATCH=0
25281    else
25282
25283  # Additional [] needed to keep m4 from mangling shell constructs.
25284  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25285    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25286  fi
25287  # Extract the version number without leading zeros.
25288  cleaned_value=${BASH_REMATCH[1]}
25289  if test "x$cleaned_value" = x; then
25290    # Special case for zero
25291    cleaned_value=${BASH_REMATCH[2]}
25292  fi
25293
25294  if test $cleaned_value -gt 255; then
25295    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25296  fi
25297  if test "x$cleaned_value" != "x$with_version_patch"; then
25298    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25299$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25300  fi
25301  VERSION_PATCH=$cleaned_value
25302
25303    fi
25304  else
25305    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25306      # Default is 0, if unspecified
25307      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25308    fi
25309  fi
25310
25311  # Calculate derived version properties
25312
25313  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25314  if test "x$VERSION_PRE" = x; then
25315    VERSION_IS_GA=true
25316  else
25317    VERSION_IS_GA=false
25318  fi
25319
25320  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25321  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25322
25323  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25324  # Strip trailing zeroes from stripped_version_number
25325  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25326  VERSION_NUMBER=$stripped_version_number
25327
25328  # The complete version string, with additional build information
25329  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25330    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25331  else
25332    # If either build or opt is set, we need a + separator
25333    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25334  fi
25335
25336  # The short version string, just VERSION_NUMBER and PRE, if present.
25337  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25338
25339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25340$as_echo_n "checking for version string... " >&6; }
25341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25342$as_echo "$VERSION_STRING" >&6; }
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358###############################################################################
25359#
25360# Setup BootJDK, used to bootstrap the build.
25361#
25362###############################################################################
25363
25364
25365  BOOT_JDK_FOUND=no
25366
25367# Check whether --with-boot-jdk was given.
25368if test "${with_boot_jdk+set}" = set; then :
25369  withval=$with_boot_jdk;
25370fi
25371
25372
25373  # We look for the Boot JDK through various means, going from more certain to
25374  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25375  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25376  # must check if this is indeed valid; otherwise we'll continue looking.
25377
25378  # Test: Is bootjdk explicitly set by command line arguments?
25379
25380  if test "x$BOOT_JDK_FOUND" = xno; then
25381    # Now execute the test
25382
25383  if test "x$with_boot_jdk" != x; then
25384    BOOT_JDK=$with_boot_jdk
25385    BOOT_JDK_FOUND=maybe
25386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25387$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25388  fi
25389
25390
25391    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25392    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25393      # Do we have a bin/java?
25394      if test ! -x "$BOOT_JDK/bin/java"; then
25395        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25397        BOOT_JDK_FOUND=no
25398      else
25399        # Do we have a bin/javac?
25400        if test ! -x "$BOOT_JDK/bin/javac"; then
25401          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25403          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25404$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25405          BOOT_JDK_FOUND=no
25406        else
25407          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25408          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25409
25410          # Extra M4 quote needed to protect [] in grep expression.
25411          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25412          if test "x$FOUND_CORRECT_VERSION" = x; then
25413            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25415            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25416$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25417            BOOT_JDK_FOUND=no
25418          else
25419            # We're done! :-)
25420            BOOT_JDK_FOUND=yes
25421
25422  # Only process if variable expands to non-empty
25423
25424  if test "x$BOOT_JDK" != x; then
25425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25426
25427  # Input might be given as Windows format, start by converting to
25428  # unix format.
25429  path="$BOOT_JDK"
25430  new_path=`$CYGPATH -u "$path"`
25431
25432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25435  # "foo.exe" is OK but "foo" is an error.
25436  #
25437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25438  # It is also a way to make sure we got the proper file name for the real test later on.
25439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25440  if test "x$test_shortpath" = x; then
25441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25443    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25444  fi
25445
25446  # Call helper function which possibly converts this using DOS-style short mode.
25447  # If so, the updated path is stored in $new_path.
25448
25449  input_path="$new_path"
25450  # Check if we need to convert this using DOS-style short mode. If the path
25451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25452  # take no chances and rewrite it.
25453  # Note: m4 eats our [], so we need to use [ and ] instead.
25454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25455  if test "x$has_forbidden_chars" != x; then
25456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25460      # Going to short mode and back again did indeed matter. Since short mode is
25461      # case insensitive, let's make it lowercase to improve readability.
25462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25463      # Now convert it back to Unix-style (cygpath)
25464      input_path=`$CYGPATH -u "$shortmode_path"`
25465      new_path="$input_path"
25466    fi
25467  fi
25468
25469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25470  if test "x$test_cygdrive_prefix" = x; then
25471    # As a simple fix, exclude /usr/bin since it's not a real path.
25472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25474      # a path prefixed by /cygdrive for fixpath to work.
25475      new_path="$CYGWIN_ROOT_PATH$input_path"
25476    fi
25477  fi
25478
25479
25480  if test "x$path" != "x$new_path"; then
25481    BOOT_JDK="$new_path"
25482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25484  fi
25485
25486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487
25488  path="$BOOT_JDK"
25489  has_colon=`$ECHO $path | $GREP ^.:`
25490  new_path="$path"
25491  if test "x$has_colon" = x; then
25492    # Not in mixed or Windows style, start by that.
25493    new_path=`cmd //c echo $path`
25494  fi
25495
25496
25497  input_path="$new_path"
25498  # Check if we need to convert this using DOS-style short mode. If the path
25499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25500  # take no chances and rewrite it.
25501  # Note: m4 eats our [], so we need to use [ and ] instead.
25502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25503  if test "x$has_forbidden_chars" != x; then
25504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25506  fi
25507
25508
25509  windows_path="$new_path"
25510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25511    unix_path=`$CYGPATH -u "$windows_path"`
25512    new_path="$unix_path"
25513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25515    new_path="$unix_path"
25516  fi
25517
25518  if test "x$path" != "x$new_path"; then
25519    BOOT_JDK="$new_path"
25520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25522  fi
25523
25524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25526
25527    else
25528      # We're on a unix platform. Hooray! :)
25529      path="$BOOT_JDK"
25530      has_space=`$ECHO "$path" | $GREP " "`
25531      if test "x$has_space" != x; then
25532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25535      fi
25536
25537      # Use eval to expand a potential ~
25538      eval path="$path"
25539      if test ! -f "$path" && test ! -d "$path"; then
25540        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25541      fi
25542
25543      if test -d "$path"; then
25544        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25545      else
25546        dir="`$DIRNAME "$path"`"
25547        base="`$BASENAME "$path"`"
25548        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25549      fi
25550    fi
25551  fi
25552
25553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25554$as_echo_n "checking for Boot JDK... " >&6; }
25555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25556$as_echo "$BOOT_JDK" >&6; }
25557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25558$as_echo_n "checking Boot JDK version... " >&6; }
25559            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25561$as_echo "$BOOT_JDK_VERSION" >&6; }
25562          fi # end check jdk version
25563        fi # end check javac
25564      fi # end check java
25565    fi # end check boot jdk found
25566  fi
25567
25568  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25569    # Having specified an argument which is incorrect will produce an instant failure;
25570    # we should not go on looking
25571    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25572  fi
25573
25574  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25575
25576  if test "x$BOOT_JDK_FOUND" = xno; then
25577    # Now execute the test
25578
25579  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25580    # First check at user selected default
25581
25582  if test "x$BOOT_JDK_FOUND" = xno; then
25583    # Now execute the test
25584
25585  if test -x /usr/libexec/java_home; then
25586    BOOT_JDK=`/usr/libexec/java_home `
25587    BOOT_JDK_FOUND=maybe
25588    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25589$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25590  fi
25591
25592
25593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25595      # Do we have a bin/java?
25596      if test ! -x "$BOOT_JDK/bin/java"; then
25597        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25599        BOOT_JDK_FOUND=no
25600      else
25601        # Do we have a bin/javac?
25602        if test ! -x "$BOOT_JDK/bin/javac"; then
25603          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25605          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25607          BOOT_JDK_FOUND=no
25608        else
25609          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25610          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25611
25612          # Extra M4 quote needed to protect [] in grep expression.
25613          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25614          if test "x$FOUND_CORRECT_VERSION" = x; then
25615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25617            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25619            BOOT_JDK_FOUND=no
25620          else
25621            # We're done! :-)
25622            BOOT_JDK_FOUND=yes
25623
25624  # Only process if variable expands to non-empty
25625
25626  if test "x$BOOT_JDK" != x; then
25627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25628
25629  # Input might be given as Windows format, start by converting to
25630  # unix format.
25631  path="$BOOT_JDK"
25632  new_path=`$CYGPATH -u "$path"`
25633
25634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25637  # "foo.exe" is OK but "foo" is an error.
25638  #
25639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25640  # It is also a way to make sure we got the proper file name for the real test later on.
25641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25642  if test "x$test_shortpath" = x; then
25643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25646  fi
25647
25648  # Call helper function which possibly converts this using DOS-style short mode.
25649  # If so, the updated path is stored in $new_path.
25650
25651  input_path="$new_path"
25652  # Check if we need to convert this using DOS-style short mode. If the path
25653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25654  # take no chances and rewrite it.
25655  # Note: m4 eats our [], so we need to use [ and ] instead.
25656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25657  if test "x$has_forbidden_chars" != x; then
25658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25662      # Going to short mode and back again did indeed matter. Since short mode is
25663      # case insensitive, let's make it lowercase to improve readability.
25664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25665      # Now convert it back to Unix-style (cygpath)
25666      input_path=`$CYGPATH -u "$shortmode_path"`
25667      new_path="$input_path"
25668    fi
25669  fi
25670
25671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25672  if test "x$test_cygdrive_prefix" = x; then
25673    # As a simple fix, exclude /usr/bin since it's not a real path.
25674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25676      # a path prefixed by /cygdrive for fixpath to work.
25677      new_path="$CYGWIN_ROOT_PATH$input_path"
25678    fi
25679  fi
25680
25681
25682  if test "x$path" != "x$new_path"; then
25683    BOOT_JDK="$new_path"
25684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25686  fi
25687
25688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689
25690  path="$BOOT_JDK"
25691  has_colon=`$ECHO $path | $GREP ^.:`
25692  new_path="$path"
25693  if test "x$has_colon" = x; then
25694    # Not in mixed or Windows style, start by that.
25695    new_path=`cmd //c echo $path`
25696  fi
25697
25698
25699  input_path="$new_path"
25700  # Check if we need to convert this using DOS-style short mode. If the path
25701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25702  # take no chances and rewrite it.
25703  # Note: m4 eats our [], so we need to use [ and ] instead.
25704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25705  if test "x$has_forbidden_chars" != x; then
25706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25708  fi
25709
25710
25711  windows_path="$new_path"
25712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25713    unix_path=`$CYGPATH -u "$windows_path"`
25714    new_path="$unix_path"
25715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25717    new_path="$unix_path"
25718  fi
25719
25720  if test "x$path" != "x$new_path"; then
25721    BOOT_JDK="$new_path"
25722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25724  fi
25725
25726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25728
25729    else
25730      # We're on a unix platform. Hooray! :)
25731      path="$BOOT_JDK"
25732      has_space=`$ECHO "$path" | $GREP " "`
25733      if test "x$has_space" != x; then
25734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25737      fi
25738
25739      # Use eval to expand a potential ~
25740      eval path="$path"
25741      if test ! -f "$path" && test ! -d "$path"; then
25742        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25743      fi
25744
25745      if test -d "$path"; then
25746        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25747      else
25748        dir="`$DIRNAME "$path"`"
25749        base="`$BASENAME "$path"`"
25750        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25751      fi
25752    fi
25753  fi
25754
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25756$as_echo_n "checking for Boot JDK... " >&6; }
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25758$as_echo "$BOOT_JDK" >&6; }
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25760$as_echo_n "checking Boot JDK version... " >&6; }
25761            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25763$as_echo "$BOOT_JDK_VERSION" >&6; }
25764          fi # end check jdk version
25765        fi # end check javac
25766      fi # end check java
25767    fi # end check boot jdk found
25768  fi
25769
25770    # If that did not work out (e.g. too old), try explicit versions instead
25771
25772  if test "x$BOOT_JDK_FOUND" = xno; then
25773    # Now execute the test
25774
25775  if test -x /usr/libexec/java_home; then
25776    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25777    BOOT_JDK_FOUND=maybe
25778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25779$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25780  fi
25781
25782
25783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25785      # Do we have a bin/java?
25786      if test ! -x "$BOOT_JDK/bin/java"; then
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25789        BOOT_JDK_FOUND=no
25790      else
25791        # Do we have a bin/javac?
25792        if test ! -x "$BOOT_JDK/bin/javac"; then
25793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25797          BOOT_JDK_FOUND=no
25798        else
25799          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25800          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25801
25802          # Extra M4 quote needed to protect [] in grep expression.
25803          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25804          if test "x$FOUND_CORRECT_VERSION" = x; then
25805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25807            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25809            BOOT_JDK_FOUND=no
25810          else
25811            # We're done! :-)
25812            BOOT_JDK_FOUND=yes
25813
25814  # Only process if variable expands to non-empty
25815
25816  if test "x$BOOT_JDK" != x; then
25817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25818
25819  # Input might be given as Windows format, start by converting to
25820  # unix format.
25821  path="$BOOT_JDK"
25822  new_path=`$CYGPATH -u "$path"`
25823
25824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25827  # "foo.exe" is OK but "foo" is an error.
25828  #
25829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25830  # It is also a way to make sure we got the proper file name for the real test later on.
25831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25832  if test "x$test_shortpath" = x; then
25833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25836  fi
25837
25838  # Call helper function which possibly converts this using DOS-style short mode.
25839  # If so, the updated path is stored in $new_path.
25840
25841  input_path="$new_path"
25842  # Check if we need to convert this using DOS-style short mode. If the path
25843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25844  # take no chances and rewrite it.
25845  # Note: m4 eats our [], so we need to use [ and ] instead.
25846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25847  if test "x$has_forbidden_chars" != x; then
25848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25852      # Going to short mode and back again did indeed matter. Since short mode is
25853      # case insensitive, let's make it lowercase to improve readability.
25854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25855      # Now convert it back to Unix-style (cygpath)
25856      input_path=`$CYGPATH -u "$shortmode_path"`
25857      new_path="$input_path"
25858    fi
25859  fi
25860
25861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25862  if test "x$test_cygdrive_prefix" = x; then
25863    # As a simple fix, exclude /usr/bin since it's not a real path.
25864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25866      # a path prefixed by /cygdrive for fixpath to work.
25867      new_path="$CYGWIN_ROOT_PATH$input_path"
25868    fi
25869  fi
25870
25871
25872  if test "x$path" != "x$new_path"; then
25873    BOOT_JDK="$new_path"
25874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25876  fi
25877
25878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25879
25880  path="$BOOT_JDK"
25881  has_colon=`$ECHO $path | $GREP ^.:`
25882  new_path="$path"
25883  if test "x$has_colon" = x; then
25884    # Not in mixed or Windows style, start by that.
25885    new_path=`cmd //c echo $path`
25886  fi
25887
25888
25889  input_path="$new_path"
25890  # Check if we need to convert this using DOS-style short mode. If the path
25891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25892  # take no chances and rewrite it.
25893  # Note: m4 eats our [], so we need to use [ and ] instead.
25894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25895  if test "x$has_forbidden_chars" != x; then
25896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25898  fi
25899
25900
25901  windows_path="$new_path"
25902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25903    unix_path=`$CYGPATH -u "$windows_path"`
25904    new_path="$unix_path"
25905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25907    new_path="$unix_path"
25908  fi
25909
25910  if test "x$path" != "x$new_path"; then
25911    BOOT_JDK="$new_path"
25912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25914  fi
25915
25916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25918
25919    else
25920      # We're on a unix platform. Hooray! :)
25921      path="$BOOT_JDK"
25922      has_space=`$ECHO "$path" | $GREP " "`
25923      if test "x$has_space" != x; then
25924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25927      fi
25928
25929      # Use eval to expand a potential ~
25930      eval path="$path"
25931      if test ! -f "$path" && test ! -d "$path"; then
25932        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25933      fi
25934
25935      if test -d "$path"; then
25936        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25937      else
25938        dir="`$DIRNAME "$path"`"
25939        base="`$BASENAME "$path"`"
25940        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25941      fi
25942    fi
25943  fi
25944
25945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25946$as_echo_n "checking for Boot JDK... " >&6; }
25947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25948$as_echo "$BOOT_JDK" >&6; }
25949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25950$as_echo_n "checking Boot JDK version... " >&6; }
25951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25953$as_echo "$BOOT_JDK_VERSION" >&6; }
25954          fi # end check jdk version
25955        fi # end check javac
25956      fi # end check java
25957    fi # end check boot jdk found
25958  fi
25959
25960
25961  if test "x$BOOT_JDK_FOUND" = xno; then
25962    # Now execute the test
25963
25964  if test -x /usr/libexec/java_home; then
25965    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25966    BOOT_JDK_FOUND=maybe
25967    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25968$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25969  fi
25970
25971
25972    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25973    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25974      # Do we have a bin/java?
25975      if test ! -x "$BOOT_JDK/bin/java"; then
25976        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25978        BOOT_JDK_FOUND=no
25979      else
25980        # Do we have a bin/javac?
25981        if test ! -x "$BOOT_JDK/bin/javac"; then
25982          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25984          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25985$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25986          BOOT_JDK_FOUND=no
25987        else
25988          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25989          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25990
25991          # Extra M4 quote needed to protect [] in grep expression.
25992          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25993          if test "x$FOUND_CORRECT_VERSION" = x; then
25994            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25996            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25997$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25998            BOOT_JDK_FOUND=no
25999          else
26000            # We're done! :-)
26001            BOOT_JDK_FOUND=yes
26002
26003  # Only process if variable expands to non-empty
26004
26005  if test "x$BOOT_JDK" != x; then
26006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26007
26008  # Input might be given as Windows format, start by converting to
26009  # unix format.
26010  path="$BOOT_JDK"
26011  new_path=`$CYGPATH -u "$path"`
26012
26013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26016  # "foo.exe" is OK but "foo" is an error.
26017  #
26018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26019  # It is also a way to make sure we got the proper file name for the real test later on.
26020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26021  if test "x$test_shortpath" = x; then
26022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26024    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26025  fi
26026
26027  # Call helper function which possibly converts this using DOS-style short mode.
26028  # If so, the updated path is stored in $new_path.
26029
26030  input_path="$new_path"
26031  # Check if we need to convert this using DOS-style short mode. If the path
26032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26033  # take no chances and rewrite it.
26034  # Note: m4 eats our [], so we need to use [ and ] instead.
26035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26036  if test "x$has_forbidden_chars" != x; then
26037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26041      # Going to short mode and back again did indeed matter. Since short mode is
26042      # case insensitive, let's make it lowercase to improve readability.
26043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26044      # Now convert it back to Unix-style (cygpath)
26045      input_path=`$CYGPATH -u "$shortmode_path"`
26046      new_path="$input_path"
26047    fi
26048  fi
26049
26050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26051  if test "x$test_cygdrive_prefix" = x; then
26052    # As a simple fix, exclude /usr/bin since it's not a real path.
26053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26055      # a path prefixed by /cygdrive for fixpath to work.
26056      new_path="$CYGWIN_ROOT_PATH$input_path"
26057    fi
26058  fi
26059
26060
26061  if test "x$path" != "x$new_path"; then
26062    BOOT_JDK="$new_path"
26063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26065  fi
26066
26067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068
26069  path="$BOOT_JDK"
26070  has_colon=`$ECHO $path | $GREP ^.:`
26071  new_path="$path"
26072  if test "x$has_colon" = x; then
26073    # Not in mixed or Windows style, start by that.
26074    new_path=`cmd //c echo $path`
26075  fi
26076
26077
26078  input_path="$new_path"
26079  # Check if we need to convert this using DOS-style short mode. If the path
26080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26081  # take no chances and rewrite it.
26082  # Note: m4 eats our [], so we need to use [ and ] instead.
26083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26084  if test "x$has_forbidden_chars" != x; then
26085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26087  fi
26088
26089
26090  windows_path="$new_path"
26091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26092    unix_path=`$CYGPATH -u "$windows_path"`
26093    new_path="$unix_path"
26094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26096    new_path="$unix_path"
26097  fi
26098
26099  if test "x$path" != "x$new_path"; then
26100    BOOT_JDK="$new_path"
26101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26103  fi
26104
26105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26107
26108    else
26109      # We're on a unix platform. Hooray! :)
26110      path="$BOOT_JDK"
26111      has_space=`$ECHO "$path" | $GREP " "`
26112      if test "x$has_space" != x; then
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26116      fi
26117
26118      # Use eval to expand a potential ~
26119      eval path="$path"
26120      if test ! -f "$path" && test ! -d "$path"; then
26121        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26122      fi
26123
26124      if test -d "$path"; then
26125        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26126      else
26127        dir="`$DIRNAME "$path"`"
26128        base="`$BASENAME "$path"`"
26129        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26130      fi
26131    fi
26132  fi
26133
26134            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26135$as_echo_n "checking for Boot JDK... " >&6; }
26136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26137$as_echo "$BOOT_JDK" >&6; }
26138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26139$as_echo_n "checking Boot JDK version... " >&6; }
26140            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26142$as_echo "$BOOT_JDK_VERSION" >&6; }
26143          fi # end check jdk version
26144        fi # end check javac
26145      fi # end check java
26146    fi # end check boot jdk found
26147  fi
26148
26149
26150  if test "x$BOOT_JDK_FOUND" = xno; then
26151    # Now execute the test
26152
26153  if test -x /usr/libexec/java_home; then
26154    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26155    BOOT_JDK_FOUND=maybe
26156    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26157$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26158  fi
26159
26160
26161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26163      # Do we have a bin/java?
26164      if test ! -x "$BOOT_JDK/bin/java"; then
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26167        BOOT_JDK_FOUND=no
26168      else
26169        # Do we have a bin/javac?
26170        if test ! -x "$BOOT_JDK/bin/javac"; then
26171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26175          BOOT_JDK_FOUND=no
26176        else
26177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26179
26180          # Extra M4 quote needed to protect [] in grep expression.
26181          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26182          if test "x$FOUND_CORRECT_VERSION" = x; then
26183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26187            BOOT_JDK_FOUND=no
26188          else
26189            # We're done! :-)
26190            BOOT_JDK_FOUND=yes
26191
26192  # Only process if variable expands to non-empty
26193
26194  if test "x$BOOT_JDK" != x; then
26195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26196
26197  # Input might be given as Windows format, start by converting to
26198  # unix format.
26199  path="$BOOT_JDK"
26200  new_path=`$CYGPATH -u "$path"`
26201
26202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26205  # "foo.exe" is OK but "foo" is an error.
26206  #
26207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26208  # It is also a way to make sure we got the proper file name for the real test later on.
26209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26210  if test "x$test_shortpath" = x; then
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26214  fi
26215
26216  # Call helper function which possibly converts this using DOS-style short mode.
26217  # If so, the updated path is stored in $new_path.
26218
26219  input_path="$new_path"
26220  # Check if we need to convert this using DOS-style short mode. If the path
26221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26222  # take no chances and rewrite it.
26223  # Note: m4 eats our [], so we need to use [ and ] instead.
26224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26225  if test "x$has_forbidden_chars" != x; then
26226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26230      # Going to short mode and back again did indeed matter. Since short mode is
26231      # case insensitive, let's make it lowercase to improve readability.
26232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233      # Now convert it back to Unix-style (cygpath)
26234      input_path=`$CYGPATH -u "$shortmode_path"`
26235      new_path="$input_path"
26236    fi
26237  fi
26238
26239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26240  if test "x$test_cygdrive_prefix" = x; then
26241    # As a simple fix, exclude /usr/bin since it's not a real path.
26242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26244      # a path prefixed by /cygdrive for fixpath to work.
26245      new_path="$CYGWIN_ROOT_PATH$input_path"
26246    fi
26247  fi
26248
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257
26258  path="$BOOT_JDK"
26259  has_colon=`$ECHO $path | $GREP ^.:`
26260  new_path="$path"
26261  if test "x$has_colon" = x; then
26262    # Not in mixed or Windows style, start by that.
26263    new_path=`cmd //c echo $path`
26264  fi
26265
26266
26267  input_path="$new_path"
26268  # Check if we need to convert this using DOS-style short mode. If the path
26269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26270  # take no chances and rewrite it.
26271  # Note: m4 eats our [], so we need to use [ and ] instead.
26272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26273  if test "x$has_forbidden_chars" != x; then
26274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26276  fi
26277
26278
26279  windows_path="$new_path"
26280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26281    unix_path=`$CYGPATH -u "$windows_path"`
26282    new_path="$unix_path"
26283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26285    new_path="$unix_path"
26286  fi
26287
26288  if test "x$path" != "x$new_path"; then
26289    BOOT_JDK="$new_path"
26290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26292  fi
26293
26294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26296
26297    else
26298      # We're on a unix platform. Hooray! :)
26299      path="$BOOT_JDK"
26300      has_space=`$ECHO "$path" | $GREP " "`
26301      if test "x$has_space" != x; then
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26305      fi
26306
26307      # Use eval to expand a potential ~
26308      eval path="$path"
26309      if test ! -f "$path" && test ! -d "$path"; then
26310        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26311      fi
26312
26313      if test -d "$path"; then
26314        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26315      else
26316        dir="`$DIRNAME "$path"`"
26317        base="`$BASENAME "$path"`"
26318        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26319      fi
26320    fi
26321  fi
26322
26323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26324$as_echo_n "checking for Boot JDK... " >&6; }
26325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26326$as_echo "$BOOT_JDK" >&6; }
26327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26328$as_echo_n "checking Boot JDK version... " >&6; }
26329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26331$as_echo "$BOOT_JDK_VERSION" >&6; }
26332          fi # end check jdk version
26333        fi # end check javac
26334      fi # end check java
26335    fi # end check boot jdk found
26336  fi
26337
26338  fi
26339
26340
26341    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26342    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26343      # Do we have a bin/java?
26344      if test ! -x "$BOOT_JDK/bin/java"; then
26345        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26347        BOOT_JDK_FOUND=no
26348      else
26349        # Do we have a bin/javac?
26350        if test ! -x "$BOOT_JDK/bin/javac"; then
26351          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26353          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26354$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26355          BOOT_JDK_FOUND=no
26356        else
26357          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26358          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26359
26360          # Extra M4 quote needed to protect [] in grep expression.
26361          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26362          if test "x$FOUND_CORRECT_VERSION" = x; then
26363            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26365            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26366$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26367            BOOT_JDK_FOUND=no
26368          else
26369            # We're done! :-)
26370            BOOT_JDK_FOUND=yes
26371
26372  # Only process if variable expands to non-empty
26373
26374  if test "x$BOOT_JDK" != x; then
26375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26376
26377  # Input might be given as Windows format, start by converting to
26378  # unix format.
26379  path="$BOOT_JDK"
26380  new_path=`$CYGPATH -u "$path"`
26381
26382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26385  # "foo.exe" is OK but "foo" is an error.
26386  #
26387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26388  # It is also a way to make sure we got the proper file name for the real test later on.
26389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26390  if test "x$test_shortpath" = x; then
26391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26393    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26394  fi
26395
26396  # Call helper function which possibly converts this using DOS-style short mode.
26397  # If so, the updated path is stored in $new_path.
26398
26399  input_path="$new_path"
26400  # Check if we need to convert this using DOS-style short mode. If the path
26401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26402  # take no chances and rewrite it.
26403  # Note: m4 eats our [], so we need to use [ and ] instead.
26404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26405  if test "x$has_forbidden_chars" != x; then
26406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26410      # Going to short mode and back again did indeed matter. Since short mode is
26411      # case insensitive, let's make it lowercase to improve readability.
26412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26413      # Now convert it back to Unix-style (cygpath)
26414      input_path=`$CYGPATH -u "$shortmode_path"`
26415      new_path="$input_path"
26416    fi
26417  fi
26418
26419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26420  if test "x$test_cygdrive_prefix" = x; then
26421    # As a simple fix, exclude /usr/bin since it's not a real path.
26422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26424      # a path prefixed by /cygdrive for fixpath to work.
26425      new_path="$CYGWIN_ROOT_PATH$input_path"
26426    fi
26427  fi
26428
26429
26430  if test "x$path" != "x$new_path"; then
26431    BOOT_JDK="$new_path"
26432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26433$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26434  fi
26435
26436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26437
26438  path="$BOOT_JDK"
26439  has_colon=`$ECHO $path | $GREP ^.:`
26440  new_path="$path"
26441  if test "x$has_colon" = x; then
26442    # Not in mixed or Windows style, start by that.
26443    new_path=`cmd //c echo $path`
26444  fi
26445
26446
26447  input_path="$new_path"
26448  # Check if we need to convert this using DOS-style short mode. If the path
26449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26450  # take no chances and rewrite it.
26451  # Note: m4 eats our [], so we need to use [ and ] instead.
26452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26453  if test "x$has_forbidden_chars" != x; then
26454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26456  fi
26457
26458
26459  windows_path="$new_path"
26460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26461    unix_path=`$CYGPATH -u "$windows_path"`
26462    new_path="$unix_path"
26463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26465    new_path="$unix_path"
26466  fi
26467
26468  if test "x$path" != "x$new_path"; then
26469    BOOT_JDK="$new_path"
26470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26472  fi
26473
26474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26476
26477    else
26478      # We're on a unix platform. Hooray! :)
26479      path="$BOOT_JDK"
26480      has_space=`$ECHO "$path" | $GREP " "`
26481      if test "x$has_space" != x; then
26482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26485      fi
26486
26487      # Use eval to expand a potential ~
26488      eval path="$path"
26489      if test ! -f "$path" && test ! -d "$path"; then
26490        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26491      fi
26492
26493      if test -d "$path"; then
26494        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26495      else
26496        dir="`$DIRNAME "$path"`"
26497        base="`$BASENAME "$path"`"
26498        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26499      fi
26500    fi
26501  fi
26502
26503            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26504$as_echo_n "checking for Boot JDK... " >&6; }
26505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26506$as_echo "$BOOT_JDK" >&6; }
26507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26508$as_echo_n "checking Boot JDK version... " >&6; }
26509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26511$as_echo "$BOOT_JDK_VERSION" >&6; }
26512          fi # end check jdk version
26513        fi # end check javac
26514      fi # end check java
26515    fi # end check boot jdk found
26516  fi
26517
26518
26519  # Test: Is $JAVA_HOME set?
26520
26521  if test "x$BOOT_JDK_FOUND" = xno; then
26522    # Now execute the test
26523
26524  if test "x$JAVA_HOME" != x; then
26525    JAVA_HOME_PROCESSED="$JAVA_HOME"
26526
26527  # Only process if variable expands to non-empty
26528
26529  if test "x$JAVA_HOME_PROCESSED" != x; then
26530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26531
26532  # Input might be given as Windows format, start by converting to
26533  # unix format.
26534  path="$JAVA_HOME_PROCESSED"
26535  new_path=`$CYGPATH -u "$path"`
26536
26537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26540  # "foo.exe" is OK but "foo" is an error.
26541  #
26542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26543  # It is also a way to make sure we got the proper file name for the real test later on.
26544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26545  if test "x$test_shortpath" = x; then
26546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26547$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26548    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26549  fi
26550
26551  # Call helper function which possibly converts this using DOS-style short mode.
26552  # If so, the updated path is stored in $new_path.
26553
26554  input_path="$new_path"
26555  # Check if we need to convert this using DOS-style short mode. If the path
26556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26557  # take no chances and rewrite it.
26558  # Note: m4 eats our [], so we need to use [ and ] instead.
26559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26560  if test "x$has_forbidden_chars" != x; then
26561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26565      # Going to short mode and back again did indeed matter. Since short mode is
26566      # case insensitive, let's make it lowercase to improve readability.
26567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26568      # Now convert it back to Unix-style (cygpath)
26569      input_path=`$CYGPATH -u "$shortmode_path"`
26570      new_path="$input_path"
26571    fi
26572  fi
26573
26574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26575  if test "x$test_cygdrive_prefix" = x; then
26576    # As a simple fix, exclude /usr/bin since it's not a real path.
26577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26579      # a path prefixed by /cygdrive for fixpath to work.
26580      new_path="$CYGWIN_ROOT_PATH$input_path"
26581    fi
26582  fi
26583
26584
26585  if test "x$path" != "x$new_path"; then
26586    JAVA_HOME_PROCESSED="$new_path"
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26588$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26589  fi
26590
26591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26592
26593  path="$JAVA_HOME_PROCESSED"
26594  has_colon=`$ECHO $path | $GREP ^.:`
26595  new_path="$path"
26596  if test "x$has_colon" = x; then
26597    # Not in mixed or Windows style, start by that.
26598    new_path=`cmd //c echo $path`
26599  fi
26600
26601
26602  input_path="$new_path"
26603  # Check if we need to convert this using DOS-style short mode. If the path
26604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26605  # take no chances and rewrite it.
26606  # Note: m4 eats our [], so we need to use [ and ] instead.
26607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26608  if test "x$has_forbidden_chars" != x; then
26609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26611  fi
26612
26613
26614  windows_path="$new_path"
26615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26616    unix_path=`$CYGPATH -u "$windows_path"`
26617    new_path="$unix_path"
26618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26620    new_path="$unix_path"
26621  fi
26622
26623  if test "x$path" != "x$new_path"; then
26624    JAVA_HOME_PROCESSED="$new_path"
26625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26626$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26627  fi
26628
26629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26631
26632    else
26633      # We're on a unix platform. Hooray! :)
26634      path="$JAVA_HOME_PROCESSED"
26635      has_space=`$ECHO "$path" | $GREP " "`
26636      if test "x$has_space" != x; then
26637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26638$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26639        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26640      fi
26641
26642      # Use eval to expand a potential ~
26643      eval path="$path"
26644      if test ! -f "$path" && test ! -d "$path"; then
26645        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26646      fi
26647
26648      if test -d "$path"; then
26649        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26650      else
26651        dir="`$DIRNAME "$path"`"
26652        base="`$BASENAME "$path"`"
26653        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26654      fi
26655    fi
26656  fi
26657
26658    if test ! -d "$JAVA_HOME_PROCESSED"; then
26659      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26660$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26661    else
26662      # Aha, the user has set a JAVA_HOME
26663      # let us use that as the Boot JDK.
26664      BOOT_JDK="$JAVA_HOME_PROCESSED"
26665      BOOT_JDK_FOUND=maybe
26666      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26667$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26668    fi
26669  fi
26670
26671
26672    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26673    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26674      # Do we have a bin/java?
26675      if test ! -x "$BOOT_JDK/bin/java"; then
26676        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26678        BOOT_JDK_FOUND=no
26679      else
26680        # Do we have a bin/javac?
26681        if test ! -x "$BOOT_JDK/bin/javac"; then
26682          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26684          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26685$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26686          BOOT_JDK_FOUND=no
26687        else
26688          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26689          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26690
26691          # Extra M4 quote needed to protect [] in grep expression.
26692          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26693          if test "x$FOUND_CORRECT_VERSION" = x; then
26694            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26696            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26697$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26698            BOOT_JDK_FOUND=no
26699          else
26700            # We're done! :-)
26701            BOOT_JDK_FOUND=yes
26702
26703  # Only process if variable expands to non-empty
26704
26705  if test "x$BOOT_JDK" != x; then
26706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26707
26708  # Input might be given as Windows format, start by converting to
26709  # unix format.
26710  path="$BOOT_JDK"
26711  new_path=`$CYGPATH -u "$path"`
26712
26713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26716  # "foo.exe" is OK but "foo" is an error.
26717  #
26718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26719  # It is also a way to make sure we got the proper file name for the real test later on.
26720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26721  if test "x$test_shortpath" = x; then
26722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26724    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26725  fi
26726
26727  # Call helper function which possibly converts this using DOS-style short mode.
26728  # If so, the updated path is stored in $new_path.
26729
26730  input_path="$new_path"
26731  # Check if we need to convert this using DOS-style short mode. If the path
26732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26733  # take no chances and rewrite it.
26734  # Note: m4 eats our [], so we need to use [ and ] instead.
26735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26736  if test "x$has_forbidden_chars" != x; then
26737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26741      # Going to short mode and back again did indeed matter. Since short mode is
26742      # case insensitive, let's make it lowercase to improve readability.
26743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26744      # Now convert it back to Unix-style (cygpath)
26745      input_path=`$CYGPATH -u "$shortmode_path"`
26746      new_path="$input_path"
26747    fi
26748  fi
26749
26750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26751  if test "x$test_cygdrive_prefix" = x; then
26752    # As a simple fix, exclude /usr/bin since it's not a real path.
26753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26755      # a path prefixed by /cygdrive for fixpath to work.
26756      new_path="$CYGWIN_ROOT_PATH$input_path"
26757    fi
26758  fi
26759
26760
26761  if test "x$path" != "x$new_path"; then
26762    BOOT_JDK="$new_path"
26763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26765  fi
26766
26767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26768
26769  path="$BOOT_JDK"
26770  has_colon=`$ECHO $path | $GREP ^.:`
26771  new_path="$path"
26772  if test "x$has_colon" = x; then
26773    # Not in mixed or Windows style, start by that.
26774    new_path=`cmd //c echo $path`
26775  fi
26776
26777
26778  input_path="$new_path"
26779  # Check if we need to convert this using DOS-style short mode. If the path
26780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26781  # take no chances and rewrite it.
26782  # Note: m4 eats our [], so we need to use [ and ] instead.
26783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26784  if test "x$has_forbidden_chars" != x; then
26785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26787  fi
26788
26789
26790  windows_path="$new_path"
26791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26792    unix_path=`$CYGPATH -u "$windows_path"`
26793    new_path="$unix_path"
26794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26796    new_path="$unix_path"
26797  fi
26798
26799  if test "x$path" != "x$new_path"; then
26800    BOOT_JDK="$new_path"
26801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26803  fi
26804
26805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26807
26808    else
26809      # We're on a unix platform. Hooray! :)
26810      path="$BOOT_JDK"
26811      has_space=`$ECHO "$path" | $GREP " "`
26812      if test "x$has_space" != x; then
26813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26816      fi
26817
26818      # Use eval to expand a potential ~
26819      eval path="$path"
26820      if test ! -f "$path" && test ! -d "$path"; then
26821        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26822      fi
26823
26824      if test -d "$path"; then
26825        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26826      else
26827        dir="`$DIRNAME "$path"`"
26828        base="`$BASENAME "$path"`"
26829        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26830      fi
26831    fi
26832  fi
26833
26834            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26835$as_echo_n "checking for Boot JDK... " >&6; }
26836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26837$as_echo "$BOOT_JDK" >&6; }
26838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26839$as_echo_n "checking Boot JDK version... " >&6; }
26840            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26842$as_echo "$BOOT_JDK_VERSION" >&6; }
26843          fi # end check jdk version
26844        fi # end check javac
26845      fi # end check java
26846    fi # end check boot jdk found
26847  fi
26848
26849
26850  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26851
26852  if test "x$BOOT_JDK_FOUND" = xno; then
26853    # Now execute the test
26854
26855  # Extract the first word of "javac", so it can be a program name with args.
26856set dummy javac; ac_word=$2
26857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26858$as_echo_n "checking for $ac_word... " >&6; }
26859if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26860  $as_echo_n "(cached) " >&6
26861else
26862  case $JAVAC_CHECK in
26863  [\\/]* | ?:[\\/]*)
26864  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26865  ;;
26866  *)
26867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26868for as_dir in $PATH
26869do
26870  IFS=$as_save_IFS
26871  test -z "$as_dir" && as_dir=.
26872    for ac_exec_ext in '' $ac_executable_extensions; do
26873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26874    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26876    break 2
26877  fi
26878done
26879  done
26880IFS=$as_save_IFS
26881
26882  ;;
26883esac
26884fi
26885JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26886if test -n "$JAVAC_CHECK"; then
26887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26888$as_echo "$JAVAC_CHECK" >&6; }
26889else
26890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26891$as_echo "no" >&6; }
26892fi
26893
26894
26895  # Extract the first word of "java", so it can be a program name with args.
26896set dummy java; ac_word=$2
26897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26898$as_echo_n "checking for $ac_word... " >&6; }
26899if ${ac_cv_path_JAVA_CHECK+:} false; then :
26900  $as_echo_n "(cached) " >&6
26901else
26902  case $JAVA_CHECK in
26903  [\\/]* | ?:[\\/]*)
26904  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26905  ;;
26906  *)
26907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26908for as_dir in $PATH
26909do
26910  IFS=$as_save_IFS
26911  test -z "$as_dir" && as_dir=.
26912    for ac_exec_ext in '' $ac_executable_extensions; do
26913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26914    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26916    break 2
26917  fi
26918done
26919  done
26920IFS=$as_save_IFS
26921
26922  ;;
26923esac
26924fi
26925JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26926if test -n "$JAVA_CHECK"; then
26927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26928$as_echo "$JAVA_CHECK" >&6; }
26929else
26930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26931$as_echo "no" >&6; }
26932fi
26933
26934
26935  BINARY="$JAVAC_CHECK"
26936  if test "x$JAVAC_CHECK" = x; then
26937    BINARY="$JAVA_CHECK"
26938  fi
26939  if test "x$BINARY" != x; then
26940    # So there is a java(c) binary, it might be part of a JDK.
26941    # Lets find the JDK/JRE directory by following symbolic links.
26942    # Linux/GNU systems often have links from /usr/bin/java to
26943    # /etc/alternatives/java to the real JDK binary.
26944
26945  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26946    # Follow a chain of symbolic links. Use readlink
26947    # where it exists, else fall back to horribly
26948    # complicated shell code.
26949    if test "x$READLINK_TESTED" != yes; then
26950      # On MacOSX there is a readlink tool with a different
26951      # purpose than the GNU readlink tool. Check the found readlink.
26952      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26953      if test "x$ISGNU" = x; then
26954        # A readlink that we do not know how to use.
26955        # Are there other non-GNU readlinks out there?
26956        READLINK_TESTED=yes
26957        READLINK=
26958      fi
26959    fi
26960
26961    if test "x$READLINK" != x; then
26962      BINARY=`$READLINK -f $BINARY`
26963    else
26964      # Save the current directory for restoring afterwards
26965      STARTDIR=$PWD
26966      COUNTER=0
26967      sym_link_dir=`$DIRNAME $BINARY`
26968      sym_link_file=`$BASENAME $BINARY`
26969      cd $sym_link_dir
26970      # Use -P flag to resolve symlinks in directories.
26971      cd `$THEPWDCMD -P`
26972      sym_link_dir=`$THEPWDCMD -P`
26973      # Resolve file symlinks
26974      while test $COUNTER -lt 20; do
26975        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26976        if test "x$ISLINK" == x; then
26977          # This is not a symbolic link! We are done!
26978          break
26979        fi
26980        # Again resolve directory symlinks since the target of the just found
26981        # link could be in a different directory
26982        cd `$DIRNAME $ISLINK`
26983        sym_link_dir=`$THEPWDCMD -P`
26984        sym_link_file=`$BASENAME $ISLINK`
26985        let COUNTER=COUNTER+1
26986      done
26987      cd $STARTDIR
26988      BINARY=$sym_link_dir/$sym_link_file
26989    fi
26990  fi
26991
26992    BOOT_JDK=`dirname "$BINARY"`
26993    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26994    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26995      # Looks like we found ourselves an JDK
26996      BOOT_JDK_FOUND=maybe
26997      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26998$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26999    fi
27000  fi
27001
27002
27003    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27004    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27005      # Do we have a bin/java?
27006      if test ! -x "$BOOT_JDK/bin/java"; then
27007        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27009        BOOT_JDK_FOUND=no
27010      else
27011        # Do we have a bin/javac?
27012        if test ! -x "$BOOT_JDK/bin/javac"; then
27013          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27015          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27016$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27017          BOOT_JDK_FOUND=no
27018        else
27019          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27020          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27021
27022          # Extra M4 quote needed to protect [] in grep expression.
27023          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27024          if test "x$FOUND_CORRECT_VERSION" = x; then
27025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27027            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27028$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27029            BOOT_JDK_FOUND=no
27030          else
27031            # We're done! :-)
27032            BOOT_JDK_FOUND=yes
27033
27034  # Only process if variable expands to non-empty
27035
27036  if test "x$BOOT_JDK" != x; then
27037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27038
27039  # Input might be given as Windows format, start by converting to
27040  # unix format.
27041  path="$BOOT_JDK"
27042  new_path=`$CYGPATH -u "$path"`
27043
27044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27047  # "foo.exe" is OK but "foo" is an error.
27048  #
27049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27050  # It is also a way to make sure we got the proper file name for the real test later on.
27051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27052  if test "x$test_shortpath" = x; then
27053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27055    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27056  fi
27057
27058  # Call helper function which possibly converts this using DOS-style short mode.
27059  # If so, the updated path is stored in $new_path.
27060
27061  input_path="$new_path"
27062  # Check if we need to convert this using DOS-style short mode. If the path
27063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27064  # take no chances and rewrite it.
27065  # Note: m4 eats our [], so we need to use [ and ] instead.
27066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27067  if test "x$has_forbidden_chars" != x; then
27068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27072      # Going to short mode and back again did indeed matter. Since short mode is
27073      # case insensitive, let's make it lowercase to improve readability.
27074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27075      # Now convert it back to Unix-style (cygpath)
27076      input_path=`$CYGPATH -u "$shortmode_path"`
27077      new_path="$input_path"
27078    fi
27079  fi
27080
27081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27082  if test "x$test_cygdrive_prefix" = x; then
27083    # As a simple fix, exclude /usr/bin since it's not a real path.
27084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27086      # a path prefixed by /cygdrive for fixpath to work.
27087      new_path="$CYGWIN_ROOT_PATH$input_path"
27088    fi
27089  fi
27090
27091
27092  if test "x$path" != "x$new_path"; then
27093    BOOT_JDK="$new_path"
27094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27096  fi
27097
27098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099
27100  path="$BOOT_JDK"
27101  has_colon=`$ECHO $path | $GREP ^.:`
27102  new_path="$path"
27103  if test "x$has_colon" = x; then
27104    # Not in mixed or Windows style, start by that.
27105    new_path=`cmd //c echo $path`
27106  fi
27107
27108
27109  input_path="$new_path"
27110  # Check if we need to convert this using DOS-style short mode. If the path
27111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27112  # take no chances and rewrite it.
27113  # Note: m4 eats our [], so we need to use [ and ] instead.
27114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27115  if test "x$has_forbidden_chars" != x; then
27116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27118  fi
27119
27120
27121  windows_path="$new_path"
27122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27123    unix_path=`$CYGPATH -u "$windows_path"`
27124    new_path="$unix_path"
27125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27127    new_path="$unix_path"
27128  fi
27129
27130  if test "x$path" != "x$new_path"; then
27131    BOOT_JDK="$new_path"
27132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27134  fi
27135
27136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27138
27139    else
27140      # We're on a unix platform. Hooray! :)
27141      path="$BOOT_JDK"
27142      has_space=`$ECHO "$path" | $GREP " "`
27143      if test "x$has_space" != x; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27147      fi
27148
27149      # Use eval to expand a potential ~
27150      eval path="$path"
27151      if test ! -f "$path" && test ! -d "$path"; then
27152        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27153      fi
27154
27155      if test -d "$path"; then
27156        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27157      else
27158        dir="`$DIRNAME "$path"`"
27159        base="`$BASENAME "$path"`"
27160        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27161      fi
27162    fi
27163  fi
27164
27165            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27166$as_echo_n "checking for Boot JDK... " >&6; }
27167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27168$as_echo "$BOOT_JDK" >&6; }
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27170$as_echo_n "checking Boot JDK version... " >&6; }
27171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27173$as_echo "$BOOT_JDK_VERSION" >&6; }
27174          fi # end check jdk version
27175        fi # end check javac
27176      fi # end check java
27177    fi # end check boot jdk found
27178  fi
27179
27180
27181  # Test: Is there a JDK installed in default, well-known locations?
27182
27183  if test "x$BOOT_JDK_FOUND" = xno; then
27184    # Now execute the test
27185
27186  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27187
27188  if test "x$BOOT_JDK_FOUND" = xno; then
27189    # Now execute the test
27190
27191  if test "x$ProgramW6432" != x; then
27192    VIRTUAL_DIR="$ProgramW6432/Java"
27193
27194  windows_path="$VIRTUAL_DIR"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    unix_path=`$CYGPATH -u "$windows_path"`
27197    VIRTUAL_DIR="$unix_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200    VIRTUAL_DIR="$unix_path"
27201  fi
27202
27203
27204  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27205  BOOT_JDK_SUFFIX=""
27206  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27207  if test "x$ALL_JDKS_FOUND" != x; then
27208    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27209
27210  if test "x$BOOT_JDK_FOUND" = xno; then
27211    # Now execute the test
27212
27213        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27214        if test -d "$BOOT_JDK"; then
27215          BOOT_JDK_FOUND=maybe
27216          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27217$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27218        fi
27219
27220
27221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27223      # Do we have a bin/java?
27224      if test ! -x "$BOOT_JDK/bin/java"; then
27225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27227        BOOT_JDK_FOUND=no
27228      else
27229        # Do we have a bin/javac?
27230        if test ! -x "$BOOT_JDK/bin/javac"; then
27231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27235          BOOT_JDK_FOUND=no
27236        else
27237          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27238          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27239
27240          # Extra M4 quote needed to protect [] in grep expression.
27241          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27242          if test "x$FOUND_CORRECT_VERSION" = x; then
27243            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27245            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27246$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27247            BOOT_JDK_FOUND=no
27248          else
27249            # We're done! :-)
27250            BOOT_JDK_FOUND=yes
27251
27252  # Only process if variable expands to non-empty
27253
27254  if test "x$BOOT_JDK" != x; then
27255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27256
27257  # Input might be given as Windows format, start by converting to
27258  # unix format.
27259  path="$BOOT_JDK"
27260  new_path=`$CYGPATH -u "$path"`
27261
27262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27265  # "foo.exe" is OK but "foo" is an error.
27266  #
27267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27268  # It is also a way to make sure we got the proper file name for the real test later on.
27269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27270  if test "x$test_shortpath" = x; then
27271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27274  fi
27275
27276  # Call helper function which possibly converts this using DOS-style short mode.
27277  # If so, the updated path is stored in $new_path.
27278
27279  input_path="$new_path"
27280  # Check if we need to convert this using DOS-style short mode. If the path
27281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27282  # take no chances and rewrite it.
27283  # Note: m4 eats our [], so we need to use [ and ] instead.
27284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27285  if test "x$has_forbidden_chars" != x; then
27286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27290      # Going to short mode and back again did indeed matter. Since short mode is
27291      # case insensitive, let's make it lowercase to improve readability.
27292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27293      # Now convert it back to Unix-style (cygpath)
27294      input_path=`$CYGPATH -u "$shortmode_path"`
27295      new_path="$input_path"
27296    fi
27297  fi
27298
27299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27300  if test "x$test_cygdrive_prefix" = x; then
27301    # As a simple fix, exclude /usr/bin since it's not a real path.
27302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27304      # a path prefixed by /cygdrive for fixpath to work.
27305      new_path="$CYGWIN_ROOT_PATH$input_path"
27306    fi
27307  fi
27308
27309
27310  if test "x$path" != "x$new_path"; then
27311    BOOT_JDK="$new_path"
27312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27314  fi
27315
27316    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317
27318  path="$BOOT_JDK"
27319  has_colon=`$ECHO $path | $GREP ^.:`
27320  new_path="$path"
27321  if test "x$has_colon" = x; then
27322    # Not in mixed or Windows style, start by that.
27323    new_path=`cmd //c echo $path`
27324  fi
27325
27326
27327  input_path="$new_path"
27328  # Check if we need to convert this using DOS-style short mode. If the path
27329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27330  # take no chances and rewrite it.
27331  # Note: m4 eats our [], so we need to use [ and ] instead.
27332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27333  if test "x$has_forbidden_chars" != x; then
27334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27336  fi
27337
27338
27339  windows_path="$new_path"
27340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27341    unix_path=`$CYGPATH -u "$windows_path"`
27342    new_path="$unix_path"
27343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27345    new_path="$unix_path"
27346  fi
27347
27348  if test "x$path" != "x$new_path"; then
27349    BOOT_JDK="$new_path"
27350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27352  fi
27353
27354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27356
27357    else
27358      # We're on a unix platform. Hooray! :)
27359      path="$BOOT_JDK"
27360      has_space=`$ECHO "$path" | $GREP " "`
27361      if test "x$has_space" != x; then
27362        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27364        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27365      fi
27366
27367      # Use eval to expand a potential ~
27368      eval path="$path"
27369      if test ! -f "$path" && test ! -d "$path"; then
27370        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27371      fi
27372
27373      if test -d "$path"; then
27374        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27375      else
27376        dir="`$DIRNAME "$path"`"
27377        base="`$BASENAME "$path"`"
27378        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27379      fi
27380    fi
27381  fi
27382
27383            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27384$as_echo_n "checking for Boot JDK... " >&6; }
27385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27386$as_echo "$BOOT_JDK" >&6; }
27387            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27388$as_echo_n "checking Boot JDK version... " >&6; }
27389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27391$as_echo "$BOOT_JDK_VERSION" >&6; }
27392          fi # end check jdk version
27393        fi # end check javac
27394      fi # end check java
27395    fi # end check boot jdk found
27396  fi
27397
27398    done
27399  fi
27400
27401  fi
27402
27403
27404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27406      # Do we have a bin/java?
27407      if test ! -x "$BOOT_JDK/bin/java"; then
27408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27410        BOOT_JDK_FOUND=no
27411      else
27412        # Do we have a bin/javac?
27413        if test ! -x "$BOOT_JDK/bin/javac"; then
27414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27418          BOOT_JDK_FOUND=no
27419        else
27420          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27421          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27422
27423          # Extra M4 quote needed to protect [] in grep expression.
27424          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27425          if test "x$FOUND_CORRECT_VERSION" = x; then
27426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27428            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27429$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27430            BOOT_JDK_FOUND=no
27431          else
27432            # We're done! :-)
27433            BOOT_JDK_FOUND=yes
27434
27435  # Only process if variable expands to non-empty
27436
27437  if test "x$BOOT_JDK" != x; then
27438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27439
27440  # Input might be given as Windows format, start by converting to
27441  # unix format.
27442  path="$BOOT_JDK"
27443  new_path=`$CYGPATH -u "$path"`
27444
27445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27448  # "foo.exe" is OK but "foo" is an error.
27449  #
27450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27451  # It is also a way to make sure we got the proper file name for the real test later on.
27452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27453  if test "x$test_shortpath" = x; then
27454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27456    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27457  fi
27458
27459  # Call helper function which possibly converts this using DOS-style short mode.
27460  # If so, the updated path is stored in $new_path.
27461
27462  input_path="$new_path"
27463  # Check if we need to convert this using DOS-style short mode. If the path
27464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27465  # take no chances and rewrite it.
27466  # Note: m4 eats our [], so we need to use [ and ] instead.
27467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27468  if test "x$has_forbidden_chars" != x; then
27469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27473      # Going to short mode and back again did indeed matter. Since short mode is
27474      # case insensitive, let's make it lowercase to improve readability.
27475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27476      # Now convert it back to Unix-style (cygpath)
27477      input_path=`$CYGPATH -u "$shortmode_path"`
27478      new_path="$input_path"
27479    fi
27480  fi
27481
27482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27483  if test "x$test_cygdrive_prefix" = x; then
27484    # As a simple fix, exclude /usr/bin since it's not a real path.
27485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27487      # a path prefixed by /cygdrive for fixpath to work.
27488      new_path="$CYGWIN_ROOT_PATH$input_path"
27489    fi
27490  fi
27491
27492
27493  if test "x$path" != "x$new_path"; then
27494    BOOT_JDK="$new_path"
27495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27497  fi
27498
27499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27500
27501  path="$BOOT_JDK"
27502  has_colon=`$ECHO $path | $GREP ^.:`
27503  new_path="$path"
27504  if test "x$has_colon" = x; then
27505    # Not in mixed or Windows style, start by that.
27506    new_path=`cmd //c echo $path`
27507  fi
27508
27509
27510  input_path="$new_path"
27511  # Check if we need to convert this using DOS-style short mode. If the path
27512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27513  # take no chances and rewrite it.
27514  # Note: m4 eats our [], so we need to use [ and ] instead.
27515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27516  if test "x$has_forbidden_chars" != x; then
27517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27519  fi
27520
27521
27522  windows_path="$new_path"
27523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27524    unix_path=`$CYGPATH -u "$windows_path"`
27525    new_path="$unix_path"
27526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27528    new_path="$unix_path"
27529  fi
27530
27531  if test "x$path" != "x$new_path"; then
27532    BOOT_JDK="$new_path"
27533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27535  fi
27536
27537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27539
27540    else
27541      # We're on a unix platform. Hooray! :)
27542      path="$BOOT_JDK"
27543      has_space=`$ECHO "$path" | $GREP " "`
27544      if test "x$has_space" != x; then
27545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27548      fi
27549
27550      # Use eval to expand a potential ~
27551      eval path="$path"
27552      if test ! -f "$path" && test ! -d "$path"; then
27553        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27554      fi
27555
27556      if test -d "$path"; then
27557        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27558      else
27559        dir="`$DIRNAME "$path"`"
27560        base="`$BASENAME "$path"`"
27561        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27562      fi
27563    fi
27564  fi
27565
27566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27567$as_echo_n "checking for Boot JDK... " >&6; }
27568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27569$as_echo "$BOOT_JDK" >&6; }
27570            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27571$as_echo_n "checking Boot JDK version... " >&6; }
27572            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27574$as_echo "$BOOT_JDK_VERSION" >&6; }
27575          fi # end check jdk version
27576        fi # end check javac
27577      fi # end check java
27578    fi # end check boot jdk found
27579  fi
27580
27581
27582  if test "x$BOOT_JDK_FOUND" = xno; then
27583    # Now execute the test
27584
27585  if test "x$PROGRAMW6432" != x; then
27586    VIRTUAL_DIR="$PROGRAMW6432/Java"
27587
27588  windows_path="$VIRTUAL_DIR"
27589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590    unix_path=`$CYGPATH -u "$windows_path"`
27591    VIRTUAL_DIR="$unix_path"
27592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27594    VIRTUAL_DIR="$unix_path"
27595  fi
27596
27597
27598  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27599  BOOT_JDK_SUFFIX=""
27600  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27601  if test "x$ALL_JDKS_FOUND" != x; then
27602    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27603
27604  if test "x$BOOT_JDK_FOUND" = xno; then
27605    # Now execute the test
27606
27607        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27608        if test -d "$BOOT_JDK"; then
27609          BOOT_JDK_FOUND=maybe
27610          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27611$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27612        fi
27613
27614
27615    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27616    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27617      # Do we have a bin/java?
27618      if test ! -x "$BOOT_JDK/bin/java"; then
27619        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27621        BOOT_JDK_FOUND=no
27622      else
27623        # Do we have a bin/javac?
27624        if test ! -x "$BOOT_JDK/bin/javac"; then
27625          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27627          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27628$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27629          BOOT_JDK_FOUND=no
27630        else
27631          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27632          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27633
27634          # Extra M4 quote needed to protect [] in grep expression.
27635          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27636          if test "x$FOUND_CORRECT_VERSION" = x; then
27637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27639            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27640$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27641            BOOT_JDK_FOUND=no
27642          else
27643            # We're done! :-)
27644            BOOT_JDK_FOUND=yes
27645
27646  # Only process if variable expands to non-empty
27647
27648  if test "x$BOOT_JDK" != x; then
27649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27650
27651  # Input might be given as Windows format, start by converting to
27652  # unix format.
27653  path="$BOOT_JDK"
27654  new_path=`$CYGPATH -u "$path"`
27655
27656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27659  # "foo.exe" is OK but "foo" is an error.
27660  #
27661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27662  # It is also a way to make sure we got the proper file name for the real test later on.
27663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27664  if test "x$test_shortpath" = x; then
27665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27668  fi
27669
27670  # Call helper function which possibly converts this using DOS-style short mode.
27671  # If so, the updated path is stored in $new_path.
27672
27673  input_path="$new_path"
27674  # Check if we need to convert this using DOS-style short mode. If the path
27675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27676  # take no chances and rewrite it.
27677  # Note: m4 eats our [], so we need to use [ and ] instead.
27678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27679  if test "x$has_forbidden_chars" != x; then
27680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27684      # Going to short mode and back again did indeed matter. Since short mode is
27685      # case insensitive, let's make it lowercase to improve readability.
27686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27687      # Now convert it back to Unix-style (cygpath)
27688      input_path=`$CYGPATH -u "$shortmode_path"`
27689      new_path="$input_path"
27690    fi
27691  fi
27692
27693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27694  if test "x$test_cygdrive_prefix" = x; then
27695    # As a simple fix, exclude /usr/bin since it's not a real path.
27696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27698      # a path prefixed by /cygdrive for fixpath to work.
27699      new_path="$CYGWIN_ROOT_PATH$input_path"
27700    fi
27701  fi
27702
27703
27704  if test "x$path" != "x$new_path"; then
27705    BOOT_JDK="$new_path"
27706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27708  fi
27709
27710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711
27712  path="$BOOT_JDK"
27713  has_colon=`$ECHO $path | $GREP ^.:`
27714  new_path="$path"
27715  if test "x$has_colon" = x; then
27716    # Not in mixed or Windows style, start by that.
27717    new_path=`cmd //c echo $path`
27718  fi
27719
27720
27721  input_path="$new_path"
27722  # Check if we need to convert this using DOS-style short mode. If the path
27723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27724  # take no chances and rewrite it.
27725  # Note: m4 eats our [], so we need to use [ and ] instead.
27726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27727  if test "x$has_forbidden_chars" != x; then
27728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27730  fi
27731
27732
27733  windows_path="$new_path"
27734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27735    unix_path=`$CYGPATH -u "$windows_path"`
27736    new_path="$unix_path"
27737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27739    new_path="$unix_path"
27740  fi
27741
27742  if test "x$path" != "x$new_path"; then
27743    BOOT_JDK="$new_path"
27744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27746  fi
27747
27748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27750
27751    else
27752      # We're on a unix platform. Hooray! :)
27753      path="$BOOT_JDK"
27754      has_space=`$ECHO "$path" | $GREP " "`
27755      if test "x$has_space" != x; then
27756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27759      fi
27760
27761      # Use eval to expand a potential ~
27762      eval path="$path"
27763      if test ! -f "$path" && test ! -d "$path"; then
27764        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27765      fi
27766
27767      if test -d "$path"; then
27768        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27769      else
27770        dir="`$DIRNAME "$path"`"
27771        base="`$BASENAME "$path"`"
27772        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27773      fi
27774    fi
27775  fi
27776
27777            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27778$as_echo_n "checking for Boot JDK... " >&6; }
27779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27780$as_echo "$BOOT_JDK" >&6; }
27781            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27782$as_echo_n "checking Boot JDK version... " >&6; }
27783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27785$as_echo "$BOOT_JDK_VERSION" >&6; }
27786          fi # end check jdk version
27787        fi # end check javac
27788      fi # end check java
27789    fi # end check boot jdk found
27790  fi
27791
27792    done
27793  fi
27794
27795  fi
27796
27797
27798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27800      # Do we have a bin/java?
27801      if test ! -x "$BOOT_JDK/bin/java"; then
27802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27804        BOOT_JDK_FOUND=no
27805      else
27806        # Do we have a bin/javac?
27807        if test ! -x "$BOOT_JDK/bin/javac"; then
27808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27812          BOOT_JDK_FOUND=no
27813        else
27814          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27815          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27816
27817          # Extra M4 quote needed to protect [] in grep expression.
27818          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27819          if test "x$FOUND_CORRECT_VERSION" = x; then
27820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27822            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27823$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27824            BOOT_JDK_FOUND=no
27825          else
27826            # We're done! :-)
27827            BOOT_JDK_FOUND=yes
27828
27829  # Only process if variable expands to non-empty
27830
27831  if test "x$BOOT_JDK" != x; then
27832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27833
27834  # Input might be given as Windows format, start by converting to
27835  # unix format.
27836  path="$BOOT_JDK"
27837  new_path=`$CYGPATH -u "$path"`
27838
27839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27842  # "foo.exe" is OK but "foo" is an error.
27843  #
27844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27845  # It is also a way to make sure we got the proper file name for the real test later on.
27846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27847  if test "x$test_shortpath" = x; then
27848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27851  fi
27852
27853  # Call helper function which possibly converts this using DOS-style short mode.
27854  # If so, the updated path is stored in $new_path.
27855
27856  input_path="$new_path"
27857  # Check if we need to convert this using DOS-style short mode. If the path
27858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27859  # take no chances and rewrite it.
27860  # Note: m4 eats our [], so we need to use [ and ] instead.
27861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27862  if test "x$has_forbidden_chars" != x; then
27863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27867      # Going to short mode and back again did indeed matter. Since short mode is
27868      # case insensitive, let's make it lowercase to improve readability.
27869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27870      # Now convert it back to Unix-style (cygpath)
27871      input_path=`$CYGPATH -u "$shortmode_path"`
27872      new_path="$input_path"
27873    fi
27874  fi
27875
27876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27877  if test "x$test_cygdrive_prefix" = x; then
27878    # As a simple fix, exclude /usr/bin since it's not a real path.
27879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27881      # a path prefixed by /cygdrive for fixpath to work.
27882      new_path="$CYGWIN_ROOT_PATH$input_path"
27883    fi
27884  fi
27885
27886
27887  if test "x$path" != "x$new_path"; then
27888    BOOT_JDK="$new_path"
27889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27891  fi
27892
27893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27894
27895  path="$BOOT_JDK"
27896  has_colon=`$ECHO $path | $GREP ^.:`
27897  new_path="$path"
27898  if test "x$has_colon" = x; then
27899    # Not in mixed or Windows style, start by that.
27900    new_path=`cmd //c echo $path`
27901  fi
27902
27903
27904  input_path="$new_path"
27905  # Check if we need to convert this using DOS-style short mode. If the path
27906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27907  # take no chances and rewrite it.
27908  # Note: m4 eats our [], so we need to use [ and ] instead.
27909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27910  if test "x$has_forbidden_chars" != x; then
27911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27913  fi
27914
27915
27916  windows_path="$new_path"
27917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27918    unix_path=`$CYGPATH -u "$windows_path"`
27919    new_path="$unix_path"
27920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27922    new_path="$unix_path"
27923  fi
27924
27925  if test "x$path" != "x$new_path"; then
27926    BOOT_JDK="$new_path"
27927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27929  fi
27930
27931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27933
27934    else
27935      # We're on a unix platform. Hooray! :)
27936      path="$BOOT_JDK"
27937      has_space=`$ECHO "$path" | $GREP " "`
27938      if test "x$has_space" != x; then
27939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27942      fi
27943
27944      # Use eval to expand a potential ~
27945      eval path="$path"
27946      if test ! -f "$path" && test ! -d "$path"; then
27947        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27948      fi
27949
27950      if test -d "$path"; then
27951        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27952      else
27953        dir="`$DIRNAME "$path"`"
27954        base="`$BASENAME "$path"`"
27955        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27956      fi
27957    fi
27958  fi
27959
27960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27961$as_echo_n "checking for Boot JDK... " >&6; }
27962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27963$as_echo "$BOOT_JDK" >&6; }
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27965$as_echo_n "checking Boot JDK version... " >&6; }
27966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27968$as_echo "$BOOT_JDK_VERSION" >&6; }
27969          fi # end check jdk version
27970        fi # end check javac
27971      fi # end check java
27972    fi # end check boot jdk found
27973  fi
27974
27975
27976  if test "x$BOOT_JDK_FOUND" = xno; then
27977    # Now execute the test
27978
27979  if test "x$PROGRAMFILES" != x; then
27980    VIRTUAL_DIR="$PROGRAMFILES/Java"
27981
27982  windows_path="$VIRTUAL_DIR"
27983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27984    unix_path=`$CYGPATH -u "$windows_path"`
27985    VIRTUAL_DIR="$unix_path"
27986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27988    VIRTUAL_DIR="$unix_path"
27989  fi
27990
27991
27992  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27993  BOOT_JDK_SUFFIX=""
27994  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27995  if test "x$ALL_JDKS_FOUND" != x; then
27996    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27997
27998  if test "x$BOOT_JDK_FOUND" = xno; then
27999    # Now execute the test
28000
28001        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28002        if test -d "$BOOT_JDK"; then
28003          BOOT_JDK_FOUND=maybe
28004          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28005$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28006        fi
28007
28008
28009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28011      # Do we have a bin/java?
28012      if test ! -x "$BOOT_JDK/bin/java"; then
28013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28015        BOOT_JDK_FOUND=no
28016      else
28017        # Do we have a bin/javac?
28018        if test ! -x "$BOOT_JDK/bin/javac"; then
28019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28023          BOOT_JDK_FOUND=no
28024        else
28025          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28026          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28027
28028          # Extra M4 quote needed to protect [] in grep expression.
28029          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28030          if test "x$FOUND_CORRECT_VERSION" = x; then
28031            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28033            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28034$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28035            BOOT_JDK_FOUND=no
28036          else
28037            # We're done! :-)
28038            BOOT_JDK_FOUND=yes
28039
28040  # Only process if variable expands to non-empty
28041
28042  if test "x$BOOT_JDK" != x; then
28043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28044
28045  # Input might be given as Windows format, start by converting to
28046  # unix format.
28047  path="$BOOT_JDK"
28048  new_path=`$CYGPATH -u "$path"`
28049
28050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28053  # "foo.exe" is OK but "foo" is an error.
28054  #
28055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28056  # It is also a way to make sure we got the proper file name for the real test later on.
28057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28058  if test "x$test_shortpath" = x; then
28059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28062  fi
28063
28064  # Call helper function which possibly converts this using DOS-style short mode.
28065  # If so, the updated path is stored in $new_path.
28066
28067  input_path="$new_path"
28068  # Check if we need to convert this using DOS-style short mode. If the path
28069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28070  # take no chances and rewrite it.
28071  # Note: m4 eats our [], so we need to use [ and ] instead.
28072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28073  if test "x$has_forbidden_chars" != x; then
28074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28078      # Going to short mode and back again did indeed matter. Since short mode is
28079      # case insensitive, let's make it lowercase to improve readability.
28080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28081      # Now convert it back to Unix-style (cygpath)
28082      input_path=`$CYGPATH -u "$shortmode_path"`
28083      new_path="$input_path"
28084    fi
28085  fi
28086
28087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28088  if test "x$test_cygdrive_prefix" = x; then
28089    # As a simple fix, exclude /usr/bin since it's not a real path.
28090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28092      # a path prefixed by /cygdrive for fixpath to work.
28093      new_path="$CYGWIN_ROOT_PATH$input_path"
28094    fi
28095  fi
28096
28097
28098  if test "x$path" != "x$new_path"; then
28099    BOOT_JDK="$new_path"
28100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28102  fi
28103
28104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28105
28106  path="$BOOT_JDK"
28107  has_colon=`$ECHO $path | $GREP ^.:`
28108  new_path="$path"
28109  if test "x$has_colon" = x; then
28110    # Not in mixed or Windows style, start by that.
28111    new_path=`cmd //c echo $path`
28112  fi
28113
28114
28115  input_path="$new_path"
28116  # Check if we need to convert this using DOS-style short mode. If the path
28117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28118  # take no chances and rewrite it.
28119  # Note: m4 eats our [], so we need to use [ and ] instead.
28120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28121  if test "x$has_forbidden_chars" != x; then
28122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28124  fi
28125
28126
28127  windows_path="$new_path"
28128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28129    unix_path=`$CYGPATH -u "$windows_path"`
28130    new_path="$unix_path"
28131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28133    new_path="$unix_path"
28134  fi
28135
28136  if test "x$path" != "x$new_path"; then
28137    BOOT_JDK="$new_path"
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28140  fi
28141
28142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28144
28145    else
28146      # We're on a unix platform. Hooray! :)
28147      path="$BOOT_JDK"
28148      has_space=`$ECHO "$path" | $GREP " "`
28149      if test "x$has_space" != x; then
28150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28153      fi
28154
28155      # Use eval to expand a potential ~
28156      eval path="$path"
28157      if test ! -f "$path" && test ! -d "$path"; then
28158        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28159      fi
28160
28161      if test -d "$path"; then
28162        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28163      else
28164        dir="`$DIRNAME "$path"`"
28165        base="`$BASENAME "$path"`"
28166        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28167      fi
28168    fi
28169  fi
28170
28171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28172$as_echo_n "checking for Boot JDK... " >&6; }
28173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28174$as_echo "$BOOT_JDK" >&6; }
28175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28176$as_echo_n "checking Boot JDK version... " >&6; }
28177            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28179$as_echo "$BOOT_JDK_VERSION" >&6; }
28180          fi # end check jdk version
28181        fi # end check javac
28182      fi # end check java
28183    fi # end check boot jdk found
28184  fi
28185
28186    done
28187  fi
28188
28189  fi
28190
28191
28192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28194      # Do we have a bin/java?
28195      if test ! -x "$BOOT_JDK/bin/java"; then
28196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28198        BOOT_JDK_FOUND=no
28199      else
28200        # Do we have a bin/javac?
28201        if test ! -x "$BOOT_JDK/bin/javac"; then
28202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28206          BOOT_JDK_FOUND=no
28207        else
28208          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28209          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28210
28211          # Extra M4 quote needed to protect [] in grep expression.
28212          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28213          if test "x$FOUND_CORRECT_VERSION" = x; then
28214            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28216            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28217$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28218            BOOT_JDK_FOUND=no
28219          else
28220            # We're done! :-)
28221            BOOT_JDK_FOUND=yes
28222
28223  # Only process if variable expands to non-empty
28224
28225  if test "x$BOOT_JDK" != x; then
28226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28227
28228  # Input might be given as Windows format, start by converting to
28229  # unix format.
28230  path="$BOOT_JDK"
28231  new_path=`$CYGPATH -u "$path"`
28232
28233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28236  # "foo.exe" is OK but "foo" is an error.
28237  #
28238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28239  # It is also a way to make sure we got the proper file name for the real test later on.
28240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28241  if test "x$test_shortpath" = x; then
28242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28245  fi
28246
28247  # Call helper function which possibly converts this using DOS-style short mode.
28248  # If so, the updated path is stored in $new_path.
28249
28250  input_path="$new_path"
28251  # Check if we need to convert this using DOS-style short mode. If the path
28252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28253  # take no chances and rewrite it.
28254  # Note: m4 eats our [], so we need to use [ and ] instead.
28255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28256  if test "x$has_forbidden_chars" != x; then
28257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28261      # Going to short mode and back again did indeed matter. Since short mode is
28262      # case insensitive, let's make it lowercase to improve readability.
28263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28264      # Now convert it back to Unix-style (cygpath)
28265      input_path=`$CYGPATH -u "$shortmode_path"`
28266      new_path="$input_path"
28267    fi
28268  fi
28269
28270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28271  if test "x$test_cygdrive_prefix" = x; then
28272    # As a simple fix, exclude /usr/bin since it's not a real path.
28273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28275      # a path prefixed by /cygdrive for fixpath to work.
28276      new_path="$CYGWIN_ROOT_PATH$input_path"
28277    fi
28278  fi
28279
28280
28281  if test "x$path" != "x$new_path"; then
28282    BOOT_JDK="$new_path"
28283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28285  fi
28286
28287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28288
28289  path="$BOOT_JDK"
28290  has_colon=`$ECHO $path | $GREP ^.:`
28291  new_path="$path"
28292  if test "x$has_colon" = x; then
28293    # Not in mixed or Windows style, start by that.
28294    new_path=`cmd //c echo $path`
28295  fi
28296
28297
28298  input_path="$new_path"
28299  # Check if we need to convert this using DOS-style short mode. If the path
28300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28301  # take no chances and rewrite it.
28302  # Note: m4 eats our [], so we need to use [ and ] instead.
28303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28304  if test "x$has_forbidden_chars" != x; then
28305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28307  fi
28308
28309
28310  windows_path="$new_path"
28311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28312    unix_path=`$CYGPATH -u "$windows_path"`
28313    new_path="$unix_path"
28314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28316    new_path="$unix_path"
28317  fi
28318
28319  if test "x$path" != "x$new_path"; then
28320    BOOT_JDK="$new_path"
28321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28323  fi
28324
28325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28327
28328    else
28329      # We're on a unix platform. Hooray! :)
28330      path="$BOOT_JDK"
28331      has_space=`$ECHO "$path" | $GREP " "`
28332      if test "x$has_space" != x; then
28333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28336      fi
28337
28338      # Use eval to expand a potential ~
28339      eval path="$path"
28340      if test ! -f "$path" && test ! -d "$path"; then
28341        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28342      fi
28343
28344      if test -d "$path"; then
28345        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28346      else
28347        dir="`$DIRNAME "$path"`"
28348        base="`$BASENAME "$path"`"
28349        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28350      fi
28351    fi
28352  fi
28353
28354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28355$as_echo_n "checking for Boot JDK... " >&6; }
28356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28357$as_echo "$BOOT_JDK" >&6; }
28358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28359$as_echo_n "checking Boot JDK version... " >&6; }
28360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28362$as_echo "$BOOT_JDK_VERSION" >&6; }
28363          fi # end check jdk version
28364        fi # end check javac
28365      fi # end check java
28366    fi # end check boot jdk found
28367  fi
28368
28369
28370  if test "x$BOOT_JDK_FOUND" = xno; then
28371    # Now execute the test
28372
28373  if test "x$ProgramFiles" != x; then
28374    VIRTUAL_DIR="$ProgramFiles/Java"
28375
28376  windows_path="$VIRTUAL_DIR"
28377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28378    unix_path=`$CYGPATH -u "$windows_path"`
28379    VIRTUAL_DIR="$unix_path"
28380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28382    VIRTUAL_DIR="$unix_path"
28383  fi
28384
28385
28386  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28387  BOOT_JDK_SUFFIX=""
28388  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28389  if test "x$ALL_JDKS_FOUND" != x; then
28390    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28391
28392  if test "x$BOOT_JDK_FOUND" = xno; then
28393    # Now execute the test
28394
28395        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28396        if test -d "$BOOT_JDK"; then
28397          BOOT_JDK_FOUND=maybe
28398          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28399$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28400        fi
28401
28402
28403    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28404    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28405      # Do we have a bin/java?
28406      if test ! -x "$BOOT_JDK/bin/java"; then
28407        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28409        BOOT_JDK_FOUND=no
28410      else
28411        # Do we have a bin/javac?
28412        if test ! -x "$BOOT_JDK/bin/javac"; then
28413          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28415          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28416$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28417          BOOT_JDK_FOUND=no
28418        else
28419          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28420          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28421
28422          # Extra M4 quote needed to protect [] in grep expression.
28423          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28424          if test "x$FOUND_CORRECT_VERSION" = x; then
28425            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28427            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28429            BOOT_JDK_FOUND=no
28430          else
28431            # We're done! :-)
28432            BOOT_JDK_FOUND=yes
28433
28434  # Only process if variable expands to non-empty
28435
28436  if test "x$BOOT_JDK" != x; then
28437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28438
28439  # Input might be given as Windows format, start by converting to
28440  # unix format.
28441  path="$BOOT_JDK"
28442  new_path=`$CYGPATH -u "$path"`
28443
28444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28447  # "foo.exe" is OK but "foo" is an error.
28448  #
28449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28450  # It is also a way to make sure we got the proper file name for the real test later on.
28451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28452  if test "x$test_shortpath" = x; then
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28455    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28456  fi
28457
28458  # Call helper function which possibly converts this using DOS-style short mode.
28459  # If so, the updated path is stored in $new_path.
28460
28461  input_path="$new_path"
28462  # Check if we need to convert this using DOS-style short mode. If the path
28463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28464  # take no chances and rewrite it.
28465  # Note: m4 eats our [], so we need to use [ and ] instead.
28466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28467  if test "x$has_forbidden_chars" != x; then
28468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28472      # Going to short mode and back again did indeed matter. Since short mode is
28473      # case insensitive, let's make it lowercase to improve readability.
28474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28475      # Now convert it back to Unix-style (cygpath)
28476      input_path=`$CYGPATH -u "$shortmode_path"`
28477      new_path="$input_path"
28478    fi
28479  fi
28480
28481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28482  if test "x$test_cygdrive_prefix" = x; then
28483    # As a simple fix, exclude /usr/bin since it's not a real path.
28484    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28486      # a path prefixed by /cygdrive for fixpath to work.
28487      new_path="$CYGWIN_ROOT_PATH$input_path"
28488    fi
28489  fi
28490
28491
28492  if test "x$path" != "x$new_path"; then
28493    BOOT_JDK="$new_path"
28494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28496  fi
28497
28498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28499
28500  path="$BOOT_JDK"
28501  has_colon=`$ECHO $path | $GREP ^.:`
28502  new_path="$path"
28503  if test "x$has_colon" = x; then
28504    # Not in mixed or Windows style, start by that.
28505    new_path=`cmd //c echo $path`
28506  fi
28507
28508
28509  input_path="$new_path"
28510  # Check if we need to convert this using DOS-style short mode. If the path
28511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28512  # take no chances and rewrite it.
28513  # Note: m4 eats our [], so we need to use [ and ] instead.
28514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28515  if test "x$has_forbidden_chars" != x; then
28516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28518  fi
28519
28520
28521  windows_path="$new_path"
28522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28523    unix_path=`$CYGPATH -u "$windows_path"`
28524    new_path="$unix_path"
28525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28527    new_path="$unix_path"
28528  fi
28529
28530  if test "x$path" != "x$new_path"; then
28531    BOOT_JDK="$new_path"
28532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28534  fi
28535
28536  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28537  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28538
28539    else
28540      # We're on a unix platform. Hooray! :)
28541      path="$BOOT_JDK"
28542      has_space=`$ECHO "$path" | $GREP " "`
28543      if test "x$has_space" != x; then
28544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28546        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28547      fi
28548
28549      # Use eval to expand a potential ~
28550      eval path="$path"
28551      if test ! -f "$path" && test ! -d "$path"; then
28552        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28553      fi
28554
28555      if test -d "$path"; then
28556        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28557      else
28558        dir="`$DIRNAME "$path"`"
28559        base="`$BASENAME "$path"`"
28560        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28561      fi
28562    fi
28563  fi
28564
28565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28566$as_echo_n "checking for Boot JDK... " >&6; }
28567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28568$as_echo "$BOOT_JDK" >&6; }
28569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28570$as_echo_n "checking Boot JDK version... " >&6; }
28571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28573$as_echo "$BOOT_JDK_VERSION" >&6; }
28574          fi # end check jdk version
28575        fi # end check javac
28576      fi # end check java
28577    fi # end check boot jdk found
28578  fi
28579
28580    done
28581  fi
28582
28583  fi
28584
28585
28586    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28587    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28588      # Do we have a bin/java?
28589      if test ! -x "$BOOT_JDK/bin/java"; then
28590        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28592        BOOT_JDK_FOUND=no
28593      else
28594        # Do we have a bin/javac?
28595        if test ! -x "$BOOT_JDK/bin/javac"; then
28596          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28598          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28599$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28600          BOOT_JDK_FOUND=no
28601        else
28602          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28603          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28604
28605          # Extra M4 quote needed to protect [] in grep expression.
28606          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28607          if test "x$FOUND_CORRECT_VERSION" = x; then
28608            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28610            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28611$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28612            BOOT_JDK_FOUND=no
28613          else
28614            # We're done! :-)
28615            BOOT_JDK_FOUND=yes
28616
28617  # Only process if variable expands to non-empty
28618
28619  if test "x$BOOT_JDK" != x; then
28620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28621
28622  # Input might be given as Windows format, start by converting to
28623  # unix format.
28624  path="$BOOT_JDK"
28625  new_path=`$CYGPATH -u "$path"`
28626
28627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28630  # "foo.exe" is OK but "foo" is an error.
28631  #
28632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28633  # It is also a way to make sure we got the proper file name for the real test later on.
28634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28635  if test "x$test_shortpath" = x; then
28636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28639  fi
28640
28641  # Call helper function which possibly converts this using DOS-style short mode.
28642  # If so, the updated path is stored in $new_path.
28643
28644  input_path="$new_path"
28645  # Check if we need to convert this using DOS-style short mode. If the path
28646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28647  # take no chances and rewrite it.
28648  # Note: m4 eats our [], so we need to use [ and ] instead.
28649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28650  if test "x$has_forbidden_chars" != x; then
28651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28655      # Going to short mode and back again did indeed matter. Since short mode is
28656      # case insensitive, let's make it lowercase to improve readability.
28657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28658      # Now convert it back to Unix-style (cygpath)
28659      input_path=`$CYGPATH -u "$shortmode_path"`
28660      new_path="$input_path"
28661    fi
28662  fi
28663
28664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28665  if test "x$test_cygdrive_prefix" = x; then
28666    # As a simple fix, exclude /usr/bin since it's not a real path.
28667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28669      # a path prefixed by /cygdrive for fixpath to work.
28670      new_path="$CYGWIN_ROOT_PATH$input_path"
28671    fi
28672  fi
28673
28674
28675  if test "x$path" != "x$new_path"; then
28676    BOOT_JDK="$new_path"
28677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28679  fi
28680
28681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28682
28683  path="$BOOT_JDK"
28684  has_colon=`$ECHO $path | $GREP ^.:`
28685  new_path="$path"
28686  if test "x$has_colon" = x; then
28687    # Not in mixed or Windows style, start by that.
28688    new_path=`cmd //c echo $path`
28689  fi
28690
28691
28692  input_path="$new_path"
28693  # Check if we need to convert this using DOS-style short mode. If the path
28694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28695  # take no chances and rewrite it.
28696  # Note: m4 eats our [], so we need to use [ and ] instead.
28697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28698  if test "x$has_forbidden_chars" != x; then
28699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28701  fi
28702
28703
28704  windows_path="$new_path"
28705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28706    unix_path=`$CYGPATH -u "$windows_path"`
28707    new_path="$unix_path"
28708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28710    new_path="$unix_path"
28711  fi
28712
28713  if test "x$path" != "x$new_path"; then
28714    BOOT_JDK="$new_path"
28715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28717  fi
28718
28719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28721
28722    else
28723      # We're on a unix platform. Hooray! :)
28724      path="$BOOT_JDK"
28725      has_space=`$ECHO "$path" | $GREP " "`
28726      if test "x$has_space" != x; then
28727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28730      fi
28731
28732      # Use eval to expand a potential ~
28733      eval path="$path"
28734      if test ! -f "$path" && test ! -d "$path"; then
28735        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28736      fi
28737
28738      if test -d "$path"; then
28739        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28740      else
28741        dir="`$DIRNAME "$path"`"
28742        base="`$BASENAME "$path"`"
28743        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28744      fi
28745    fi
28746  fi
28747
28748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28749$as_echo_n "checking for Boot JDK... " >&6; }
28750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28751$as_echo "$BOOT_JDK" >&6; }
28752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28753$as_echo_n "checking Boot JDK version... " >&6; }
28754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28756$as_echo "$BOOT_JDK_VERSION" >&6; }
28757          fi # end check jdk version
28758        fi # end check javac
28759      fi # end check java
28760    fi # end check boot jdk found
28761  fi
28762
28763
28764  if test "x$BOOT_JDK_FOUND" = xno; then
28765    # Now execute the test
28766
28767  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28768  BOOT_JDK_SUFFIX=""
28769  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28770  if test "x$ALL_JDKS_FOUND" != x; then
28771    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28772
28773  if test "x$BOOT_JDK_FOUND" = xno; then
28774    # Now execute the test
28775
28776        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28777        if test -d "$BOOT_JDK"; then
28778          BOOT_JDK_FOUND=maybe
28779          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28780$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28781        fi
28782
28783
28784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28786      # Do we have a bin/java?
28787      if test ! -x "$BOOT_JDK/bin/java"; then
28788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28790        BOOT_JDK_FOUND=no
28791      else
28792        # Do we have a bin/javac?
28793        if test ! -x "$BOOT_JDK/bin/javac"; then
28794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28798          BOOT_JDK_FOUND=no
28799        else
28800          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28801          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28802
28803          # Extra M4 quote needed to protect [] in grep expression.
28804          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28805          if test "x$FOUND_CORRECT_VERSION" = x; then
28806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28808            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28809$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28810            BOOT_JDK_FOUND=no
28811          else
28812            # We're done! :-)
28813            BOOT_JDK_FOUND=yes
28814
28815  # Only process if variable expands to non-empty
28816
28817  if test "x$BOOT_JDK" != x; then
28818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28819
28820  # Input might be given as Windows format, start by converting to
28821  # unix format.
28822  path="$BOOT_JDK"
28823  new_path=`$CYGPATH -u "$path"`
28824
28825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28828  # "foo.exe" is OK but "foo" is an error.
28829  #
28830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28831  # It is also a way to make sure we got the proper file name for the real test later on.
28832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28833  if test "x$test_shortpath" = x; then
28834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28836    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28837  fi
28838
28839  # Call helper function which possibly converts this using DOS-style short mode.
28840  # If so, the updated path is stored in $new_path.
28841
28842  input_path="$new_path"
28843  # Check if we need to convert this using DOS-style short mode. If the path
28844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28845  # take no chances and rewrite it.
28846  # Note: m4 eats our [], so we need to use [ and ] instead.
28847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28848  if test "x$has_forbidden_chars" != x; then
28849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28853      # Going to short mode and back again did indeed matter. Since short mode is
28854      # case insensitive, let's make it lowercase to improve readability.
28855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28856      # Now convert it back to Unix-style (cygpath)
28857      input_path=`$CYGPATH -u "$shortmode_path"`
28858      new_path="$input_path"
28859    fi
28860  fi
28861
28862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28863  if test "x$test_cygdrive_prefix" = x; then
28864    # As a simple fix, exclude /usr/bin since it's not a real path.
28865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28867      # a path prefixed by /cygdrive for fixpath to work.
28868      new_path="$CYGWIN_ROOT_PATH$input_path"
28869    fi
28870  fi
28871
28872
28873  if test "x$path" != "x$new_path"; then
28874    BOOT_JDK="$new_path"
28875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28877  fi
28878
28879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28880
28881  path="$BOOT_JDK"
28882  has_colon=`$ECHO $path | $GREP ^.:`
28883  new_path="$path"
28884  if test "x$has_colon" = x; then
28885    # Not in mixed or Windows style, start by that.
28886    new_path=`cmd //c echo $path`
28887  fi
28888
28889
28890  input_path="$new_path"
28891  # Check if we need to convert this using DOS-style short mode. If the path
28892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28893  # take no chances and rewrite it.
28894  # Note: m4 eats our [], so we need to use [ and ] instead.
28895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28896  if test "x$has_forbidden_chars" != x; then
28897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28899  fi
28900
28901
28902  windows_path="$new_path"
28903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28904    unix_path=`$CYGPATH -u "$windows_path"`
28905    new_path="$unix_path"
28906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28908    new_path="$unix_path"
28909  fi
28910
28911  if test "x$path" != "x$new_path"; then
28912    BOOT_JDK="$new_path"
28913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28915  fi
28916
28917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28919
28920    else
28921      # We're on a unix platform. Hooray! :)
28922      path="$BOOT_JDK"
28923      has_space=`$ECHO "$path" | $GREP " "`
28924      if test "x$has_space" != x; then
28925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28928      fi
28929
28930      # Use eval to expand a potential ~
28931      eval path="$path"
28932      if test ! -f "$path" && test ! -d "$path"; then
28933        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28934      fi
28935
28936      if test -d "$path"; then
28937        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28938      else
28939        dir="`$DIRNAME "$path"`"
28940        base="`$BASENAME "$path"`"
28941        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28942      fi
28943    fi
28944  fi
28945
28946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28947$as_echo_n "checking for Boot JDK... " >&6; }
28948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28949$as_echo "$BOOT_JDK" >&6; }
28950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28951$as_echo_n "checking Boot JDK version... " >&6; }
28952            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28954$as_echo "$BOOT_JDK_VERSION" >&6; }
28955          fi # end check jdk version
28956        fi # end check javac
28957      fi # end check java
28958    fi # end check boot jdk found
28959  fi
28960
28961    done
28962  fi
28963
28964
28965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28967      # Do we have a bin/java?
28968      if test ! -x "$BOOT_JDK/bin/java"; then
28969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28971        BOOT_JDK_FOUND=no
28972      else
28973        # Do we have a bin/javac?
28974        if test ! -x "$BOOT_JDK/bin/javac"; then
28975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28979          BOOT_JDK_FOUND=no
28980        else
28981          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28982          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28983
28984          # Extra M4 quote needed to protect [] in grep expression.
28985          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28986          if test "x$FOUND_CORRECT_VERSION" = x; then
28987            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28989            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28990$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28991            BOOT_JDK_FOUND=no
28992          else
28993            # We're done! :-)
28994            BOOT_JDK_FOUND=yes
28995
28996  # Only process if variable expands to non-empty
28997
28998  if test "x$BOOT_JDK" != x; then
28999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29000
29001  # Input might be given as Windows format, start by converting to
29002  # unix format.
29003  path="$BOOT_JDK"
29004  new_path=`$CYGPATH -u "$path"`
29005
29006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29009  # "foo.exe" is OK but "foo" is an error.
29010  #
29011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29012  # It is also a way to make sure we got the proper file name for the real test later on.
29013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29014  if test "x$test_shortpath" = x; then
29015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29018  fi
29019
29020  # Call helper function which possibly converts this using DOS-style short mode.
29021  # If so, the updated path is stored in $new_path.
29022
29023  input_path="$new_path"
29024  # Check if we need to convert this using DOS-style short mode. If the path
29025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29026  # take no chances and rewrite it.
29027  # Note: m4 eats our [], so we need to use [ and ] instead.
29028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29029  if test "x$has_forbidden_chars" != x; then
29030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29034      # Going to short mode and back again did indeed matter. Since short mode is
29035      # case insensitive, let's make it lowercase to improve readability.
29036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29037      # Now convert it back to Unix-style (cygpath)
29038      input_path=`$CYGPATH -u "$shortmode_path"`
29039      new_path="$input_path"
29040    fi
29041  fi
29042
29043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29044  if test "x$test_cygdrive_prefix" = x; then
29045    # As a simple fix, exclude /usr/bin since it's not a real path.
29046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29048      # a path prefixed by /cygdrive for fixpath to work.
29049      new_path="$CYGWIN_ROOT_PATH$input_path"
29050    fi
29051  fi
29052
29053
29054  if test "x$path" != "x$new_path"; then
29055    BOOT_JDK="$new_path"
29056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29058  fi
29059
29060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29061
29062  path="$BOOT_JDK"
29063  has_colon=`$ECHO $path | $GREP ^.:`
29064  new_path="$path"
29065  if test "x$has_colon" = x; then
29066    # Not in mixed or Windows style, start by that.
29067    new_path=`cmd //c echo $path`
29068  fi
29069
29070
29071  input_path="$new_path"
29072  # Check if we need to convert this using DOS-style short mode. If the path
29073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29074  # take no chances and rewrite it.
29075  # Note: m4 eats our [], so we need to use [ and ] instead.
29076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29077  if test "x$has_forbidden_chars" != x; then
29078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29080  fi
29081
29082
29083  windows_path="$new_path"
29084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29085    unix_path=`$CYGPATH -u "$windows_path"`
29086    new_path="$unix_path"
29087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29089    new_path="$unix_path"
29090  fi
29091
29092  if test "x$path" != "x$new_path"; then
29093    BOOT_JDK="$new_path"
29094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29096  fi
29097
29098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29100
29101    else
29102      # We're on a unix platform. Hooray! :)
29103      path="$BOOT_JDK"
29104      has_space=`$ECHO "$path" | $GREP " "`
29105      if test "x$has_space" != x; then
29106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29109      fi
29110
29111      # Use eval to expand a potential ~
29112      eval path="$path"
29113      if test ! -f "$path" && test ! -d "$path"; then
29114        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29115      fi
29116
29117      if test -d "$path"; then
29118        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29119      else
29120        dir="`$DIRNAME "$path"`"
29121        base="`$BASENAME "$path"`"
29122        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29123      fi
29124    fi
29125  fi
29126
29127            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29128$as_echo_n "checking for Boot JDK... " >&6; }
29129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29130$as_echo "$BOOT_JDK" >&6; }
29131            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29132$as_echo_n "checking Boot JDK version... " >&6; }
29133            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29135$as_echo "$BOOT_JDK_VERSION" >&6; }
29136          fi # end check jdk version
29137        fi # end check javac
29138      fi # end check java
29139    fi # end check boot jdk found
29140  fi
29141
29142  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29143
29144  if test "x$BOOT_JDK_FOUND" = xno; then
29145    # Now execute the test
29146
29147  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29148  BOOT_JDK_SUFFIX="/Contents/Home"
29149  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29150  if test "x$ALL_JDKS_FOUND" != x; then
29151    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29152
29153  if test "x$BOOT_JDK_FOUND" = xno; then
29154    # Now execute the test
29155
29156        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29157        if test -d "$BOOT_JDK"; then
29158          BOOT_JDK_FOUND=maybe
29159          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29160$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29161        fi
29162
29163
29164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29166      # Do we have a bin/java?
29167      if test ! -x "$BOOT_JDK/bin/java"; then
29168        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29170        BOOT_JDK_FOUND=no
29171      else
29172        # Do we have a bin/javac?
29173        if test ! -x "$BOOT_JDK/bin/javac"; then
29174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29176          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29178          BOOT_JDK_FOUND=no
29179        else
29180          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29181          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29182
29183          # Extra M4 quote needed to protect [] in grep expression.
29184          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29185          if test "x$FOUND_CORRECT_VERSION" = x; then
29186            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29188            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29189$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29190            BOOT_JDK_FOUND=no
29191          else
29192            # We're done! :-)
29193            BOOT_JDK_FOUND=yes
29194
29195  # Only process if variable expands to non-empty
29196
29197  if test "x$BOOT_JDK" != x; then
29198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29199
29200  # Input might be given as Windows format, start by converting to
29201  # unix format.
29202  path="$BOOT_JDK"
29203  new_path=`$CYGPATH -u "$path"`
29204
29205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29208  # "foo.exe" is OK but "foo" is an error.
29209  #
29210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29211  # It is also a way to make sure we got the proper file name for the real test later on.
29212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29213  if test "x$test_shortpath" = x; then
29214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29217  fi
29218
29219  # Call helper function which possibly converts this using DOS-style short mode.
29220  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29233      # Going to short mode and back again did indeed matter. Since short mode is
29234      # case insensitive, let's make it lowercase to improve readability.
29235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29236      # Now convert it back to Unix-style (cygpath)
29237      input_path=`$CYGPATH -u "$shortmode_path"`
29238      new_path="$input_path"
29239    fi
29240  fi
29241
29242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29243  if test "x$test_cygdrive_prefix" = x; then
29244    # As a simple fix, exclude /usr/bin since it's not a real path.
29245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29247      # a path prefixed by /cygdrive for fixpath to work.
29248      new_path="$CYGWIN_ROOT_PATH$input_path"
29249    fi
29250  fi
29251
29252
29253  if test "x$path" != "x$new_path"; then
29254    BOOT_JDK="$new_path"
29255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29257  fi
29258
29259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29260
29261  path="$BOOT_JDK"
29262  has_colon=`$ECHO $path | $GREP ^.:`
29263  new_path="$path"
29264  if test "x$has_colon" = x; then
29265    # Not in mixed or Windows style, start by that.
29266    new_path=`cmd //c echo $path`
29267  fi
29268
29269
29270  input_path="$new_path"
29271  # Check if we need to convert this using DOS-style short mode. If the path
29272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29273  # take no chances and rewrite it.
29274  # Note: m4 eats our [], so we need to use [ and ] instead.
29275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29276  if test "x$has_forbidden_chars" != x; then
29277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29279  fi
29280
29281
29282  windows_path="$new_path"
29283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29284    unix_path=`$CYGPATH -u "$windows_path"`
29285    new_path="$unix_path"
29286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29288    new_path="$unix_path"
29289  fi
29290
29291  if test "x$path" != "x$new_path"; then
29292    BOOT_JDK="$new_path"
29293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29295  fi
29296
29297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29299
29300    else
29301      # We're on a unix platform. Hooray! :)
29302      path="$BOOT_JDK"
29303      has_space=`$ECHO "$path" | $GREP " "`
29304      if test "x$has_space" != x; then
29305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29308      fi
29309
29310      # Use eval to expand a potential ~
29311      eval path="$path"
29312      if test ! -f "$path" && test ! -d "$path"; then
29313        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29314      fi
29315
29316      if test -d "$path"; then
29317        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29318      else
29319        dir="`$DIRNAME "$path"`"
29320        base="`$BASENAME "$path"`"
29321        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29322      fi
29323    fi
29324  fi
29325
29326            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29327$as_echo_n "checking for Boot JDK... " >&6; }
29328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29329$as_echo "$BOOT_JDK" >&6; }
29330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29331$as_echo_n "checking Boot JDK version... " >&6; }
29332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29334$as_echo "$BOOT_JDK_VERSION" >&6; }
29335          fi # end check jdk version
29336        fi # end check javac
29337      fi # end check java
29338    fi # end check boot jdk found
29339  fi
29340
29341    done
29342  fi
29343
29344
29345    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29346    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29347      # Do we have a bin/java?
29348      if test ! -x "$BOOT_JDK/bin/java"; then
29349        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29351        BOOT_JDK_FOUND=no
29352      else
29353        # Do we have a bin/javac?
29354        if test ! -x "$BOOT_JDK/bin/javac"; then
29355          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29357          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29358$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29359          BOOT_JDK_FOUND=no
29360        else
29361          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29362          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29363
29364          # Extra M4 quote needed to protect [] in grep expression.
29365          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29366          if test "x$FOUND_CORRECT_VERSION" = x; then
29367            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29369            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29370$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29371            BOOT_JDK_FOUND=no
29372          else
29373            # We're done! :-)
29374            BOOT_JDK_FOUND=yes
29375
29376  # Only process if variable expands to non-empty
29377
29378  if test "x$BOOT_JDK" != x; then
29379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29380
29381  # Input might be given as Windows format, start by converting to
29382  # unix format.
29383  path="$BOOT_JDK"
29384  new_path=`$CYGPATH -u "$path"`
29385
29386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29389  # "foo.exe" is OK but "foo" is an error.
29390  #
29391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29392  # It is also a way to make sure we got the proper file name for the real test later on.
29393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29394  if test "x$test_shortpath" = x; then
29395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29396$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29397    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29398  fi
29399
29400  # Call helper function which possibly converts this using DOS-style short mode.
29401  # If so, the updated path is stored in $new_path.
29402
29403  input_path="$new_path"
29404  # Check if we need to convert this using DOS-style short mode. If the path
29405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29406  # take no chances and rewrite it.
29407  # Note: m4 eats our [], so we need to use [ and ] instead.
29408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29409  if test "x$has_forbidden_chars" != x; then
29410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29414      # Going to short mode and back again did indeed matter. Since short mode is
29415      # case insensitive, let's make it lowercase to improve readability.
29416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29417      # Now convert it back to Unix-style (cygpath)
29418      input_path=`$CYGPATH -u "$shortmode_path"`
29419      new_path="$input_path"
29420    fi
29421  fi
29422
29423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29424  if test "x$test_cygdrive_prefix" = x; then
29425    # As a simple fix, exclude /usr/bin since it's not a real path.
29426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29428      # a path prefixed by /cygdrive for fixpath to work.
29429      new_path="$CYGWIN_ROOT_PATH$input_path"
29430    fi
29431  fi
29432
29433
29434  if test "x$path" != "x$new_path"; then
29435    BOOT_JDK="$new_path"
29436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29438  fi
29439
29440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29441
29442  path="$BOOT_JDK"
29443  has_colon=`$ECHO $path | $GREP ^.:`
29444  new_path="$path"
29445  if test "x$has_colon" = x; then
29446    # Not in mixed or Windows style, start by that.
29447    new_path=`cmd //c echo $path`
29448  fi
29449
29450
29451  input_path="$new_path"
29452  # Check if we need to convert this using DOS-style short mode. If the path
29453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29454  # take no chances and rewrite it.
29455  # Note: m4 eats our [], so we need to use [ and ] instead.
29456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29457  if test "x$has_forbidden_chars" != x; then
29458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29460  fi
29461
29462
29463  windows_path="$new_path"
29464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29465    unix_path=`$CYGPATH -u "$windows_path"`
29466    new_path="$unix_path"
29467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29469    new_path="$unix_path"
29470  fi
29471
29472  if test "x$path" != "x$new_path"; then
29473    BOOT_JDK="$new_path"
29474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29476  fi
29477
29478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29480
29481    else
29482      # We're on a unix platform. Hooray! :)
29483      path="$BOOT_JDK"
29484      has_space=`$ECHO "$path" | $GREP " "`
29485      if test "x$has_space" != x; then
29486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29489      fi
29490
29491      # Use eval to expand a potential ~
29492      eval path="$path"
29493      if test ! -f "$path" && test ! -d "$path"; then
29494        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29495      fi
29496
29497      if test -d "$path"; then
29498        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29499      else
29500        dir="`$DIRNAME "$path"`"
29501        base="`$BASENAME "$path"`"
29502        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29503      fi
29504    fi
29505  fi
29506
29507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29508$as_echo_n "checking for Boot JDK... " >&6; }
29509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29510$as_echo "$BOOT_JDK" >&6; }
29511            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29512$as_echo_n "checking Boot JDK version... " >&6; }
29513            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29515$as_echo "$BOOT_JDK_VERSION" >&6; }
29516          fi # end check jdk version
29517        fi # end check javac
29518      fi # end check java
29519    fi # end check boot jdk found
29520  fi
29521
29522
29523  if test "x$BOOT_JDK_FOUND" = xno; then
29524    # Now execute the test
29525
29526  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29527  BOOT_JDK_SUFFIX="/Contents/Home"
29528  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29529  if test "x$ALL_JDKS_FOUND" != x; then
29530    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29531
29532  if test "x$BOOT_JDK_FOUND" = xno; then
29533    # Now execute the test
29534
29535        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29536        if test -d "$BOOT_JDK"; then
29537          BOOT_JDK_FOUND=maybe
29538          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29539$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29540        fi
29541
29542
29543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29545      # Do we have a bin/java?
29546      if test ! -x "$BOOT_JDK/bin/java"; then
29547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29549        BOOT_JDK_FOUND=no
29550      else
29551        # Do we have a bin/javac?
29552        if test ! -x "$BOOT_JDK/bin/javac"; then
29553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29557          BOOT_JDK_FOUND=no
29558        else
29559          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29560          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29561
29562          # Extra M4 quote needed to protect [] in grep expression.
29563          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29564          if test "x$FOUND_CORRECT_VERSION" = x; then
29565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29567            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29568$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29569            BOOT_JDK_FOUND=no
29570          else
29571            # We're done! :-)
29572            BOOT_JDK_FOUND=yes
29573
29574  # Only process if variable expands to non-empty
29575
29576  if test "x$BOOT_JDK" != x; then
29577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29578
29579  # Input might be given as Windows format, start by converting to
29580  # unix format.
29581  path="$BOOT_JDK"
29582  new_path=`$CYGPATH -u "$path"`
29583
29584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29587  # "foo.exe" is OK but "foo" is an error.
29588  #
29589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29590  # It is also a way to make sure we got the proper file name for the real test later on.
29591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29592  if test "x$test_shortpath" = x; then
29593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29596  fi
29597
29598  # Call helper function which possibly converts this using DOS-style short mode.
29599  # If so, the updated path is stored in $new_path.
29600
29601  input_path="$new_path"
29602  # Check if we need to convert this using DOS-style short mode. If the path
29603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29604  # take no chances and rewrite it.
29605  # Note: m4 eats our [], so we need to use [ and ] instead.
29606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29607  if test "x$has_forbidden_chars" != x; then
29608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29612      # Going to short mode and back again did indeed matter. Since short mode is
29613      # case insensitive, let's make it lowercase to improve readability.
29614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29615      # Now convert it back to Unix-style (cygpath)
29616      input_path=`$CYGPATH -u "$shortmode_path"`
29617      new_path="$input_path"
29618    fi
29619  fi
29620
29621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29622  if test "x$test_cygdrive_prefix" = x; then
29623    # As a simple fix, exclude /usr/bin since it's not a real path.
29624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29626      # a path prefixed by /cygdrive for fixpath to work.
29627      new_path="$CYGWIN_ROOT_PATH$input_path"
29628    fi
29629  fi
29630
29631
29632  if test "x$path" != "x$new_path"; then
29633    BOOT_JDK="$new_path"
29634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29636  fi
29637
29638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29639
29640  path="$BOOT_JDK"
29641  has_colon=`$ECHO $path | $GREP ^.:`
29642  new_path="$path"
29643  if test "x$has_colon" = x; then
29644    # Not in mixed or Windows style, start by that.
29645    new_path=`cmd //c echo $path`
29646  fi
29647
29648
29649  input_path="$new_path"
29650  # Check if we need to convert this using DOS-style short mode. If the path
29651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29652  # take no chances and rewrite it.
29653  # Note: m4 eats our [], so we need to use [ and ] instead.
29654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29655  if test "x$has_forbidden_chars" != x; then
29656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29658  fi
29659
29660
29661  windows_path="$new_path"
29662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29663    unix_path=`$CYGPATH -u "$windows_path"`
29664    new_path="$unix_path"
29665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29667    new_path="$unix_path"
29668  fi
29669
29670  if test "x$path" != "x$new_path"; then
29671    BOOT_JDK="$new_path"
29672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29674  fi
29675
29676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29678
29679    else
29680      # We're on a unix platform. Hooray! :)
29681      path="$BOOT_JDK"
29682      has_space=`$ECHO "$path" | $GREP " "`
29683      if test "x$has_space" != x; then
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29687      fi
29688
29689      # Use eval to expand a potential ~
29690      eval path="$path"
29691      if test ! -f "$path" && test ! -d "$path"; then
29692        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29693      fi
29694
29695      if test -d "$path"; then
29696        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29697      else
29698        dir="`$DIRNAME "$path"`"
29699        base="`$BASENAME "$path"`"
29700        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29701      fi
29702    fi
29703  fi
29704
29705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29706$as_echo_n "checking for Boot JDK... " >&6; }
29707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29708$as_echo "$BOOT_JDK" >&6; }
29709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29710$as_echo_n "checking Boot JDK version... " >&6; }
29711            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29713$as_echo "$BOOT_JDK_VERSION" >&6; }
29714          fi # end check jdk version
29715        fi # end check javac
29716      fi # end check java
29717    fi # end check boot jdk found
29718  fi
29719
29720    done
29721  fi
29722
29723
29724    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29725    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29726      # Do we have a bin/java?
29727      if test ! -x "$BOOT_JDK/bin/java"; then
29728        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29730        BOOT_JDK_FOUND=no
29731      else
29732        # Do we have a bin/javac?
29733        if test ! -x "$BOOT_JDK/bin/javac"; then
29734          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29736          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29737$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29738          BOOT_JDK_FOUND=no
29739        else
29740          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29741          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29742
29743          # Extra M4 quote needed to protect [] in grep expression.
29744          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29745          if test "x$FOUND_CORRECT_VERSION" = x; then
29746            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29748            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29749$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29750            BOOT_JDK_FOUND=no
29751          else
29752            # We're done! :-)
29753            BOOT_JDK_FOUND=yes
29754
29755  # Only process if variable expands to non-empty
29756
29757  if test "x$BOOT_JDK" != x; then
29758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29759
29760  # Input might be given as Windows format, start by converting to
29761  # unix format.
29762  path="$BOOT_JDK"
29763  new_path=`$CYGPATH -u "$path"`
29764
29765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29768  # "foo.exe" is OK but "foo" is an error.
29769  #
29770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29771  # It is also a way to make sure we got the proper file name for the real test later on.
29772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29773  if test "x$test_shortpath" = x; then
29774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29776    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29777  fi
29778
29779  # Call helper function which possibly converts this using DOS-style short mode.
29780  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29793      # Going to short mode and back again did indeed matter. Since short mode is
29794      # case insensitive, let's make it lowercase to improve readability.
29795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29796      # Now convert it back to Unix-style (cygpath)
29797      input_path=`$CYGPATH -u "$shortmode_path"`
29798      new_path="$input_path"
29799    fi
29800  fi
29801
29802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29803  if test "x$test_cygdrive_prefix" = x; then
29804    # As a simple fix, exclude /usr/bin since it's not a real path.
29805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29807      # a path prefixed by /cygdrive for fixpath to work.
29808      new_path="$CYGWIN_ROOT_PATH$input_path"
29809    fi
29810  fi
29811
29812
29813  if test "x$path" != "x$new_path"; then
29814    BOOT_JDK="$new_path"
29815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29817  fi
29818
29819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29820
29821  path="$BOOT_JDK"
29822  has_colon=`$ECHO $path | $GREP ^.:`
29823  new_path="$path"
29824  if test "x$has_colon" = x; then
29825    # Not in mixed or Windows style, start by that.
29826    new_path=`cmd //c echo $path`
29827  fi
29828
29829
29830  input_path="$new_path"
29831  # Check if we need to convert this using DOS-style short mode. If the path
29832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29833  # take no chances and rewrite it.
29834  # Note: m4 eats our [], so we need to use [ and ] instead.
29835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29836  if test "x$has_forbidden_chars" != x; then
29837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29839  fi
29840
29841
29842  windows_path="$new_path"
29843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29844    unix_path=`$CYGPATH -u "$windows_path"`
29845    new_path="$unix_path"
29846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29848    new_path="$unix_path"
29849  fi
29850
29851  if test "x$path" != "x$new_path"; then
29852    BOOT_JDK="$new_path"
29853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29855  fi
29856
29857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29859
29860    else
29861      # We're on a unix platform. Hooray! :)
29862      path="$BOOT_JDK"
29863      has_space=`$ECHO "$path" | $GREP " "`
29864      if test "x$has_space" != x; then
29865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29867        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29868      fi
29869
29870      # Use eval to expand a potential ~
29871      eval path="$path"
29872      if test ! -f "$path" && test ! -d "$path"; then
29873        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29874      fi
29875
29876      if test -d "$path"; then
29877        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29878      else
29879        dir="`$DIRNAME "$path"`"
29880        base="`$BASENAME "$path"`"
29881        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29882      fi
29883    fi
29884  fi
29885
29886            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29887$as_echo_n "checking for Boot JDK... " >&6; }
29888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29889$as_echo "$BOOT_JDK" >&6; }
29890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29891$as_echo_n "checking Boot JDK version... " >&6; }
29892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29894$as_echo "$BOOT_JDK_VERSION" >&6; }
29895          fi # end check jdk version
29896        fi # end check javac
29897      fi # end check java
29898    fi # end check boot jdk found
29899  fi
29900
29901  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29902
29903  if test "x$BOOT_JDK_FOUND" = xno; then
29904    # Now execute the test
29905
29906  BOOT_JDK_PREFIX="/usr/lib/jvm"
29907  BOOT_JDK_SUFFIX=""
29908  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29909  if test "x$ALL_JDKS_FOUND" != x; then
29910    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29911
29912  if test "x$BOOT_JDK_FOUND" = xno; then
29913    # Now execute the test
29914
29915        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29916        if test -d "$BOOT_JDK"; then
29917          BOOT_JDK_FOUND=maybe
29918          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29919$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29920        fi
29921
29922
29923    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29924    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29925      # Do we have a bin/java?
29926      if test ! -x "$BOOT_JDK/bin/java"; then
29927        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29929        BOOT_JDK_FOUND=no
29930      else
29931        # Do we have a bin/javac?
29932        if test ! -x "$BOOT_JDK/bin/javac"; then
29933          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29935          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29936$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29937          BOOT_JDK_FOUND=no
29938        else
29939          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29940          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29941
29942          # Extra M4 quote needed to protect [] in grep expression.
29943          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29944          if test "x$FOUND_CORRECT_VERSION" = x; then
29945            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29947            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29948$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29949            BOOT_JDK_FOUND=no
29950          else
29951            # We're done! :-)
29952            BOOT_JDK_FOUND=yes
29953
29954  # Only process if variable expands to non-empty
29955
29956  if test "x$BOOT_JDK" != x; then
29957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29958
29959  # Input might be given as Windows format, start by converting to
29960  # unix format.
29961  path="$BOOT_JDK"
29962  new_path=`$CYGPATH -u "$path"`
29963
29964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29967  # "foo.exe" is OK but "foo" is an error.
29968  #
29969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29970  # It is also a way to make sure we got the proper file name for the real test later on.
29971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29972  if test "x$test_shortpath" = x; then
29973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29974$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29975    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29976  fi
29977
29978  # Call helper function which possibly converts this using DOS-style short mode.
29979  # If so, the updated path is stored in $new_path.
29980
29981  input_path="$new_path"
29982  # Check if we need to convert this using DOS-style short mode. If the path
29983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29984  # take no chances and rewrite it.
29985  # Note: m4 eats our [], so we need to use [ and ] instead.
29986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29987  if test "x$has_forbidden_chars" != x; then
29988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29992      # Going to short mode and back again did indeed matter. Since short mode is
29993      # case insensitive, let's make it lowercase to improve readability.
29994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29995      # Now convert it back to Unix-style (cygpath)
29996      input_path=`$CYGPATH -u "$shortmode_path"`
29997      new_path="$input_path"
29998    fi
29999  fi
30000
30001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30002  if test "x$test_cygdrive_prefix" = x; then
30003    # As a simple fix, exclude /usr/bin since it's not a real path.
30004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30006      # a path prefixed by /cygdrive for fixpath to work.
30007      new_path="$CYGWIN_ROOT_PATH$input_path"
30008    fi
30009  fi
30010
30011
30012  if test "x$path" != "x$new_path"; then
30013    BOOT_JDK="$new_path"
30014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30015$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30016  fi
30017
30018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30019
30020  path="$BOOT_JDK"
30021  has_colon=`$ECHO $path | $GREP ^.:`
30022  new_path="$path"
30023  if test "x$has_colon" = x; then
30024    # Not in mixed or Windows style, start by that.
30025    new_path=`cmd //c echo $path`
30026  fi
30027
30028
30029  input_path="$new_path"
30030  # Check if we need to convert this using DOS-style short mode. If the path
30031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30032  # take no chances and rewrite it.
30033  # Note: m4 eats our [], so we need to use [ and ] instead.
30034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30035  if test "x$has_forbidden_chars" != x; then
30036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30038  fi
30039
30040
30041  windows_path="$new_path"
30042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30043    unix_path=`$CYGPATH -u "$windows_path"`
30044    new_path="$unix_path"
30045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30047    new_path="$unix_path"
30048  fi
30049
30050  if test "x$path" != "x$new_path"; then
30051    BOOT_JDK="$new_path"
30052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30053$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30054  fi
30055
30056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30058
30059    else
30060      # We're on a unix platform. Hooray! :)
30061      path="$BOOT_JDK"
30062      has_space=`$ECHO "$path" | $GREP " "`
30063      if test "x$has_space" != x; then
30064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30065$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30066        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30067      fi
30068
30069      # Use eval to expand a potential ~
30070      eval path="$path"
30071      if test ! -f "$path" && test ! -d "$path"; then
30072        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30073      fi
30074
30075      if test -d "$path"; then
30076        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30077      else
30078        dir="`$DIRNAME "$path"`"
30079        base="`$BASENAME "$path"`"
30080        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30081      fi
30082    fi
30083  fi
30084
30085            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30086$as_echo_n "checking for Boot JDK... " >&6; }
30087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30088$as_echo "$BOOT_JDK" >&6; }
30089            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30090$as_echo_n "checking Boot JDK version... " >&6; }
30091            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30093$as_echo "$BOOT_JDK_VERSION" >&6; }
30094          fi # end check jdk version
30095        fi # end check javac
30096      fi # end check java
30097    fi # end check boot jdk found
30098  fi
30099
30100    done
30101  fi
30102
30103
30104    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30105    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30106      # Do we have a bin/java?
30107      if test ! -x "$BOOT_JDK/bin/java"; then
30108        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30110        BOOT_JDK_FOUND=no
30111      else
30112        # Do we have a bin/javac?
30113        if test ! -x "$BOOT_JDK/bin/javac"; then
30114          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30116          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30117$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30118          BOOT_JDK_FOUND=no
30119        else
30120          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30121          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30122
30123          # Extra M4 quote needed to protect [] in grep expression.
30124          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30125          if test "x$FOUND_CORRECT_VERSION" = x; then
30126            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30128            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30129$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30130            BOOT_JDK_FOUND=no
30131          else
30132            # We're done! :-)
30133            BOOT_JDK_FOUND=yes
30134
30135  # Only process if variable expands to non-empty
30136
30137  if test "x$BOOT_JDK" != x; then
30138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30139
30140  # Input might be given as Windows format, start by converting to
30141  # unix format.
30142  path="$BOOT_JDK"
30143  new_path=`$CYGPATH -u "$path"`
30144
30145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30148  # "foo.exe" is OK but "foo" is an error.
30149  #
30150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30151  # It is also a way to make sure we got the proper file name for the real test later on.
30152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30153  if test "x$test_shortpath" = x; then
30154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30156    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30157  fi
30158
30159  # Call helper function which possibly converts this using DOS-style short mode.
30160  # If so, the updated path is stored in $new_path.
30161
30162  input_path="$new_path"
30163  # Check if we need to convert this using DOS-style short mode. If the path
30164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30165  # take no chances and rewrite it.
30166  # Note: m4 eats our [], so we need to use [ and ] instead.
30167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30168  if test "x$has_forbidden_chars" != x; then
30169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30173      # Going to short mode and back again did indeed matter. Since short mode is
30174      # case insensitive, let's make it lowercase to improve readability.
30175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30176      # Now convert it back to Unix-style (cygpath)
30177      input_path=`$CYGPATH -u "$shortmode_path"`
30178      new_path="$input_path"
30179    fi
30180  fi
30181
30182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30183  if test "x$test_cygdrive_prefix" = x; then
30184    # As a simple fix, exclude /usr/bin since it's not a real path.
30185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30187      # a path prefixed by /cygdrive for fixpath to work.
30188      new_path="$CYGWIN_ROOT_PATH$input_path"
30189    fi
30190  fi
30191
30192
30193  if test "x$path" != "x$new_path"; then
30194    BOOT_JDK="$new_path"
30195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30197  fi
30198
30199    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30200
30201  path="$BOOT_JDK"
30202  has_colon=`$ECHO $path | $GREP ^.:`
30203  new_path="$path"
30204  if test "x$has_colon" = x; then
30205    # Not in mixed or Windows style, start by that.
30206    new_path=`cmd //c echo $path`
30207  fi
30208
30209
30210  input_path="$new_path"
30211  # Check if we need to convert this using DOS-style short mode. If the path
30212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30213  # take no chances and rewrite it.
30214  # Note: m4 eats our [], so we need to use [ and ] instead.
30215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30216  if test "x$has_forbidden_chars" != x; then
30217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30219  fi
30220
30221
30222  windows_path="$new_path"
30223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30224    unix_path=`$CYGPATH -u "$windows_path"`
30225    new_path="$unix_path"
30226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30228    new_path="$unix_path"
30229  fi
30230
30231  if test "x$path" != "x$new_path"; then
30232    BOOT_JDK="$new_path"
30233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30235  fi
30236
30237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30239
30240    else
30241      # We're on a unix platform. Hooray! :)
30242      path="$BOOT_JDK"
30243      has_space=`$ECHO "$path" | $GREP " "`
30244      if test "x$has_space" != x; then
30245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30247        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30248      fi
30249
30250      # Use eval to expand a potential ~
30251      eval path="$path"
30252      if test ! -f "$path" && test ! -d "$path"; then
30253        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30254      fi
30255
30256      if test -d "$path"; then
30257        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30258      else
30259        dir="`$DIRNAME "$path"`"
30260        base="`$BASENAME "$path"`"
30261        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30262      fi
30263    fi
30264  fi
30265
30266            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30267$as_echo_n "checking for Boot JDK... " >&6; }
30268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30269$as_echo "$BOOT_JDK" >&6; }
30270            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30271$as_echo_n "checking Boot JDK version... " >&6; }
30272            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30274$as_echo "$BOOT_JDK_VERSION" >&6; }
30275          fi # end check jdk version
30276        fi # end check javac
30277      fi # end check java
30278    fi # end check boot jdk found
30279  fi
30280
30281  fi
30282
30283
30284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30286      # Do we have a bin/java?
30287      if test ! -x "$BOOT_JDK/bin/java"; then
30288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30290        BOOT_JDK_FOUND=no
30291      else
30292        # Do we have a bin/javac?
30293        if test ! -x "$BOOT_JDK/bin/javac"; then
30294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30298          BOOT_JDK_FOUND=no
30299        else
30300          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30301          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30302
30303          # Extra M4 quote needed to protect [] in grep expression.
30304          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30305          if test "x$FOUND_CORRECT_VERSION" = x; then
30306            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30308            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30309$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30310            BOOT_JDK_FOUND=no
30311          else
30312            # We're done! :-)
30313            BOOT_JDK_FOUND=yes
30314
30315  # Only process if variable expands to non-empty
30316
30317  if test "x$BOOT_JDK" != x; then
30318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30319
30320  # Input might be given as Windows format, start by converting to
30321  # unix format.
30322  path="$BOOT_JDK"
30323  new_path=`$CYGPATH -u "$path"`
30324
30325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30328  # "foo.exe" is OK but "foo" is an error.
30329  #
30330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30331  # It is also a way to make sure we got the proper file name for the real test later on.
30332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30333  if test "x$test_shortpath" = x; then
30334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30336    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30337  fi
30338
30339  # Call helper function which possibly converts this using DOS-style short mode.
30340  # If so, the updated path is stored in $new_path.
30341
30342  input_path="$new_path"
30343  # Check if we need to convert this using DOS-style short mode. If the path
30344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30345  # take no chances and rewrite it.
30346  # Note: m4 eats our [], so we need to use [ and ] instead.
30347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30348  if test "x$has_forbidden_chars" != x; then
30349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30353      # Going to short mode and back again did indeed matter. Since short mode is
30354      # case insensitive, let's make it lowercase to improve readability.
30355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30356      # Now convert it back to Unix-style (cygpath)
30357      input_path=`$CYGPATH -u "$shortmode_path"`
30358      new_path="$input_path"
30359    fi
30360  fi
30361
30362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30363  if test "x$test_cygdrive_prefix" = x; then
30364    # As a simple fix, exclude /usr/bin since it's not a real path.
30365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30367      # a path prefixed by /cygdrive for fixpath to work.
30368      new_path="$CYGWIN_ROOT_PATH$input_path"
30369    fi
30370  fi
30371
30372
30373  if test "x$path" != "x$new_path"; then
30374    BOOT_JDK="$new_path"
30375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30377  fi
30378
30379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30380
30381  path="$BOOT_JDK"
30382  has_colon=`$ECHO $path | $GREP ^.:`
30383  new_path="$path"
30384  if test "x$has_colon" = x; then
30385    # Not in mixed or Windows style, start by that.
30386    new_path=`cmd //c echo $path`
30387  fi
30388
30389
30390  input_path="$new_path"
30391  # Check if we need to convert this using DOS-style short mode. If the path
30392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30393  # take no chances and rewrite it.
30394  # Note: m4 eats our [], so we need to use [ and ] instead.
30395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30396  if test "x$has_forbidden_chars" != x; then
30397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30399  fi
30400
30401
30402  windows_path="$new_path"
30403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30404    unix_path=`$CYGPATH -u "$windows_path"`
30405    new_path="$unix_path"
30406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30408    new_path="$unix_path"
30409  fi
30410
30411  if test "x$path" != "x$new_path"; then
30412    BOOT_JDK="$new_path"
30413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30414$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30415  fi
30416
30417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30419
30420    else
30421      # We're on a unix platform. Hooray! :)
30422      path="$BOOT_JDK"
30423      has_space=`$ECHO "$path" | $GREP " "`
30424      if test "x$has_space" != x; then
30425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30428      fi
30429
30430      # Use eval to expand a potential ~
30431      eval path="$path"
30432      if test ! -f "$path" && test ! -d "$path"; then
30433        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30434      fi
30435
30436      if test -d "$path"; then
30437        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30438      else
30439        dir="`$DIRNAME "$path"`"
30440        base="`$BASENAME "$path"`"
30441        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30442      fi
30443    fi
30444  fi
30445
30446            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30447$as_echo_n "checking for Boot JDK... " >&6; }
30448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30449$as_echo "$BOOT_JDK" >&6; }
30450            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30451$as_echo_n "checking Boot JDK version... " >&6; }
30452            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30454$as_echo "$BOOT_JDK_VERSION" >&6; }
30455          fi # end check jdk version
30456        fi # end check javac
30457      fi # end check java
30458    fi # end check boot jdk found
30459  fi
30460
30461
30462  # If we haven't found anything yet, we've truly lost. Give up.
30463  if test "x$BOOT_JDK_FOUND" = xno; then
30464
30465  # Print a helpful message on how to acquire the necessary build dependency.
30466  # openjdk is the help tag: freetype, cups, alsa etc
30467  MISSING_DEPENDENCY=openjdk
30468
30469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30470    cygwin_help $MISSING_DEPENDENCY
30471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30472    msys_help $MISSING_DEPENDENCY
30473  else
30474    PKGHANDLER_COMMAND=
30475
30476    case $PKGHANDLER in
30477      apt-get)
30478        apt_help     $MISSING_DEPENDENCY ;;
30479      yum)
30480        yum_help     $MISSING_DEPENDENCY ;;
30481      brew)
30482        brew_help    $MISSING_DEPENDENCY ;;
30483      port)
30484        port_help    $MISSING_DEPENDENCY ;;
30485      pkgutil)
30486        pkgutil_help $MISSING_DEPENDENCY ;;
30487      pkgadd)
30488        pkgadd_help  $MISSING_DEPENDENCY ;;
30489    esac
30490
30491    if test "x$PKGHANDLER_COMMAND" != x; then
30492      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30493    fi
30494  fi
30495
30496    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30497$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30498    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30499$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30500    as_fn_error $? "Cannot continue" "$LINENO" 5
30501  fi
30502
30503
30504
30505  # Setup tools from the Boot JDK.
30506
30507  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30508
30509  # Publish this variable in the help.
30510
30511
30512  if [ -z "${JAVA+x}" ]; then
30513    # The variable is not set by user, try to locate tool using the code snippet
30514
30515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30516$as_echo_n "checking for java in Boot JDK... " >&6; }
30517      JAVA=$BOOT_JDK/bin/java
30518      if test ! -x $JAVA; then
30519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30520$as_echo "not found" >&6; }
30521        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30522$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30523        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30524      fi
30525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30526$as_echo "ok" >&6; }
30527
30528
30529  else
30530    # The variable is set, but is it from the command line or the environment?
30531
30532    # Try to remove the string !JAVA! from our list.
30533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30535      # If it failed, the variable was not from the command line. Ignore it,
30536      # but warn the user (except for BASH, which is always set by the calling BASH).
30537      if test "xJAVA" != xBASH; then
30538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30539$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30540      fi
30541      # Try to locate tool using the code snippet
30542
30543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30544$as_echo_n "checking for java in Boot JDK... " >&6; }
30545      JAVA=$BOOT_JDK/bin/java
30546      if test ! -x $JAVA; then
30547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30548$as_echo "not found" >&6; }
30549        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30550$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30551        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30552      fi
30553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30554$as_echo "ok" >&6; }
30555
30556
30557    else
30558      # If it succeeded, then it was overridden by the user. We will use it
30559      # for the tool.
30560
30561      # First remove it from the list of overridden variables, so we can test
30562      # for unknown variables in the end.
30563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30564
30565      # Check if we try to supply an empty value
30566      if test "x$JAVA" = x; then
30567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30568$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30570$as_echo_n "checking for JAVA... " >&6; }
30571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30572$as_echo "disabled" >&6; }
30573      else
30574        # Check if the provided tool contains a complete path.
30575        tool_specified="$JAVA"
30576        tool_basename="${tool_specified##*/}"
30577        if test "x$tool_basename" = "x$tool_specified"; then
30578          # A command without a complete path is provided, search $PATH.
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30580$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30581          # Extract the first word of "$tool_basename", so it can be a program name with args.
30582set dummy $tool_basename; ac_word=$2
30583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30584$as_echo_n "checking for $ac_word... " >&6; }
30585if ${ac_cv_path_JAVA+:} false; then :
30586  $as_echo_n "(cached) " >&6
30587else
30588  case $JAVA in
30589  [\\/]* | ?:[\\/]*)
30590  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30591  ;;
30592  *)
30593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30594for as_dir in $PATH
30595do
30596  IFS=$as_save_IFS
30597  test -z "$as_dir" && as_dir=.
30598    for ac_exec_ext in '' $ac_executable_extensions; do
30599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30600    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30602    break 2
30603  fi
30604done
30605  done
30606IFS=$as_save_IFS
30607
30608  ;;
30609esac
30610fi
30611JAVA=$ac_cv_path_JAVA
30612if test -n "$JAVA"; then
30613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30614$as_echo "$JAVA" >&6; }
30615else
30616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30617$as_echo "no" >&6; }
30618fi
30619
30620
30621          if test "x$JAVA" = x; then
30622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30623          fi
30624        else
30625          # Otherwise we believe it is a complete path. Use it as it is.
30626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30627$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30629$as_echo_n "checking for JAVA... " >&6; }
30630          if test ! -x "$tool_specified"; then
30631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30632$as_echo "not found" >&6; }
30633            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30634          fi
30635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30636$as_echo "$tool_specified" >&6; }
30637        fi
30638      fi
30639    fi
30640
30641  fi
30642
30643
30644
30645  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30646
30647  # Publish this variable in the help.
30648
30649
30650  if [ -z "${JAVAC+x}" ]; then
30651    # The variable is not set by user, try to locate tool using the code snippet
30652
30653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30654$as_echo_n "checking for javac in Boot JDK... " >&6; }
30655      JAVAC=$BOOT_JDK/bin/javac
30656      if test ! -x $JAVAC; then
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30658$as_echo "not found" >&6; }
30659        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30660$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30661        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30662      fi
30663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30664$as_echo "ok" >&6; }
30665
30666
30667  else
30668    # The variable is set, but is it from the command line or the environment?
30669
30670    # Try to remove the string !JAVAC! from our list.
30671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30673      # If it failed, the variable was not from the command line. Ignore it,
30674      # but warn the user (except for BASH, which is always set by the calling BASH).
30675      if test "xJAVAC" != xBASH; then
30676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30677$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30678      fi
30679      # Try to locate tool using the code snippet
30680
30681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30682$as_echo_n "checking for javac in Boot JDK... " >&6; }
30683      JAVAC=$BOOT_JDK/bin/javac
30684      if test ! -x $JAVAC; then
30685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30686$as_echo "not found" >&6; }
30687        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30688$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30689        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30690      fi
30691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30692$as_echo "ok" >&6; }
30693
30694
30695    else
30696      # If it succeeded, then it was overridden by the user. We will use it
30697      # for the tool.
30698
30699      # First remove it from the list of overridden variables, so we can test
30700      # for unknown variables in the end.
30701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30702
30703      # Check if we try to supply an empty value
30704      if test "x$JAVAC" = x; then
30705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30706$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30708$as_echo_n "checking for JAVAC... " >&6; }
30709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30710$as_echo "disabled" >&6; }
30711      else
30712        # Check if the provided tool contains a complete path.
30713        tool_specified="$JAVAC"
30714        tool_basename="${tool_specified##*/}"
30715        if test "x$tool_basename" = "x$tool_specified"; then
30716          # A command without a complete path is provided, search $PATH.
30717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30718$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30719          # Extract the first word of "$tool_basename", so it can be a program name with args.
30720set dummy $tool_basename; ac_word=$2
30721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30722$as_echo_n "checking for $ac_word... " >&6; }
30723if ${ac_cv_path_JAVAC+:} false; then :
30724  $as_echo_n "(cached) " >&6
30725else
30726  case $JAVAC in
30727  [\\/]* | ?:[\\/]*)
30728  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30729  ;;
30730  *)
30731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30732for as_dir in $PATH
30733do
30734  IFS=$as_save_IFS
30735  test -z "$as_dir" && as_dir=.
30736    for ac_exec_ext in '' $ac_executable_extensions; do
30737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30738    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30740    break 2
30741  fi
30742done
30743  done
30744IFS=$as_save_IFS
30745
30746  ;;
30747esac
30748fi
30749JAVAC=$ac_cv_path_JAVAC
30750if test -n "$JAVAC"; then
30751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30752$as_echo "$JAVAC" >&6; }
30753else
30754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30755$as_echo "no" >&6; }
30756fi
30757
30758
30759          if test "x$JAVAC" = x; then
30760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30761          fi
30762        else
30763          # Otherwise we believe it is a complete path. Use it as it is.
30764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30765$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30767$as_echo_n "checking for JAVAC... " >&6; }
30768          if test ! -x "$tool_specified"; then
30769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30770$as_echo "not found" >&6; }
30771            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30772          fi
30773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30774$as_echo "$tool_specified" >&6; }
30775        fi
30776      fi
30777    fi
30778
30779  fi
30780
30781
30782
30783  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30784
30785  # Publish this variable in the help.
30786
30787
30788  if [ -z "${JAVAH+x}" ]; then
30789    # The variable is not set by user, try to locate tool using the code snippet
30790
30791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30792$as_echo_n "checking for javah in Boot JDK... " >&6; }
30793      JAVAH=$BOOT_JDK/bin/javah
30794      if test ! -x $JAVAH; then
30795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30796$as_echo "not found" >&6; }
30797        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30798$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30799        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30800      fi
30801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30802$as_echo "ok" >&6; }
30803
30804
30805  else
30806    # The variable is set, but is it from the command line or the environment?
30807
30808    # Try to remove the string !JAVAH! from our list.
30809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30811      # If it failed, the variable was not from the command line. Ignore it,
30812      # but warn the user (except for BASH, which is always set by the calling BASH).
30813      if test "xJAVAH" != xBASH; then
30814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30815$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30816      fi
30817      # Try to locate tool using the code snippet
30818
30819      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30820$as_echo_n "checking for javah in Boot JDK... " >&6; }
30821      JAVAH=$BOOT_JDK/bin/javah
30822      if test ! -x $JAVAH; then
30823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30824$as_echo "not found" >&6; }
30825        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30826$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30827        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30828      fi
30829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30830$as_echo "ok" >&6; }
30831
30832
30833    else
30834      # If it succeeded, then it was overridden by the user. We will use it
30835      # for the tool.
30836
30837      # First remove it from the list of overridden variables, so we can test
30838      # for unknown variables in the end.
30839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30840
30841      # Check if we try to supply an empty value
30842      if test "x$JAVAH" = x; then
30843        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30844$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30845        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30846$as_echo_n "checking for JAVAH... " >&6; }
30847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30848$as_echo "disabled" >&6; }
30849      else
30850        # Check if the provided tool contains a complete path.
30851        tool_specified="$JAVAH"
30852        tool_basename="${tool_specified##*/}"
30853        if test "x$tool_basename" = "x$tool_specified"; then
30854          # A command without a complete path is provided, search $PATH.
30855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30856$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30857          # Extract the first word of "$tool_basename", so it can be a program name with args.
30858set dummy $tool_basename; ac_word=$2
30859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30860$as_echo_n "checking for $ac_word... " >&6; }
30861if ${ac_cv_path_JAVAH+:} false; then :
30862  $as_echo_n "(cached) " >&6
30863else
30864  case $JAVAH in
30865  [\\/]* | ?:[\\/]*)
30866  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30867  ;;
30868  *)
30869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30870for as_dir in $PATH
30871do
30872  IFS=$as_save_IFS
30873  test -z "$as_dir" && as_dir=.
30874    for ac_exec_ext in '' $ac_executable_extensions; do
30875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30876    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30878    break 2
30879  fi
30880done
30881  done
30882IFS=$as_save_IFS
30883
30884  ;;
30885esac
30886fi
30887JAVAH=$ac_cv_path_JAVAH
30888if test -n "$JAVAH"; then
30889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30890$as_echo "$JAVAH" >&6; }
30891else
30892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30893$as_echo "no" >&6; }
30894fi
30895
30896
30897          if test "x$JAVAH" = x; then
30898            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30899          fi
30900        else
30901          # Otherwise we believe it is a complete path. Use it as it is.
30902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30903$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30904          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30905$as_echo_n "checking for JAVAH... " >&6; }
30906          if test ! -x "$tool_specified"; then
30907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30908$as_echo "not found" >&6; }
30909            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30910          fi
30911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30912$as_echo "$tool_specified" >&6; }
30913        fi
30914      fi
30915    fi
30916
30917  fi
30918
30919
30920
30921  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30922
30923  # Publish this variable in the help.
30924
30925
30926  if [ -z "${JAR+x}" ]; then
30927    # The variable is not set by user, try to locate tool using the code snippet
30928
30929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30930$as_echo_n "checking for jar in Boot JDK... " >&6; }
30931      JAR=$BOOT_JDK/bin/jar
30932      if test ! -x $JAR; then
30933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30934$as_echo "not found" >&6; }
30935        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30936$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30937        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30938      fi
30939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30940$as_echo "ok" >&6; }
30941
30942
30943  else
30944    # The variable is set, but is it from the command line or the environment?
30945
30946    # Try to remove the string !JAR! from our list.
30947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30949      # If it failed, the variable was not from the command line. Ignore it,
30950      # but warn the user (except for BASH, which is always set by the calling BASH).
30951      if test "xJAR" != xBASH; then
30952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30953$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30954      fi
30955      # Try to locate tool using the code snippet
30956
30957      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30958$as_echo_n "checking for jar in Boot JDK... " >&6; }
30959      JAR=$BOOT_JDK/bin/jar
30960      if test ! -x $JAR; then
30961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30962$as_echo "not found" >&6; }
30963        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30964$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30965        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30966      fi
30967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30968$as_echo "ok" >&6; }
30969
30970
30971    else
30972      # If it succeeded, then it was overridden by the user. We will use it
30973      # for the tool.
30974
30975      # First remove it from the list of overridden variables, so we can test
30976      # for unknown variables in the end.
30977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30978
30979      # Check if we try to supply an empty value
30980      if test "x$JAR" = x; then
30981        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30982$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30983        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30984$as_echo_n "checking for JAR... " >&6; }
30985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30986$as_echo "disabled" >&6; }
30987      else
30988        # Check if the provided tool contains a complete path.
30989        tool_specified="$JAR"
30990        tool_basename="${tool_specified##*/}"
30991        if test "x$tool_basename" = "x$tool_specified"; then
30992          # A command without a complete path is provided, search $PATH.
30993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30994$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30995          # Extract the first word of "$tool_basename", so it can be a program name with args.
30996set dummy $tool_basename; ac_word=$2
30997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30998$as_echo_n "checking for $ac_word... " >&6; }
30999if ${ac_cv_path_JAR+:} false; then :
31000  $as_echo_n "(cached) " >&6
31001else
31002  case $JAR in
31003  [\\/]* | ?:[\\/]*)
31004  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31005  ;;
31006  *)
31007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31008for as_dir in $PATH
31009do
31010  IFS=$as_save_IFS
31011  test -z "$as_dir" && as_dir=.
31012    for ac_exec_ext in '' $ac_executable_extensions; do
31013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31014    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31016    break 2
31017  fi
31018done
31019  done
31020IFS=$as_save_IFS
31021
31022  ;;
31023esac
31024fi
31025JAR=$ac_cv_path_JAR
31026if test -n "$JAR"; then
31027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31028$as_echo "$JAR" >&6; }
31029else
31030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31031$as_echo "no" >&6; }
31032fi
31033
31034
31035          if test "x$JAR" = x; then
31036            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31037          fi
31038        else
31039          # Otherwise we believe it is a complete path. Use it as it is.
31040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31041$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31042          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31043$as_echo_n "checking for JAR... " >&6; }
31044          if test ! -x "$tool_specified"; then
31045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31046$as_echo "not found" >&6; }
31047            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31048          fi
31049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31050$as_echo "$tool_specified" >&6; }
31051        fi
31052      fi
31053    fi
31054
31055  fi
31056
31057
31058
31059  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31060
31061  # Publish this variable in the help.
31062
31063
31064  if [ -z "${JARSIGNER+x}" ]; then
31065    # The variable is not set by user, try to locate tool using the code snippet
31066
31067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31068$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31069      JARSIGNER=$BOOT_JDK/bin/jarsigner
31070      if test ! -x $JARSIGNER; then
31071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31072$as_echo "not found" >&6; }
31073        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31074$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31075        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31076      fi
31077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31078$as_echo "ok" >&6; }
31079
31080
31081  else
31082    # The variable is set, but is it from the command line or the environment?
31083
31084    # Try to remove the string !JARSIGNER! from our list.
31085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31087      # If it failed, the variable was not from the command line. Ignore it,
31088      # but warn the user (except for BASH, which is always set by the calling BASH).
31089      if test "xJARSIGNER" != xBASH; then
31090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31091$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31092      fi
31093      # Try to locate tool using the code snippet
31094
31095      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31096$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31097      JARSIGNER=$BOOT_JDK/bin/jarsigner
31098      if test ! -x $JARSIGNER; then
31099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31100$as_echo "not found" >&6; }
31101        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31102$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31103        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31104      fi
31105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31106$as_echo "ok" >&6; }
31107
31108
31109    else
31110      # If it succeeded, then it was overridden by the user. We will use it
31111      # for the tool.
31112
31113      # First remove it from the list of overridden variables, so we can test
31114      # for unknown variables in the end.
31115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31116
31117      # Check if we try to supply an empty value
31118      if test "x$JARSIGNER" = x; then
31119        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31120$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31122$as_echo_n "checking for JARSIGNER... " >&6; }
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31124$as_echo "disabled" >&6; }
31125      else
31126        # Check if the provided tool contains a complete path.
31127        tool_specified="$JARSIGNER"
31128        tool_basename="${tool_specified##*/}"
31129        if test "x$tool_basename" = "x$tool_specified"; then
31130          # A command without a complete path is provided, search $PATH.
31131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31132$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31133          # Extract the first word of "$tool_basename", so it can be a program name with args.
31134set dummy $tool_basename; ac_word=$2
31135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31136$as_echo_n "checking for $ac_word... " >&6; }
31137if ${ac_cv_path_JARSIGNER+:} false; then :
31138  $as_echo_n "(cached) " >&6
31139else
31140  case $JARSIGNER in
31141  [\\/]* | ?:[\\/]*)
31142  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31143  ;;
31144  *)
31145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31146for as_dir in $PATH
31147do
31148  IFS=$as_save_IFS
31149  test -z "$as_dir" && as_dir=.
31150    for ac_exec_ext in '' $ac_executable_extensions; do
31151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31152    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31154    break 2
31155  fi
31156done
31157  done
31158IFS=$as_save_IFS
31159
31160  ;;
31161esac
31162fi
31163JARSIGNER=$ac_cv_path_JARSIGNER
31164if test -n "$JARSIGNER"; then
31165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31166$as_echo "$JARSIGNER" >&6; }
31167else
31168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31169$as_echo "no" >&6; }
31170fi
31171
31172
31173          if test "x$JARSIGNER" = x; then
31174            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31175          fi
31176        else
31177          # Otherwise we believe it is a complete path. Use it as it is.
31178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31179$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31180          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31181$as_echo_n "checking for JARSIGNER... " >&6; }
31182          if test ! -x "$tool_specified"; then
31183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31184$as_echo "not found" >&6; }
31185            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31186          fi
31187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31188$as_echo "$tool_specified" >&6; }
31189        fi
31190      fi
31191    fi
31192
31193  fi
31194
31195
31196
31197  # Finally, set some other options...
31198
31199  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31200  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31201
31202
31203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31204$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31205  if "$JAVA" --list-modules > /dev/null 2>&1; then
31206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31207$as_echo "yes" >&6; }
31208    BOOT_JDK_MODULAR="true"
31209  else
31210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31211$as_echo "no" >&6; }
31212    BOOT_JDK_MODULAR="false"
31213  fi
31214
31215
31216
31217
31218  # Check if the boot jdk is 32 or 64 bit
31219  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31220    BOOT_JDK_BITS="64"
31221  else
31222    BOOT_JDK_BITS="32"
31223  fi
31224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31225$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31227$as_echo "$BOOT_JDK_BITS" >&6; }
31228
31229
31230
31231# Check whether --with-build-jdk was given.
31232if test "${with_build_jdk+set}" = set; then :
31233  withval=$with_build_jdk;
31234fi
31235
31236
31237  CREATE_BUILDJDK=false
31238  EXTERNAL_BUILDJDK=false
31239  BUILD_JDK_FOUND="no"
31240  if test "x$with_build_jdk" != "x"; then
31241
31242  if test "x$BUILD_JDK_FOUND" = xno; then
31243    # Execute the test
31244
31245       if test "x$with_build_jdk" != x; then
31246         BUILD_JDK=$with_build_jdk
31247         BUILD_JDK_FOUND=maybe
31248         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31249$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31250       fi
31251
31252    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31253    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31254      # Do we have a bin/java?
31255      if test ! -x "$BUILD_JDK/bin/java"; then
31256        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31257$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31258        BUILD_JDK_FOUND=no
31259      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31260        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31261$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31262        BUILD_JDK_FOUND=no
31263      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31264        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31265$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31266        BUILD_JDK_FOUND=no
31267      elif test ! -x "$BUILD_JDK/bin/javac"; then
31268        # Do we have a bin/javac?
31269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31270$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31271        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31272$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31273        BUILD_JDK_FOUND=no
31274      else
31275        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31276        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31277
31278        # Extra M4 quote needed to protect [] in grep expression.
31279        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31280        if test "x$FOUND_CORRECT_VERSION" = x; then
31281          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31282$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31283          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31284$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31285          BUILD_JDK_FOUND=no
31286        else
31287          # We're done!
31288          BUILD_JDK_FOUND=yes
31289
31290  # Only process if variable expands to non-empty
31291
31292  if test "x$BUILD_JDK" != x; then
31293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31294
31295  # Input might be given as Windows format, start by converting to
31296  # unix format.
31297  path="$BUILD_JDK"
31298  new_path=`$CYGPATH -u "$path"`
31299
31300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31303  # "foo.exe" is OK but "foo" is an error.
31304  #
31305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31306  # It is also a way to make sure we got the proper file name for the real test later on.
31307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31308  if test "x$test_shortpath" = x; then
31309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31310$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31311    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31312  fi
31313
31314  # Call helper function which possibly converts this using DOS-style short mode.
31315  # If so, the updated path is stored in $new_path.
31316
31317  input_path="$new_path"
31318  # Check if we need to convert this using DOS-style short mode. If the path
31319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31320  # take no chances and rewrite it.
31321  # Note: m4 eats our [], so we need to use [ and ] instead.
31322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31323  if test "x$has_forbidden_chars" != x; then
31324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31328      # Going to short mode and back again did indeed matter. Since short mode is
31329      # case insensitive, let's make it lowercase to improve readability.
31330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31331      # Now convert it back to Unix-style (cygpath)
31332      input_path=`$CYGPATH -u "$shortmode_path"`
31333      new_path="$input_path"
31334    fi
31335  fi
31336
31337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31338  if test "x$test_cygdrive_prefix" = x; then
31339    # As a simple fix, exclude /usr/bin since it's not a real path.
31340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31342      # a path prefixed by /cygdrive for fixpath to work.
31343      new_path="$CYGWIN_ROOT_PATH$input_path"
31344    fi
31345  fi
31346
31347
31348  if test "x$path" != "x$new_path"; then
31349    BUILD_JDK="$new_path"
31350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31351$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31352  fi
31353
31354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31355
31356  path="$BUILD_JDK"
31357  has_colon=`$ECHO $path | $GREP ^.:`
31358  new_path="$path"
31359  if test "x$has_colon" = x; then
31360    # Not in mixed or Windows style, start by that.
31361    new_path=`cmd //c echo $path`
31362  fi
31363
31364
31365  input_path="$new_path"
31366  # Check if we need to convert this using DOS-style short mode. If the path
31367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31368  # take no chances and rewrite it.
31369  # Note: m4 eats our [], so we need to use [ and ] instead.
31370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31371  if test "x$has_forbidden_chars" != x; then
31372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31374  fi
31375
31376
31377  windows_path="$new_path"
31378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31379    unix_path=`$CYGPATH -u "$windows_path"`
31380    new_path="$unix_path"
31381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31383    new_path="$unix_path"
31384  fi
31385
31386  if test "x$path" != "x$new_path"; then
31387    BUILD_JDK="$new_path"
31388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31389$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31390  fi
31391
31392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31394
31395    else
31396      # We're on a unix platform. Hooray! :)
31397      path="$BUILD_JDK"
31398      has_space=`$ECHO "$path" | $GREP " "`
31399      if test "x$has_space" != x; then
31400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31401$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31403      fi
31404
31405      # Use eval to expand a potential ~
31406      eval path="$path"
31407      if test ! -f "$path" && test ! -d "$path"; then
31408        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31409      fi
31410
31411      if test -d "$path"; then
31412        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31413      else
31414        dir="`$DIRNAME "$path"`"
31415        base="`$BASENAME "$path"`"
31416        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31417      fi
31418    fi
31419  fi
31420
31421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31422$as_echo_n "checking for Build JDK... " >&6; }
31423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31424$as_echo "$BUILD_JDK" >&6; }
31425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31426$as_echo_n "checking Build JDK version... " >&6; }
31427          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31429$as_echo "$BUILD_JDK_VERSION" >&6; }
31430        fi # end check jdk version
31431      fi # end check java
31432    fi # end check build jdk found
31433  fi
31434
31435    EXTERNAL_BUILDJDK=true
31436  else
31437    if test "x$COMPILE_TYPE" = "xcross"; then
31438      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31439      BUILD_JDK_FOUND=yes
31440      CREATE_BUILDJDK=true
31441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31442$as_echo_n "checking for Build JDK... " >&6; }
31443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31444$as_echo "yes, will build it for the host platform" >&6; }
31445    else
31446      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31447      BUILD_JDK_FOUND=yes
31448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31449$as_echo_n "checking for Build JDK... " >&6; }
31450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31451$as_echo "yes, will use output dir" >&6; }
31452    fi
31453  fi
31454
31455  JMOD="$BUILD_JDK/bin/jmod"
31456  JLINK="$BUILD_JDK/bin/jlink"
31457
31458
31459
31460  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31462$as_echo_n "checking for Build JDK... " >&6; }
31463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31464$as_echo "no" >&6; }
31465    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31466  fi
31467
31468
31469
31470
31471
31472
31473###############################################################################
31474#
31475# Configure the sources to use. We can add or override individual directories.
31476#
31477###############################################################################
31478
31479
31480  # Where are the sources.
31481  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31482  CORBA_TOPDIR="$SRC_ROOT/corba"
31483  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31484  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31485  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31486  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31487  JDK_TOPDIR="$SRC_ROOT/jdk"
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497  # This feature is no longer supported.
31498
31499
31500
31501# Check whether --with-add-source-root was given.
31502if test "${with_add_source_root+set}" = set; then :
31503  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
31504$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31505fi
31506
31507
31508
31509
31510# Check whether --with-override-source-root was given.
31511if test "${with_override_source_root+set}" = set; then :
31512  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
31513$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31514fi
31515
31516
31517
31518
31519# Check whether --with-adds-and-overrides was given.
31520if test "${with_adds_and_overrides+set}" = set; then :
31521  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
31522$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31523fi
31524
31525
31526
31527
31528# Check whether --with-override-langtools was given.
31529if test "${with_override_langtools+set}" = set; then :
31530  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31531$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31532fi
31533
31534
31535
31536
31537# Check whether --with-override-corba was given.
31538if test "${with_override_corba+set}" = set; then :
31539  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31540$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31541fi
31542
31543
31544
31545
31546# Check whether --with-override-jaxp was given.
31547if test "${with_override_jaxp+set}" = set; then :
31548  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31549$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31550fi
31551
31552
31553
31554
31555# Check whether --with-override-jaxws was given.
31556if test "${with_override_jaxws+set}" = set; then :
31557  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31558$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31559fi
31560
31561
31562
31563
31564# Check whether --with-override-hotspot was given.
31565if test "${with_override_hotspot+set}" = set; then :
31566  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31567$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31568fi
31569
31570
31571
31572
31573# Check whether --with-override-nashorn was given.
31574if test "${with_override_nashorn+set}" = set; then :
31575  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31576$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31577fi
31578
31579
31580
31581
31582# Check whether --with-override-jdk was given.
31583if test "${with_override_jdk+set}" = set; then :
31584  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31585$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31586fi
31587
31588
31589
31590
31591  BUILD_OUTPUT="$OUTPUT_ROOT"
31592
31593  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31594
31595
31596
31597# Check whether --with-import_hotspot was given.
31598if test "${with_import_hotspot+set}" = set; then :
31599  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31600$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31601fi
31602
31603
31604
31605
31606
31607
31608# Check whether --with-import-modules was given.
31609if test "${with_import_modules+set}" = set; then :
31610  withval=$with_import_modules;
31611fi
31612
31613
31614  if test "x$with_import_modules" != x \
31615      && test "x$with_import_modules" != "xno"; then
31616    if test -d "$with_import_modules"; then
31617      IMPORT_MODULES_TOPDIR="$with_import_modules"
31618
31619  # Only process if variable expands to non-empty
31620
31621  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31623
31624  # Input might be given as Windows format, start by converting to
31625  # unix format.
31626  path="$IMPORT_MODULES_TOPDIR"
31627  new_path=`$CYGPATH -u "$path"`
31628
31629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31632  # "foo.exe" is OK but "foo" is an error.
31633  #
31634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31635  # It is also a way to make sure we got the proper file name for the real test later on.
31636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31637  if test "x$test_shortpath" = x; then
31638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31639$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31640    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31641  fi
31642
31643  # Call helper function which possibly converts this using DOS-style short mode.
31644  # If so, the updated path is stored in $new_path.
31645
31646  input_path="$new_path"
31647  # Check if we need to convert this using DOS-style short mode. If the path
31648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31649  # take no chances and rewrite it.
31650  # Note: m4 eats our [], so we need to use [ and ] instead.
31651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31652  if test "x$has_forbidden_chars" != x; then
31653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31657      # Going to short mode and back again did indeed matter. Since short mode is
31658      # case insensitive, let's make it lowercase to improve readability.
31659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31660      # Now convert it back to Unix-style (cygpath)
31661      input_path=`$CYGPATH -u "$shortmode_path"`
31662      new_path="$input_path"
31663    fi
31664  fi
31665
31666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31667  if test "x$test_cygdrive_prefix" = x; then
31668    # As a simple fix, exclude /usr/bin since it's not a real path.
31669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31671      # a path prefixed by /cygdrive for fixpath to work.
31672      new_path="$CYGWIN_ROOT_PATH$input_path"
31673    fi
31674  fi
31675
31676
31677  if test "x$path" != "x$new_path"; then
31678    IMPORT_MODULES_TOPDIR="$new_path"
31679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31680$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31681  fi
31682
31683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31684
31685  path="$IMPORT_MODULES_TOPDIR"
31686  has_colon=`$ECHO $path | $GREP ^.:`
31687  new_path="$path"
31688  if test "x$has_colon" = x; then
31689    # Not in mixed or Windows style, start by that.
31690    new_path=`cmd //c echo $path`
31691  fi
31692
31693
31694  input_path="$new_path"
31695  # Check if we need to convert this using DOS-style short mode. If the path
31696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31697  # take no chances and rewrite it.
31698  # Note: m4 eats our [], so we need to use [ and ] instead.
31699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31700  if test "x$has_forbidden_chars" != x; then
31701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31703  fi
31704
31705
31706  windows_path="$new_path"
31707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31708    unix_path=`$CYGPATH -u "$windows_path"`
31709    new_path="$unix_path"
31710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31712    new_path="$unix_path"
31713  fi
31714
31715  if test "x$path" != "x$new_path"; then
31716    IMPORT_MODULES_TOPDIR="$new_path"
31717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31718$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31719  fi
31720
31721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31723
31724    else
31725      # We're on a unix platform. Hooray! :)
31726      path="$IMPORT_MODULES_TOPDIR"
31727      has_space=`$ECHO "$path" | $GREP " "`
31728      if test "x$has_space" != x; then
31729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31730$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31732      fi
31733
31734      # Use eval to expand a potential ~
31735      eval path="$path"
31736      if test ! -f "$path" && test ! -d "$path"; then
31737        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31738      fi
31739
31740      if test -d "$path"; then
31741        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31742      else
31743        dir="`$DIRNAME "$path"`"
31744        base="`$BASENAME "$path"`"
31745        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31746      fi
31747    fi
31748  fi
31749
31750    elif test -e "$with_import_modules"; then
31751      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31752      $RM -rf "$IMPORT_MODULES_TOPDIR"
31753      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31754      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31755        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31756      fi
31757    else
31758      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31759    fi
31760  fi
31761
31762  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31763    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31764  fi
31765  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31766    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31767  fi
31768  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31769    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31770  fi
31771  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31772    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31773  fi
31774  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31775    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31776  fi
31777  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31778    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31779  fi
31780  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31781    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31782  fi
31783  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31784    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31785  fi
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797###############################################################################
31798#
31799# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31800# native code.
31801#
31802###############################################################################
31803
31804# See if we are doing a complete static build or not
31805
31806  # Check whether --enable-static-build was given.
31807if test "${enable_static_build+set}" = set; then :
31808  enableval=$enable_static_build;
31809fi
31810
31811  STATIC_BUILD=false
31812  if test "x$enable_static_build" = "xyes"; then
31813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31814$as_echo_n "checking if static build is enabled... " >&6; }
31815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31816$as_echo "yes" >&6; }
31817    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31818      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31819    fi
31820    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31821    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31822    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31823    STATIC_BUILD=true
31824  elif test "x$enable_static_build" = "xno"; then
31825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31826$as_echo_n "checking if static build is enabled... " >&6; }
31827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31828$as_echo "no" >&6; }
31829  elif test "x$enable_static_build" != "x"; then
31830    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31831  fi
31832
31833
31834
31835
31836# First determine the toolchain type (compiler family)
31837
31838
31839# Check whether --with-toolchain-type was given.
31840if test "${with_toolchain_type+set}" = set; then :
31841  withval=$with_toolchain_type;
31842fi
31843
31844
31845  # Use indirect variable referencing
31846  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31847  VALID_TOOLCHAINS=${!toolchain_var_name}
31848
31849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31850    if test -n "$XCODEBUILD"; then
31851      # On Mac OS X, default toolchain to clang after Xcode 5
31852      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31853      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31854      if test $? -ne 0; then
31855        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31856      fi
31857      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31858          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31859          $CUT -f 1 -d .`
31860      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31861$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31862      if test $XCODE_MAJOR_VERSION -ge 5; then
31863          DEFAULT_TOOLCHAIN="clang"
31864      else
31865          DEFAULT_TOOLCHAIN="gcc"
31866      fi
31867    else
31868      # If Xcode is not installed, but the command line tools are
31869      # then we can't run xcodebuild. On these systems we should
31870      # default to clang
31871      DEFAULT_TOOLCHAIN="clang"
31872    fi
31873  else
31874    # First toolchain type in the list is the default
31875    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31876  fi
31877
31878  if test "x$with_toolchain_type" = xlist; then
31879    # List all toolchains
31880    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31881$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31882    for toolchain in $VALID_TOOLCHAINS; do
31883      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31884      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31885      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31886    done
31887
31888    exit 0
31889  elif test "x$with_toolchain_type" != x; then
31890    # User override; check that it is valid
31891    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31892      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31893$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31894      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31895$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31896      as_fn_error $? "Cannot continue." "$LINENO" 5
31897    fi
31898    TOOLCHAIN_TYPE=$with_toolchain_type
31899  else
31900    # No flag given, use default
31901    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31902  fi
31903
31904
31905  TOOLCHAIN_CC_BINARY_clang="clang"
31906  TOOLCHAIN_CC_BINARY_gcc="gcc"
31907  TOOLCHAIN_CC_BINARY_microsoft="cl"
31908  TOOLCHAIN_CC_BINARY_solstudio="cc"
31909  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31910
31911  TOOLCHAIN_CXX_BINARY_clang="clang++"
31912  TOOLCHAIN_CXX_BINARY_gcc="g++"
31913  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31914  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31915  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31916
31917  # Use indirect variable referencing
31918  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31919  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31920  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31921  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31922  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31923  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31924  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31925  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31926
31927
31928  # Define filename patterns
31929  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31930    LIBRARY_PREFIX=
31931    SHARED_LIBRARY_SUFFIX='.dll'
31932    STATIC_LIBRARY_SUFFIX='.lib'
31933    SHARED_LIBRARY='$1.dll'
31934    STATIC_LIBRARY='$1.lib'
31935    OBJ_SUFFIX='.obj'
31936    EXE_SUFFIX='.exe'
31937  else
31938    LIBRARY_PREFIX=lib
31939    SHARED_LIBRARY_SUFFIX='.so'
31940    STATIC_LIBRARY_SUFFIX='.a'
31941    SHARED_LIBRARY='lib$1.so'
31942    STATIC_LIBRARY='lib$1.a'
31943    OBJ_SUFFIX='.o'
31944    EXE_SUFFIX=''
31945    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31946      # For full static builds, we're overloading the SHARED_LIBRARY
31947      # variables in order to limit the amount of changes required.
31948      # It would be better to remove SHARED and just use LIBRARY and
31949      # LIBRARY_SUFFIX for libraries that can be built either
31950      # shared or static and use STATIC_* for libraries that are
31951      # always built statically.
31952      if test "x$STATIC_BUILD" = xtrue; then
31953        SHARED_LIBRARY='lib$1.a'
31954        SHARED_LIBRARY_SUFFIX='.a'
31955      else
31956        SHARED_LIBRARY='lib$1.dylib'
31957        SHARED_LIBRARY_SUFFIX='.dylib'
31958      fi
31959    fi
31960  fi
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31972    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31973$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31974  else
31975    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31976$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31977  fi
31978
31979
31980# User supplied flags should be used when configure detects compilers
31981
31982  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31983    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31984$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31985  fi
31986
31987  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31988    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31989$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31990  fi
31991
31992  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31993    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31994$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31995  fi
31996
31997
31998# Check whether --with-extra-cflags was given.
31999if test "${with_extra_cflags+set}" = set; then :
32000  withval=$with_extra_cflags;
32001fi
32002
32003
32004
32005# Check whether --with-extra-cxxflags was given.
32006if test "${with_extra_cxxflags+set}" = set; then :
32007  withval=$with_extra_cxxflags;
32008fi
32009
32010
32011
32012# Check whether --with-extra-ldflags was given.
32013if test "${with_extra_ldflags+set}" = set; then :
32014  withval=$with_extra_ldflags;
32015fi
32016
32017
32018  EXTRA_CFLAGS="$with_extra_cflags"
32019  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32020  EXTRA_LDFLAGS="$with_extra_ldflags"
32021
32022
32023
32024
32025
32026  # The global CFLAGS and LDLAGS variables are used by configure tests and
32027  # should include the extra parameters
32028  CFLAGS="$EXTRA_CFLAGS"
32029  CXXFLAGS="$EXTRA_CXXFLAGS"
32030  LDFLAGS="$EXTRA_LDFLAGS"
32031  CPPFLAGS=""
32032
32033# The sysroot cflags are needed for configure to be able to run the compilers
32034
32035  if test "x$SYSROOT" != "x"; then
32036    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32037      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32038        # Solaris Studio does not have a concept of sysroot. Instead we must
32039        # make sure the default include and lib dirs are appended to each
32040        # compile and link command line. Must also add -I-xbuiltin to enable
32041        # inlining of system functions and intrinsics.
32042        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32043        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32044            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32045      fi
32046    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32047      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32048      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32049    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32050      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32051      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32052    fi
32053    # The global CFLAGS and LDFLAGS variables need these for configure to function
32054    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32055    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32056    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32057    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32058  fi
32059
32060  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32061    # We also need -iframework<path>/System/Library/Frameworks
32062    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32063    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32064    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32065    # set this here so it doesn't have to be peppered throughout the forest
32066    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32067    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32068  fi
32069
32070
32071
32072
32073
32074# Then detect the actual binaries needed
32075
32076  # FIXME: Is this needed?
32077  ac_ext=cpp
32078ac_cpp='$CXXCPP $CPPFLAGS'
32079ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32080ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32081ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32082
32083
32084  # Store the CFLAGS etc passed to the configure script.
32085  ORG_CFLAGS="$CFLAGS"
32086  ORG_CXXFLAGS="$CXXFLAGS"
32087
32088  # autoconf magic only relies on PATH, so update it if tools dir is specified
32089  OLD_PATH="$PATH"
32090
32091  # On Windows, we need to detect the visual studio installation first.
32092  # This will change the PATH, but we need to keep that new PATH even
32093  # after toolchain detection is done, since the compiler (on x86) uses
32094  # it for DLL resolution in runtime.
32095  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32096      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32097
32098  # Store path to cygwin link.exe to help excluding it when searching for
32099  # VS linker. This must be done before changing the PATH when looking for VS.
32100  # Extract the first word of "link", so it can be a program name with args.
32101set dummy link; ac_word=$2
32102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32103$as_echo_n "checking for $ac_word... " >&6; }
32104if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32105  $as_echo_n "(cached) " >&6
32106else
32107  case $CYGWIN_LINK in
32108  [\\/]* | ?:[\\/]*)
32109  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32110  ;;
32111  *)
32112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32113for as_dir in $PATH
32114do
32115  IFS=$as_save_IFS
32116  test -z "$as_dir" && as_dir=.
32117    for ac_exec_ext in '' $ac_executable_extensions; do
32118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32119    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32121    break 2
32122  fi
32123done
32124  done
32125IFS=$as_save_IFS
32126
32127  ;;
32128esac
32129fi
32130CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32131if test -n "$CYGWIN_LINK"; then
32132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32133$as_echo "$CYGWIN_LINK" >&6; }
32134else
32135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32136$as_echo "no" >&6; }
32137fi
32138
32139
32140  if test "x$CYGWIN_LINK" != x; then
32141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32142$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32143    "$CYGWIN_LINK" --version > /dev/null
32144    if test $? -eq 0 ; then
32145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32146$as_echo "yes" >&6; }
32147    else
32148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32149$as_echo "no" >&6; }
32150      # This might be the VS linker. Don't exclude it later on.
32151      CYGWIN_LINK=""
32152    fi
32153  fi
32154
32155  # First-hand choice is to locate and run the vsvars bat file.
32156
32157
32158# Check whether --with-toolchain-version was given.
32159if test "${with_toolchain_version+set}" = set; then :
32160  withval=$with_toolchain_version;
32161fi
32162
32163
32164  if test "x$with_toolchain_version" = xlist; then
32165    # List all toolchains
32166    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32167$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32168    for version in $VALID_VS_VERSIONS; do
32169      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32170      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32171    done
32172
32173    exit 0
32174  elif test "x$DEVKIT_VS_VERSION" != x; then
32175    VS_VERSION=$DEVKIT_VS_VERSION
32176    TOOLCHAIN_VERSION=$VS_VERSION
32177    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32178    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32179    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32180    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32181    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32182    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32183
32184    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32185    # can still be exported as INCLUDE for compiler invocations without
32186    # SYSROOT_CFLAGS
32187    OLDIFS="$IFS"
32188    IFS=";"
32189    for i in $DEVKIT_VS_INCLUDE; do
32190      ipath=$i
32191
32192  unix_path="$ipath"
32193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32194    windows_path=`$CYGPATH -m "$unix_path"`
32195    ipath="$windows_path"
32196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32197    windows_path=`cmd //c echo $unix_path`
32198    ipath="$windows_path"
32199  fi
32200
32201      VS_INCLUDE="$VS_INCLUDE;$ipath"
32202    done
32203    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32204    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32205    for i in $DEVKIT_VS_LIB; do
32206      libpath=$i
32207
32208  unix_path="$libpath"
32209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32210    windows_path=`$CYGPATH -m "$unix_path"`
32211    libpath="$windows_path"
32212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32213    windows_path=`cmd //c echo $unix_path`
32214    libpath="$windows_path"
32215  fi
32216
32217      VS_LIB="$VS_LIB;$libpath"
32218    done
32219    IFS="$OLDIFS"
32220
32221    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32222$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32223
32224  elif test "x$with_toolchain_version" != x; then
32225    # User override; check that it is valid
32226    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32227      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32228$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32229      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32230$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32231      as_fn_error $? "Cannot continue." "$LINENO" 5
32232    fi
32233    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32234  else
32235    # No flag given, use default
32236    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32237  fi
32238
32239  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32240
32241  VS_VERSION="$VS_VERSION"
32242  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32243  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32244  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32245  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32246
32247  # When using --with-tools-dir, assume it points to the correct and default
32248  # version of Visual Studio or that --with-toolchain-version was also set.
32249  if test "x$with_tools_dir" != x; then
32250
32251  if test "x$VS_ENV_CMD" = x; then
32252    VS_VERSION="${VS_VERSION}"
32253    VS_BASE="$with_tools_dir/../.."
32254    METHOD="--with-tools-dir"
32255
32256    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32257      VCVARSFILE="vc/bin/vcvars32.bat"
32258    else
32259      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32260    fi
32261
32262
32263  windows_path="$VS_BASE"
32264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32265    unix_path=`$CYGPATH -u "$windows_path"`
32266    VS_BASE="$unix_path"
32267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32269    VS_BASE="$unix_path"
32270  fi
32271
32272    if test -d "$VS_BASE"; then
32273      if test -f "$VS_BASE/$VCVARSFILE"; then
32274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32275$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32276        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32277        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32278        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32279        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32280      else
32281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32282$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32284$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32285      fi
32286    fi
32287  fi
32288
32289
32290  if test "x$VS_ENV_CMD" = x; then
32291    VS_VERSION="${VS_VERSION}"
32292    VS_BASE="$with_tools_dir/../../.."
32293    METHOD="--with-tools-dir"
32294
32295    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32296      VCVARSFILE="vc/bin/vcvars32.bat"
32297    else
32298      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32299    fi
32300
32301
32302  windows_path="$VS_BASE"
32303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32304    unix_path=`$CYGPATH -u "$windows_path"`
32305    VS_BASE="$unix_path"
32306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32308    VS_BASE="$unix_path"
32309  fi
32310
32311    if test -d "$VS_BASE"; then
32312      if test -f "$VS_BASE/$VCVARSFILE"; then
32313        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32314$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32315        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32316        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32317        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32318        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32319      else
32320        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32321$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32322        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32323$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32324      fi
32325    fi
32326  fi
32327
32328    if test "x$VS_ENV_CMD" = x; then
32329      # Having specified an argument which is incorrect will produce an instant failure;
32330      # we should not go on looking
32331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32332$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32333      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32334$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32335      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32336$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32337      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32338    fi
32339  fi
32340
32341  VS_ENV_CMD=""
32342  VS_ENV_ARGS=""
32343
32344  if test "x$VS_COMNTOOLS" != x; then
32345
32346  if test "x$VS_ENV_CMD" = x; then
32347    VS_VERSION="${VS_VERSION}"
32348    VS_BASE="$VS_COMNTOOLS/../.."
32349    METHOD="$VS_COMNTOOLS_VAR variable"
32350
32351    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32352      VCVARSFILE="vc/bin/vcvars32.bat"
32353    else
32354      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32355    fi
32356
32357
32358  windows_path="$VS_BASE"
32359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32360    unix_path=`$CYGPATH -u "$windows_path"`
32361    VS_BASE="$unix_path"
32362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32364    VS_BASE="$unix_path"
32365  fi
32366
32367    if test -d "$VS_BASE"; then
32368      if test -f "$VS_BASE/$VCVARSFILE"; then
32369        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32370$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32371        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32372        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32373        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32374        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32375      else
32376        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32377$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32378        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32379$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32380      fi
32381    fi
32382  fi
32383
32384  fi
32385  if test "x$PROGRAMFILES" != x; then
32386
32387  if test "x$VS_ENV_CMD" = x; then
32388    VS_VERSION="${VS_VERSION}"
32389    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32390    METHOD="well-known name"
32391
32392    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32393      VCVARSFILE="vc/bin/vcvars32.bat"
32394    else
32395      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32396    fi
32397
32398
32399  windows_path="$VS_BASE"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    VS_BASE="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    VS_BASE="$unix_path"
32406  fi
32407
32408    if test -d "$VS_BASE"; then
32409      if test -f "$VS_BASE/$VCVARSFILE"; then
32410        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32411$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32412        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32413        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32414        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32415        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32416      else
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32418$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32419        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32420$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32421      fi
32422    fi
32423  fi
32424
32425  fi
32426  # Work around the insanely named ProgramFiles(x86) env variable
32427  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32428  if test "x$PROGRAMFILES_X86" != x; then
32429
32430  if test "x$VS_ENV_CMD" = x; then
32431    VS_VERSION="${VS_VERSION}"
32432    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32433    METHOD="well-known name"
32434
32435    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32436      VCVARSFILE="vc/bin/vcvars32.bat"
32437    else
32438      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32439    fi
32440
32441
32442  windows_path="$VS_BASE"
32443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32444    unix_path=`$CYGPATH -u "$windows_path"`
32445    VS_BASE="$unix_path"
32446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32448    VS_BASE="$unix_path"
32449  fi
32450
32451    if test -d "$VS_BASE"; then
32452      if test -f "$VS_BASE/$VCVARSFILE"; then
32453        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32454$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32455        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32456        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32457        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32458        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32459      else
32460        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32461$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32462        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32463$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32464      fi
32465    fi
32466  fi
32467
32468  fi
32469
32470  if test "x$VS_ENV_CMD" = x; then
32471    VS_VERSION="${VS_VERSION}"
32472    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32473    METHOD="well-known name"
32474
32475    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32476      VCVARSFILE="vc/bin/vcvars32.bat"
32477    else
32478      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32479    fi
32480
32481
32482  windows_path="$VS_BASE"
32483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32484    unix_path=`$CYGPATH -u "$windows_path"`
32485    VS_BASE="$unix_path"
32486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32488    VS_BASE="$unix_path"
32489  fi
32490
32491    if test -d "$VS_BASE"; then
32492      if test -f "$VS_BASE/$VCVARSFILE"; then
32493        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32494$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32495        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32496        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32497        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32498        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32499      else
32500        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32501$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32502        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32503$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32504      fi
32505    fi
32506  fi
32507
32508
32509  if test "x$VS_ENV_CMD" = x; then
32510    VS_VERSION="${VS_VERSION}"
32511    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32512    METHOD="well-known name"
32513
32514    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32515      VCVARSFILE="vc/bin/vcvars32.bat"
32516    else
32517      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32518    fi
32519
32520
32521  windows_path="$VS_BASE"
32522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32523    unix_path=`$CYGPATH -u "$windows_path"`
32524    VS_BASE="$unix_path"
32525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32527    VS_BASE="$unix_path"
32528  fi
32529
32530    if test -d "$VS_BASE"; then
32531      if test -f "$VS_BASE/$VCVARSFILE"; then
32532        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32533$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32534        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32535        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32536        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32537        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32538      else
32539        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32540$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32541        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32542$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32543      fi
32544    fi
32545  fi
32546
32547
32548  if test "x$SDK_INSTALL_DIR" != x; then
32549    if test "x$ProgramW6432" != x; then
32550
32551  if test "x$VS_ENV_CMD" = x; then
32552    VS_VERSION="${VS_VERSION}"
32553    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32554    METHOD="well-known name"
32555
32556  windows_path="$WIN_SDK_BASE"
32557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32558    unix_path=`$CYGPATH -u "$windows_path"`
32559    WIN_SDK_BASE="$unix_path"
32560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32562    WIN_SDK_BASE="$unix_path"
32563  fi
32564
32565    if test -d "$WIN_SDK_BASE"; then
32566      # There have been cases of partial or broken SDK installations. A missing
32567      # lib dir is not going to work.
32568      if test ! -d "$WIN_SDK_BASE/lib"; then
32569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32570$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32571        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32572$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32573      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32574        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32575$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32576        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32577        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32578          VS_ENV_ARGS="/x86"
32579        else
32580          VS_ENV_ARGS="/x64"
32581        fi
32582        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32583        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32584        # TODO: improve detection for other versions of SDK
32585        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32586      else
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32588$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32590$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32591      fi
32592    fi
32593  fi
32594
32595    fi
32596    if test "x$PROGRAMW6432" != x; then
32597
32598  if test "x$VS_ENV_CMD" = x; then
32599    VS_VERSION="${VS_VERSION}"
32600    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32601    METHOD="well-known name"
32602
32603  windows_path="$WIN_SDK_BASE"
32604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32605    unix_path=`$CYGPATH -u "$windows_path"`
32606    WIN_SDK_BASE="$unix_path"
32607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32609    WIN_SDK_BASE="$unix_path"
32610  fi
32611
32612    if test -d "$WIN_SDK_BASE"; then
32613      # There have been cases of partial or broken SDK installations. A missing
32614      # lib dir is not going to work.
32615      if test ! -d "$WIN_SDK_BASE/lib"; then
32616        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32617$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32618        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32619$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32620      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32622$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32623        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32624        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32625          VS_ENV_ARGS="/x86"
32626        else
32627          VS_ENV_ARGS="/x64"
32628        fi
32629        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32630        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32631        # TODO: improve detection for other versions of SDK
32632        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32633      else
32634        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32635$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32636        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32637$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32638      fi
32639    fi
32640  fi
32641
32642    fi
32643    if test "x$PROGRAMFILES" != x; then
32644
32645  if test "x$VS_ENV_CMD" = x; then
32646    VS_VERSION="${VS_VERSION}"
32647    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32648    METHOD="well-known name"
32649
32650  windows_path="$WIN_SDK_BASE"
32651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32652    unix_path=`$CYGPATH -u "$windows_path"`
32653    WIN_SDK_BASE="$unix_path"
32654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32656    WIN_SDK_BASE="$unix_path"
32657  fi
32658
32659    if test -d "$WIN_SDK_BASE"; then
32660      # There have been cases of partial or broken SDK installations. A missing
32661      # lib dir is not going to work.
32662      if test ! -d "$WIN_SDK_BASE/lib"; then
32663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32666$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32667      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32668        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32669$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32670        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32671        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32672          VS_ENV_ARGS="/x86"
32673        else
32674          VS_ENV_ARGS="/x64"
32675        fi
32676        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32677        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32678        # TODO: improve detection for other versions of SDK
32679        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32680      else
32681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32682$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32683        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32684$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32685      fi
32686    fi
32687  fi
32688
32689    fi
32690
32691  if test "x$VS_ENV_CMD" = x; then
32692    VS_VERSION="${VS_VERSION}"
32693    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32694    METHOD="well-known name"
32695
32696  windows_path="$WIN_SDK_BASE"
32697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32698    unix_path=`$CYGPATH -u "$windows_path"`
32699    WIN_SDK_BASE="$unix_path"
32700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32702    WIN_SDK_BASE="$unix_path"
32703  fi
32704
32705    if test -d "$WIN_SDK_BASE"; then
32706      # There have been cases of partial or broken SDK installations. A missing
32707      # lib dir is not going to work.
32708      if test ! -d "$WIN_SDK_BASE/lib"; then
32709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32710$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32711        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32712$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32713      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32714        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32715$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32716        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32717        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32718          VS_ENV_ARGS="/x86"
32719        else
32720          VS_ENV_ARGS="/x64"
32721        fi
32722        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32723        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32724        # TODO: improve detection for other versions of SDK
32725        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32726      else
32727        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32728$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32729        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32730$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32731      fi
32732    fi
32733  fi
32734
32735
32736  if test "x$VS_ENV_CMD" = x; then
32737    VS_VERSION="${VS_VERSION}"
32738    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32739    METHOD="well-known name"
32740
32741  windows_path="$WIN_SDK_BASE"
32742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32743    unix_path=`$CYGPATH -u "$windows_path"`
32744    WIN_SDK_BASE="$unix_path"
32745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32747    WIN_SDK_BASE="$unix_path"
32748  fi
32749
32750    if test -d "$WIN_SDK_BASE"; then
32751      # There have been cases of partial or broken SDK installations. A missing
32752      # lib dir is not going to work.
32753      if test ! -d "$WIN_SDK_BASE/lib"; then
32754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32755$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32756        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32757$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32758      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32759        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32760$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32761        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32762        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32763          VS_ENV_ARGS="/x86"
32764        else
32765          VS_ENV_ARGS="/x64"
32766        fi
32767        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32768        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32769        # TODO: improve detection for other versions of SDK
32770        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32771      else
32772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32773$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32774        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32775$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32776      fi
32777    fi
32778  fi
32779
32780  fi
32781
32782    if test "x$VS_ENV_CMD" != x; then
32783      TOOLCHAIN_VERSION=$VS_VERSION
32784      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32785      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32786      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32787      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32788      # The rest of the variables are already evaled while probing
32789      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32790$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32791      break
32792    fi
32793  done
32794
32795
32796  # If we have a devkit, skip all of the below.
32797  if test "x$DEVKIT_VS_VERSION" = x; then
32798    if test "x$VS_ENV_CMD" != x; then
32799      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32800
32801  # Only process if variable expands to non-empty
32802
32803  if test "x$VS_ENV_CMD" != x; then
32804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32805
32806  # First separate the path from the arguments. This will split at the first
32807  # space.
32808  complete="$VS_ENV_CMD"
32809  path="${complete%% *}"
32810  tmp="$complete EOL"
32811  arguments="${tmp#* }"
32812
32813  # Input might be given as Windows format, start by converting to
32814  # unix format.
32815  new_path=`$CYGPATH -u "$path"`
32816
32817  # Now try to locate executable using which
32818  new_path=`$WHICH "$new_path" 2> /dev/null`
32819  # bat and cmd files are not always considered executable in cygwin causing which
32820  # to not find them
32821  if test "x$new_path" = x \
32822      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32823      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32824    new_path=`$CYGPATH -u "$path"`
32825  fi
32826  if test "x$new_path" = x; then
32827    # Oops. Which didn't find the executable.
32828    # The splitting of arguments from the executable at a space might have been incorrect,
32829    # since paths with space are more likely in Windows. Give it another try with the whole
32830    # argument.
32831    path="$complete"
32832    arguments="EOL"
32833    new_path=`$CYGPATH -u "$path"`
32834    new_path=`$WHICH "$new_path" 2> /dev/null`
32835    # bat and cmd files are not always considered executable in cygwin causing which
32836    # to not find them
32837    if test "x$new_path" = x \
32838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32840      new_path=`$CYGPATH -u "$path"`
32841    fi
32842    if test "x$new_path" = x; then
32843      # It's still not found. Now this is an unrecoverable error.
32844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32845$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32846      has_space=`$ECHO "$complete" | $GREP " "`
32847      if test "x$has_space" != x; then
32848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32850      fi
32851      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32852    fi
32853  fi
32854
32855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32858  # "foo.exe" is OK but "foo" is an error.
32859  #
32860  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32861  # It is also a way to make sure we got the proper file name for the real test later on.
32862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32863  if test "x$test_shortpath" = x; then
32864    # Short path failed, file does not exist as specified.
32865    # Try adding .exe or .cmd
32866    if test -f "${new_path}.exe"; then
32867      input_to_shortpath="${new_path}.exe"
32868    elif test -f "${new_path}.cmd"; then
32869      input_to_shortpath="${new_path}.cmd"
32870    else
32871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32872$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32873      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32874$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32875      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32876    fi
32877  else
32878    input_to_shortpath="$new_path"
32879  fi
32880
32881  # Call helper function which possibly converts this using DOS-style short mode.
32882  # If so, the updated path is stored in $new_path.
32883  new_path="$input_to_shortpath"
32884
32885  input_path="$input_to_shortpath"
32886  # Check if we need to convert this using DOS-style short mode. If the path
32887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32888  # take no chances and rewrite it.
32889  # Note: m4 eats our [], so we need to use [ and ] instead.
32890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32891  if test "x$has_forbidden_chars" != x; then
32892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32896      # Going to short mode and back again did indeed matter. Since short mode is
32897      # case insensitive, let's make it lowercase to improve readability.
32898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32899      # Now convert it back to Unix-style (cygpath)
32900      input_path=`$CYGPATH -u "$shortmode_path"`
32901      new_path="$input_path"
32902    fi
32903  fi
32904
32905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32906  if test "x$test_cygdrive_prefix" = x; then
32907    # As a simple fix, exclude /usr/bin since it's not a real path.
32908    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32910      # a path prefixed by /cygdrive for fixpath to work.
32911      new_path="$CYGWIN_ROOT_PATH$input_path"
32912    fi
32913  fi
32914
32915  # remove trailing .exe if any
32916  new_path="${new_path/%.exe/}"
32917
32918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32919
32920  # First separate the path from the arguments. This will split at the first
32921  # space.
32922  complete="$VS_ENV_CMD"
32923  path="${complete%% *}"
32924  tmp="$complete EOL"
32925  arguments="${tmp#* }"
32926
32927  # Input might be given as Windows format, start by converting to
32928  # unix format.
32929  new_path="$path"
32930
32931  windows_path="$new_path"
32932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32933    unix_path=`$CYGPATH -u "$windows_path"`
32934    new_path="$unix_path"
32935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32937    new_path="$unix_path"
32938  fi
32939
32940
32941  # Now try to locate executable using which
32942  new_path=`$WHICH "$new_path" 2> /dev/null`
32943
32944  if test "x$new_path" = x; then
32945    # Oops. Which didn't find the executable.
32946    # The splitting of arguments from the executable at a space might have been incorrect,
32947    # since paths with space are more likely in Windows. Give it another try with the whole
32948    # argument.
32949    path="$complete"
32950    arguments="EOL"
32951    new_path="$path"
32952
32953  windows_path="$new_path"
32954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32955    unix_path=`$CYGPATH -u "$windows_path"`
32956    new_path="$unix_path"
32957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32959    new_path="$unix_path"
32960  fi
32961
32962
32963    new_path=`$WHICH "$new_path" 2> /dev/null`
32964    # bat and cmd files are not always considered executable in MSYS causing which
32965    # to not find them
32966    if test "x$new_path" = x \
32967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32969      new_path="$path"
32970
32971  windows_path="$new_path"
32972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32973    unix_path=`$CYGPATH -u "$windows_path"`
32974    new_path="$unix_path"
32975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32977    new_path="$unix_path"
32978  fi
32979
32980    fi
32981
32982    if test "x$new_path" = x; then
32983      # It's still not found. Now this is an unrecoverable error.
32984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32985$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32986      has_space=`$ECHO "$complete" | $GREP " "`
32987      if test "x$has_space" != x; then
32988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32990      fi
32991      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32992    fi
32993  fi
32994
32995  # Now new_path has a complete unix path to the binary
32996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32997    # Keep paths in /bin as-is, but remove trailing .exe if any
32998    new_path="${new_path/%.exe/}"
32999    # Do not save /bin paths to all_fixpath_prefixes!
33000  else
33001    # Not in mixed or Windows style, start by that.
33002    new_path=`cmd //c echo $new_path`
33003
33004  input_path="$new_path"
33005  # Check if we need to convert this using DOS-style short mode. If the path
33006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33007  # take no chances and rewrite it.
33008  # Note: m4 eats our [], so we need to use [ and ] instead.
33009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33010  if test "x$has_forbidden_chars" != x; then
33011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33013  fi
33014
33015    # Output is in $new_path
33016
33017  windows_path="$new_path"
33018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33019    unix_path=`$CYGPATH -u "$windows_path"`
33020    new_path="$unix_path"
33021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33023    new_path="$unix_path"
33024  fi
33025
33026    # remove trailing .exe if any
33027    new_path="${new_path/%.exe/}"
33028
33029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33031  fi
33032
33033    else
33034      # We're on a unix platform. Hooray! :)
33035      # First separate the path from the arguments. This will split at the first
33036      # space.
33037      complete="$VS_ENV_CMD"
33038      path="${complete%% *}"
33039      tmp="$complete EOL"
33040      arguments="${tmp#* }"
33041
33042      # Cannot rely on the command "which" here since it doesn't always work.
33043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33044      if test -z "$is_absolute_path"; then
33045        # Path to executable is not absolute. Find it.
33046        IFS_save="$IFS"
33047        IFS=:
33048        for p in $PATH; do
33049          if test -f "$p/$path" && test -x "$p/$path"; then
33050            new_path="$p/$path"
33051            break
33052          fi
33053        done
33054        IFS="$IFS_save"
33055      else
33056        # This is an absolute path, we can use it without further modifications.
33057        new_path="$path"
33058      fi
33059
33060      if test "x$new_path" = x; then
33061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33062$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33063        has_space=`$ECHO "$complete" | $GREP " "`
33064        if test "x$has_space" != x; then
33065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33067        fi
33068        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33069      fi
33070    fi
33071
33072    # Now join together the path and the arguments once again
33073    if test "x$arguments" != xEOL; then
33074      new_complete="$new_path ${arguments% *}"
33075    else
33076      new_complete="$new_path"
33077    fi
33078
33079    if test "x$complete" != "x$new_complete"; then
33080      VS_ENV_CMD="$new_complete"
33081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33082$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33083    fi
33084  fi
33085
33086
33087      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33088      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33089$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33090
33091      # We need to create a couple of temporary files.
33092      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33093      $MKDIR -p $VS_ENV_TMP_DIR
33094
33095      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33096      # Instead create a shell script which will set the relevant variables when run.
33097      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33098
33099  unix_path="$WINPATH_VS_ENV_CMD"
33100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33101    windows_path=`$CYGPATH -m "$unix_path"`
33102    WINPATH_VS_ENV_CMD="$windows_path"
33103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33104    windows_path=`cmd //c echo $unix_path`
33105    WINPATH_VS_ENV_CMD="$windows_path"
33106  fi
33107
33108      WINPATH_BASH="$BASH"
33109
33110  unix_path="$WINPATH_BASH"
33111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33112    windows_path=`$CYGPATH -m "$unix_path"`
33113    WINPATH_BASH="$windows_path"
33114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33115    windows_path=`cmd //c echo $unix_path`
33116    WINPATH_BASH="$windows_path"
33117  fi
33118
33119
33120      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33121      # script (executable by bash) that will setup the important variables.
33122      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33123      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33124      # This will end up something like:
33125      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33126      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33127      # These will end up something like:
33128      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33129      # The trailing space for everyone except PATH is no typo, but is needed due
33130      # to trailing \ in the Windows paths. These will be stripped later.
33131      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33132          >> $EXTRACT_VC_ENV_BAT_FILE
33133      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33134          >> $EXTRACT_VC_ENV_BAT_FILE
33135      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33136          >> $EXTRACT_VC_ENV_BAT_FILE
33137      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33138          >> $EXTRACT_VC_ENV_BAT_FILE
33139      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33140          >> $EXTRACT_VC_ENV_BAT_FILE
33141      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33142          >> $EXTRACT_VC_ENV_BAT_FILE
33143
33144      # Now execute the newly created bat file.
33145      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33146      # Change directory so we don't need to mess with Windows paths in redirects.
33147      cd $VS_ENV_TMP_DIR
33148      cmd /c extract-vs-env.bat | $CAT
33149      cd $CURDIR
33150
33151      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33152        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33153$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33154        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33155$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33156        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33157$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33158        as_fn_error $? "Cannot continue" "$LINENO" 5
33159      fi
33160
33161      # Now set all paths and other env variables. This will allow the rest of
33162      # the configure script to find and run the compiler in the proper way.
33163      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33164$as_echo "$as_me: Setting extracted environment variables" >&6;}
33165      . $VS_ENV_TMP_DIR/set-vs-env.sh
33166      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33167      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33168    else
33169      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33170      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33171$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33172    fi
33173  fi
33174
33175  # At this point, we should have correct variables in the environment, or we can't continue.
33176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33177$as_echo_n "checking for Visual Studio variables... " >&6; }
33178
33179  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33180      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33181    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33183$as_echo "present but broken" >&6; }
33184      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33185    else
33186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33187$as_echo "ok" >&6; }
33188      # Remove any trailing "\" ";" and " " from the variables.
33189      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33190      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33191      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33192      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33193      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33194      # Remove any paths containing # (typically F#) as that messes up make. This
33195      # is needed if visual studio was installed with F# support.
33196      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33197
33198
33199
33200
33201
33202      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33203      OLDIFS="$IFS"
33204      IFS=";"
33205      for i in $VS_INCLUDE; do
33206        ipath=$i
33207        # Only process non-empty elements
33208        if test "x$ipath" != x; then
33209          IFS="$OLDIFS"
33210          # Check that directory exists before calling fixup_path
33211          testpath=$ipath
33212
33213  windows_path="$testpath"
33214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33215    unix_path=`$CYGPATH -u "$windows_path"`
33216    testpath="$unix_path"
33217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33219    testpath="$unix_path"
33220  fi
33221
33222          if test -d "$testpath"; then
33223
33224  # Only process if variable expands to non-empty
33225
33226  if test "x$ipath" != x; then
33227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33228
33229  # Input might be given as Windows format, start by converting to
33230  # unix format.
33231  path="$ipath"
33232  new_path=`$CYGPATH -u "$path"`
33233
33234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33237  # "foo.exe" is OK but "foo" is an error.
33238  #
33239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33240  # It is also a way to make sure we got the proper file name for the real test later on.
33241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33242  if test "x$test_shortpath" = x; then
33243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33244$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33245    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33246  fi
33247
33248  # Call helper function which possibly converts this using DOS-style short mode.
33249  # If so, the updated path is stored in $new_path.
33250
33251  input_path="$new_path"
33252  # Check if we need to convert this using DOS-style short mode. If the path
33253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33254  # take no chances and rewrite it.
33255  # Note: m4 eats our [], so we need to use [ and ] instead.
33256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33257  if test "x$has_forbidden_chars" != x; then
33258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33262      # Going to short mode and back again did indeed matter. Since short mode is
33263      # case insensitive, let's make it lowercase to improve readability.
33264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33265      # Now convert it back to Unix-style (cygpath)
33266      input_path=`$CYGPATH -u "$shortmode_path"`
33267      new_path="$input_path"
33268    fi
33269  fi
33270
33271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33272  if test "x$test_cygdrive_prefix" = x; then
33273    # As a simple fix, exclude /usr/bin since it's not a real path.
33274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33276      # a path prefixed by /cygdrive for fixpath to work.
33277      new_path="$CYGWIN_ROOT_PATH$input_path"
33278    fi
33279  fi
33280
33281
33282  if test "x$path" != "x$new_path"; then
33283    ipath="$new_path"
33284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33285$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33286  fi
33287
33288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33289
33290  path="$ipath"
33291  has_colon=`$ECHO $path | $GREP ^.:`
33292  new_path="$path"
33293  if test "x$has_colon" = x; then
33294    # Not in mixed or Windows style, start by that.
33295    new_path=`cmd //c echo $path`
33296  fi
33297
33298
33299  input_path="$new_path"
33300  # Check if we need to convert this using DOS-style short mode. If the path
33301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33302  # take no chances and rewrite it.
33303  # Note: m4 eats our [], so we need to use [ and ] instead.
33304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33305  if test "x$has_forbidden_chars" != x; then
33306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33308  fi
33309
33310
33311  windows_path="$new_path"
33312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33313    unix_path=`$CYGPATH -u "$windows_path"`
33314    new_path="$unix_path"
33315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33317    new_path="$unix_path"
33318  fi
33319
33320  if test "x$path" != "x$new_path"; then
33321    ipath="$new_path"
33322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33323$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33324  fi
33325
33326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33328
33329    else
33330      # We're on a unix platform. Hooray! :)
33331      path="$ipath"
33332      has_space=`$ECHO "$path" | $GREP " "`
33333      if test "x$has_space" != x; then
33334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33335$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33337      fi
33338
33339      # Use eval to expand a potential ~
33340      eval path="$path"
33341      if test ! -f "$path" && test ! -d "$path"; then
33342        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33343      fi
33344
33345      if test -d "$path"; then
33346        ipath="`cd "$path"; $THEPWDCMD -L`"
33347      else
33348        dir="`$DIRNAME "$path"`"
33349        base="`$BASENAME "$path"`"
33350        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33351      fi
33352    fi
33353  fi
33354
33355            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33356          fi
33357          IFS=";"
33358        fi
33359      done
33360      # Convert VS_LIB into SYSROOT_LDFLAGS
33361      for i in $VS_LIB; do
33362        libpath=$i
33363        # Only process non-empty elements
33364        if test "x$libpath" != x; then
33365          IFS="$OLDIFS"
33366          # Check that directory exists before calling fixup_path
33367          testpath=$libpath
33368
33369  windows_path="$testpath"
33370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33371    unix_path=`$CYGPATH -u "$windows_path"`
33372    testpath="$unix_path"
33373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33375    testpath="$unix_path"
33376  fi
33377
33378          if test -d "$testpath"; then
33379
33380  # Only process if variable expands to non-empty
33381
33382  if test "x$libpath" != x; then
33383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384
33385  # Input might be given as Windows format, start by converting to
33386  # unix format.
33387  path="$libpath"
33388  new_path=`$CYGPATH -u "$path"`
33389
33390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33393  # "foo.exe" is OK but "foo" is an error.
33394  #
33395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33396  # It is also a way to make sure we got the proper file name for the real test later on.
33397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33398  if test "x$test_shortpath" = x; then
33399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33400$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33401    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33402  fi
33403
33404  # Call helper function which possibly converts this using DOS-style short mode.
33405  # If so, the updated path is stored in $new_path.
33406
33407  input_path="$new_path"
33408  # Check if we need to convert this using DOS-style short mode. If the path
33409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33410  # take no chances and rewrite it.
33411  # Note: m4 eats our [], so we need to use [ and ] instead.
33412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33413  if test "x$has_forbidden_chars" != x; then
33414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33418      # Going to short mode and back again did indeed matter. Since short mode is
33419      # case insensitive, let's make it lowercase to improve readability.
33420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33421      # Now convert it back to Unix-style (cygpath)
33422      input_path=`$CYGPATH -u "$shortmode_path"`
33423      new_path="$input_path"
33424    fi
33425  fi
33426
33427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33428  if test "x$test_cygdrive_prefix" = x; then
33429    # As a simple fix, exclude /usr/bin since it's not a real path.
33430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33432      # a path prefixed by /cygdrive for fixpath to work.
33433      new_path="$CYGWIN_ROOT_PATH$input_path"
33434    fi
33435  fi
33436
33437
33438  if test "x$path" != "x$new_path"; then
33439    libpath="$new_path"
33440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33441$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33442  fi
33443
33444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33445
33446  path="$libpath"
33447  has_colon=`$ECHO $path | $GREP ^.:`
33448  new_path="$path"
33449  if test "x$has_colon" = x; then
33450    # Not in mixed or Windows style, start by that.
33451    new_path=`cmd //c echo $path`
33452  fi
33453
33454
33455  input_path="$new_path"
33456  # Check if we need to convert this using DOS-style short mode. If the path
33457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33458  # take no chances and rewrite it.
33459  # Note: m4 eats our [], so we need to use [ and ] instead.
33460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33461  if test "x$has_forbidden_chars" != x; then
33462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33464  fi
33465
33466
33467  windows_path="$new_path"
33468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33469    unix_path=`$CYGPATH -u "$windows_path"`
33470    new_path="$unix_path"
33471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33473    new_path="$unix_path"
33474  fi
33475
33476  if test "x$path" != "x$new_path"; then
33477    libpath="$new_path"
33478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33479$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33480  fi
33481
33482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33484
33485    else
33486      # We're on a unix platform. Hooray! :)
33487      path="$libpath"
33488      has_space=`$ECHO "$path" | $GREP " "`
33489      if test "x$has_space" != x; then
33490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33491$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33493      fi
33494
33495      # Use eval to expand a potential ~
33496      eval path="$path"
33497      if test ! -f "$path" && test ! -d "$path"; then
33498        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33499      fi
33500
33501      if test -d "$path"; then
33502        libpath="`cd "$path"; $THEPWDCMD -L`"
33503      else
33504        dir="`$DIRNAME "$path"`"
33505        base="`$BASENAME "$path"`"
33506        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33507      fi
33508    fi
33509  fi
33510
33511            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33512          fi
33513          IFS=";"
33514        fi
33515      done
33516      IFS="$OLDIFS"
33517    fi
33518  else
33519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33520$as_echo "not found" >&6; }
33521
33522    if test "x$VS_ENV_CMD" = x; then
33523      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33524$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33525      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33526$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33527    else
33528      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33529$as_echo "$as_me: Running the extraction script failed." >&6;}
33530    fi
33531    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33532$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33533    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33534$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33535    as_fn_error $? "Cannot continue" "$LINENO" 5
33536  fi
33537
33538    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33539    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33540    PATH="$VS_PATH"
33541    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33542    export INCLUDE="$VS_INCLUDE"
33543    export LIB="$VS_LIB"
33544  else
33545    if test "x$XCODE_VERSION_OUTPUT" != x; then
33546      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33547      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33548      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33549    else
33550      # Currently we do not define this for other toolchains. This might change as the need arise.
33551      TOOLCHAIN_VERSION=
33552    fi
33553  fi
33554
33555
33556  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33557  # override all other locations.
33558  if test "x$TOOLCHAIN_PATH" != x; then
33559    PATH=$TOOLCHAIN_PATH:$PATH
33560  fi
33561
33562
33563  #
33564  # Setup the compilers (CC and CXX)
33565  #
33566
33567  COMPILER_NAME=C
33568  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33569
33570  if test "x$CC" != x; then
33571    # User has supplied compiler name already, always let that override.
33572    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33573$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33574    if test "x`basename $CC`" = "x$CC"; then
33575      # A command without a complete path is provided, search $PATH.
33576
33577      for ac_prog in $CC
33578do
33579  # Extract the first word of "$ac_prog", so it can be a program name with args.
33580set dummy $ac_prog; ac_word=$2
33581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33582$as_echo_n "checking for $ac_word... " >&6; }
33583if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33584  $as_echo_n "(cached) " >&6
33585else
33586  case $POTENTIAL_CC in
33587  [\\/]* | ?:[\\/]*)
33588  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33589  ;;
33590  *)
33591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33592for as_dir in $PATH
33593do
33594  IFS=$as_save_IFS
33595  test -z "$as_dir" && as_dir=.
33596    for ac_exec_ext in '' $ac_executable_extensions; do
33597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33598    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33600    break 2
33601  fi
33602done
33603  done
33604IFS=$as_save_IFS
33605
33606  ;;
33607esac
33608fi
33609POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33610if test -n "$POTENTIAL_CC"; then
33611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33612$as_echo "$POTENTIAL_CC" >&6; }
33613else
33614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33615$as_echo "no" >&6; }
33616fi
33617
33618
33619  test -n "$POTENTIAL_CC" && break
33620done
33621
33622      if test "x$POTENTIAL_CC" != x; then
33623        CC=$POTENTIAL_CC
33624      else
33625        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33626      fi
33627    else
33628      # Otherwise it might already be a complete path
33629      if test ! -x "$CC"; then
33630        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33631      fi
33632    fi
33633  else
33634    # No user supplied value. Locate compiler ourselves.
33635
33636    # If we are cross compiling, assume cross compilation tools follows the
33637    # cross compilation standard where they are prefixed with the autoconf
33638    # standard name for the target. For example the binary
33639    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33640    # If we are not cross compiling, then the default compiler name will be
33641    # used.
33642
33643    CC=
33644    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33645    # before checking the rest of the PATH.
33646    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33647    # step, this should not be necessary.
33648    if test -n "$TOOLCHAIN_PATH"; then
33649      PATH_save="$PATH"
33650      PATH="$TOOLCHAIN_PATH"
33651      if test -n "$ac_tool_prefix"; then
33652  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33653set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33655$as_echo_n "checking for $ac_word... " >&6; }
33656if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33657  $as_echo_n "(cached) " >&6
33658else
33659  case $TOOLCHAIN_PATH_CC in
33660  [\\/]* | ?:[\\/]*)
33661  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33662  ;;
33663  *)
33664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33665for as_dir in $PATH
33666do
33667  IFS=$as_save_IFS
33668  test -z "$as_dir" && as_dir=.
33669    for ac_exec_ext in '' $ac_executable_extensions; do
33670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33671    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33673    break 2
33674  fi
33675done
33676  done
33677IFS=$as_save_IFS
33678
33679  ;;
33680esac
33681fi
33682TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33683if test -n "$TOOLCHAIN_PATH_CC"; then
33684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33685$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33686else
33687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33688$as_echo "no" >&6; }
33689fi
33690
33691
33692fi
33693if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33694  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33695  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33696set dummy $SEARCH_LIST; ac_word=$2
33697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33698$as_echo_n "checking for $ac_word... " >&6; }
33699if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33700  $as_echo_n "(cached) " >&6
33701else
33702  case $ac_pt_TOOLCHAIN_PATH_CC in
33703  [\\/]* | ?:[\\/]*)
33704  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33705  ;;
33706  *)
33707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33708for as_dir in $PATH
33709do
33710  IFS=$as_save_IFS
33711  test -z "$as_dir" && as_dir=.
33712    for ac_exec_ext in '' $ac_executable_extensions; do
33713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33714    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33716    break 2
33717  fi
33718done
33719  done
33720IFS=$as_save_IFS
33721
33722  ;;
33723esac
33724fi
33725ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33726if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33728$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33729else
33730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33731$as_echo "no" >&6; }
33732fi
33733
33734  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33735    TOOLCHAIN_PATH_CC=""
33736  else
33737    case $cross_compiling:$ac_tool_warned in
33738yes:)
33739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33741ac_tool_warned=yes ;;
33742esac
33743    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33744  fi
33745else
33746  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33747fi
33748
33749      CC=$TOOLCHAIN_PATH_CC
33750      PATH="$PATH_save"
33751    fi
33752
33753    # AC_PATH_TOOL can't be run multiple times with the same variable,
33754    # so create a new name for this run.
33755    if test "x$CC" = x; then
33756      if test -n "$ac_tool_prefix"; then
33757  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33758set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33760$as_echo_n "checking for $ac_word... " >&6; }
33761if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33762  $as_echo_n "(cached) " >&6
33763else
33764  case $POTENTIAL_CC in
33765  [\\/]* | ?:[\\/]*)
33766  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33767  ;;
33768  *)
33769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33770for as_dir in $PATH
33771do
33772  IFS=$as_save_IFS
33773  test -z "$as_dir" && as_dir=.
33774    for ac_exec_ext in '' $ac_executable_extensions; do
33775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33776    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33778    break 2
33779  fi
33780done
33781  done
33782IFS=$as_save_IFS
33783
33784  ;;
33785esac
33786fi
33787POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33788if test -n "$POTENTIAL_CC"; then
33789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33790$as_echo "$POTENTIAL_CC" >&6; }
33791else
33792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33793$as_echo "no" >&6; }
33794fi
33795
33796
33797fi
33798if test -z "$ac_cv_path_POTENTIAL_CC"; then
33799  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33800  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33801set dummy $SEARCH_LIST; ac_word=$2
33802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33803$as_echo_n "checking for $ac_word... " >&6; }
33804if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33805  $as_echo_n "(cached) " >&6
33806else
33807  case $ac_pt_POTENTIAL_CC in
33808  [\\/]* | ?:[\\/]*)
33809  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33810  ;;
33811  *)
33812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33813for as_dir in $PATH
33814do
33815  IFS=$as_save_IFS
33816  test -z "$as_dir" && as_dir=.
33817    for ac_exec_ext in '' $ac_executable_extensions; do
33818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33819    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821    break 2
33822  fi
33823done
33824  done
33825IFS=$as_save_IFS
33826
33827  ;;
33828esac
33829fi
33830ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33831if test -n "$ac_pt_POTENTIAL_CC"; then
33832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33833$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33834else
33835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33836$as_echo "no" >&6; }
33837fi
33838
33839  if test "x$ac_pt_POTENTIAL_CC" = x; then
33840    POTENTIAL_CC=""
33841  else
33842    case $cross_compiling:$ac_tool_warned in
33843yes:)
33844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33846ac_tool_warned=yes ;;
33847esac
33848    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33849  fi
33850else
33851  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33852fi
33853
33854      CC=$POTENTIAL_CC
33855    fi
33856
33857    if test "x$CC" = x; then
33858
33859  # Print a helpful message on how to acquire the necessary build dependency.
33860  # devkit is the help tag: freetype, cups, alsa etc
33861  MISSING_DEPENDENCY=devkit
33862
33863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33864    cygwin_help $MISSING_DEPENDENCY
33865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33866    msys_help $MISSING_DEPENDENCY
33867  else
33868    PKGHANDLER_COMMAND=
33869
33870    case $PKGHANDLER in
33871      apt-get)
33872        apt_help     $MISSING_DEPENDENCY ;;
33873      yum)
33874        yum_help     $MISSING_DEPENDENCY ;;
33875      brew)
33876        brew_help    $MISSING_DEPENDENCY ;;
33877      port)
33878        port_help    $MISSING_DEPENDENCY ;;
33879      pkgutil)
33880        pkgutil_help $MISSING_DEPENDENCY ;;
33881      pkgadd)
33882        pkgadd_help  $MISSING_DEPENDENCY ;;
33883    esac
33884
33885    if test "x$PKGHANDLER_COMMAND" != x; then
33886      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33887    fi
33888  fi
33889
33890      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33891    fi
33892  fi
33893
33894  # Now we have a compiler binary in CC. Make sure it's okay.
33895
33896  # Only process if variable expands to non-empty
33897
33898  if test "x$CC" != x; then
33899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33900
33901  # First separate the path from the arguments. This will split at the first
33902  # space.
33903  complete="$CC"
33904  path="${complete%% *}"
33905  tmp="$complete EOL"
33906  arguments="${tmp#* }"
33907
33908  # Input might be given as Windows format, start by converting to
33909  # unix format.
33910  new_path=`$CYGPATH -u "$path"`
33911
33912  # Now try to locate executable using which
33913  new_path=`$WHICH "$new_path" 2> /dev/null`
33914  # bat and cmd files are not always considered executable in cygwin causing which
33915  # to not find them
33916  if test "x$new_path" = x \
33917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33919    new_path=`$CYGPATH -u "$path"`
33920  fi
33921  if test "x$new_path" = x; then
33922    # Oops. Which didn't find the executable.
33923    # The splitting of arguments from the executable at a space might have been incorrect,
33924    # since paths with space are more likely in Windows. Give it another try with the whole
33925    # argument.
33926    path="$complete"
33927    arguments="EOL"
33928    new_path=`$CYGPATH -u "$path"`
33929    new_path=`$WHICH "$new_path" 2> /dev/null`
33930    # bat and cmd files are not always considered executable in cygwin causing which
33931    # to not find them
33932    if test "x$new_path" = x \
33933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33935      new_path=`$CYGPATH -u "$path"`
33936    fi
33937    if test "x$new_path" = x; then
33938      # It's still not found. Now this is an unrecoverable error.
33939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33940$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33941      has_space=`$ECHO "$complete" | $GREP " "`
33942      if test "x$has_space" != x; then
33943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33945      fi
33946      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33947    fi
33948  fi
33949
33950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33953  # "foo.exe" is OK but "foo" is an error.
33954  #
33955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33956  # It is also a way to make sure we got the proper file name for the real test later on.
33957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33958  if test "x$test_shortpath" = x; then
33959    # Short path failed, file does not exist as specified.
33960    # Try adding .exe or .cmd
33961    if test -f "${new_path}.exe"; then
33962      input_to_shortpath="${new_path}.exe"
33963    elif test -f "${new_path}.cmd"; then
33964      input_to_shortpath="${new_path}.cmd"
33965    else
33966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33967$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33970      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33971    fi
33972  else
33973    input_to_shortpath="$new_path"
33974  fi
33975
33976  # Call helper function which possibly converts this using DOS-style short mode.
33977  # If so, the updated path is stored in $new_path.
33978  new_path="$input_to_shortpath"
33979
33980  input_path="$input_to_shortpath"
33981  # Check if we need to convert this using DOS-style short mode. If the path
33982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33983  # take no chances and rewrite it.
33984  # Note: m4 eats our [], so we need to use [ and ] instead.
33985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33986  if test "x$has_forbidden_chars" != x; then
33987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33991      # Going to short mode and back again did indeed matter. Since short mode is
33992      # case insensitive, let's make it lowercase to improve readability.
33993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33994      # Now convert it back to Unix-style (cygpath)
33995      input_path=`$CYGPATH -u "$shortmode_path"`
33996      new_path="$input_path"
33997    fi
33998  fi
33999
34000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34001  if test "x$test_cygdrive_prefix" = x; then
34002    # As a simple fix, exclude /usr/bin since it's not a real path.
34003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34005      # a path prefixed by /cygdrive for fixpath to work.
34006      new_path="$CYGWIN_ROOT_PATH$input_path"
34007    fi
34008  fi
34009
34010  # remove trailing .exe if any
34011  new_path="${new_path/%.exe/}"
34012
34013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34014
34015  # First separate the path from the arguments. This will split at the first
34016  # space.
34017  complete="$CC"
34018  path="${complete%% *}"
34019  tmp="$complete EOL"
34020  arguments="${tmp#* }"
34021
34022  # Input might be given as Windows format, start by converting to
34023  # unix format.
34024  new_path="$path"
34025
34026  windows_path="$new_path"
34027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34028    unix_path=`$CYGPATH -u "$windows_path"`
34029    new_path="$unix_path"
34030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34032    new_path="$unix_path"
34033  fi
34034
34035
34036  # Now try to locate executable using which
34037  new_path=`$WHICH "$new_path" 2> /dev/null`
34038
34039  if test "x$new_path" = x; then
34040    # Oops. Which didn't find the executable.
34041    # The splitting of arguments from the executable at a space might have been incorrect,
34042    # since paths with space are more likely in Windows. Give it another try with the whole
34043    # argument.
34044    path="$complete"
34045    arguments="EOL"
34046    new_path="$path"
34047
34048  windows_path="$new_path"
34049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34050    unix_path=`$CYGPATH -u "$windows_path"`
34051    new_path="$unix_path"
34052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34054    new_path="$unix_path"
34055  fi
34056
34057
34058    new_path=`$WHICH "$new_path" 2> /dev/null`
34059    # bat and cmd files are not always considered executable in MSYS causing which
34060    # to not find them
34061    if test "x$new_path" = x \
34062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34064      new_path="$path"
34065
34066  windows_path="$new_path"
34067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34068    unix_path=`$CYGPATH -u "$windows_path"`
34069    new_path="$unix_path"
34070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34072    new_path="$unix_path"
34073  fi
34074
34075    fi
34076
34077    if test "x$new_path" = x; then
34078      # It's still not found. Now this is an unrecoverable error.
34079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34080$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34081      has_space=`$ECHO "$complete" | $GREP " "`
34082      if test "x$has_space" != x; then
34083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34085      fi
34086      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34087    fi
34088  fi
34089
34090  # Now new_path has a complete unix path to the binary
34091  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34092    # Keep paths in /bin as-is, but remove trailing .exe if any
34093    new_path="${new_path/%.exe/}"
34094    # Do not save /bin paths to all_fixpath_prefixes!
34095  else
34096    # Not in mixed or Windows style, start by that.
34097    new_path=`cmd //c echo $new_path`
34098
34099  input_path="$new_path"
34100  # Check if we need to convert this using DOS-style short mode. If the path
34101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34102  # take no chances and rewrite it.
34103  # Note: m4 eats our [], so we need to use [ and ] instead.
34104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34105  if test "x$has_forbidden_chars" != x; then
34106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34108  fi
34109
34110    # Output is in $new_path
34111
34112  windows_path="$new_path"
34113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34114    unix_path=`$CYGPATH -u "$windows_path"`
34115    new_path="$unix_path"
34116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34118    new_path="$unix_path"
34119  fi
34120
34121    # remove trailing .exe if any
34122    new_path="${new_path/%.exe/}"
34123
34124    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34125    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34126  fi
34127
34128    else
34129      # We're on a unix platform. Hooray! :)
34130      # First separate the path from the arguments. This will split at the first
34131      # space.
34132      complete="$CC"
34133      path="${complete%% *}"
34134      tmp="$complete EOL"
34135      arguments="${tmp#* }"
34136
34137      # Cannot rely on the command "which" here since it doesn't always work.
34138      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34139      if test -z "$is_absolute_path"; then
34140        # Path to executable is not absolute. Find it.
34141        IFS_save="$IFS"
34142        IFS=:
34143        for p in $PATH; do
34144          if test -f "$p/$path" && test -x "$p/$path"; then
34145            new_path="$p/$path"
34146            break
34147          fi
34148        done
34149        IFS="$IFS_save"
34150      else
34151        # This is an absolute path, we can use it without further modifications.
34152        new_path="$path"
34153      fi
34154
34155      if test "x$new_path" = x; then
34156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34157$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34158        has_space=`$ECHO "$complete" | $GREP " "`
34159        if test "x$has_space" != x; then
34160          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34161$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34162        fi
34163        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34164      fi
34165    fi
34166
34167    # Now join together the path and the arguments once again
34168    if test "x$arguments" != xEOL; then
34169      new_complete="$new_path ${arguments% *}"
34170    else
34171      new_complete="$new_path"
34172    fi
34173
34174    if test "x$complete" != "x$new_complete"; then
34175      CC="$new_complete"
34176      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34177$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34178    fi
34179  fi
34180
34181  TEST_COMPILER="$CC"
34182
34183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34184$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34185  SYMLINK_ORIGINAL="$TEST_COMPILER"
34186
34187  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34188    # Follow a chain of symbolic links. Use readlink
34189    # where it exists, else fall back to horribly
34190    # complicated shell code.
34191    if test "x$READLINK_TESTED" != yes; then
34192      # On MacOSX there is a readlink tool with a different
34193      # purpose than the GNU readlink tool. Check the found readlink.
34194      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34195      if test "x$ISGNU" = x; then
34196        # A readlink that we do not know how to use.
34197        # Are there other non-GNU readlinks out there?
34198        READLINK_TESTED=yes
34199        READLINK=
34200      fi
34201    fi
34202
34203    if test "x$READLINK" != x; then
34204      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34205    else
34206      # Save the current directory for restoring afterwards
34207      STARTDIR=$PWD
34208      COUNTER=0
34209      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34210      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34211      cd $sym_link_dir
34212      # Use -P flag to resolve symlinks in directories.
34213      cd `$THEPWDCMD -P`
34214      sym_link_dir=`$THEPWDCMD -P`
34215      # Resolve file symlinks
34216      while test $COUNTER -lt 20; do
34217        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34218        if test "x$ISLINK" == x; then
34219          # This is not a symbolic link! We are done!
34220          break
34221        fi
34222        # Again resolve directory symlinks since the target of the just found
34223        # link could be in a different directory
34224        cd `$DIRNAME $ISLINK`
34225        sym_link_dir=`$THEPWDCMD -P`
34226        sym_link_file=`$BASENAME $ISLINK`
34227        let COUNTER=COUNTER+1
34228      done
34229      cd $STARTDIR
34230      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34231    fi
34232  fi
34233
34234  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34236$as_echo "no symlink" >&6; }
34237  else
34238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34239$as_echo "$SYMLINK_ORIGINAL" >&6; }
34240
34241    # We can't handle ccache by gcc wrappers, since we need to know if we're
34242    # using ccache. Instead ccache usage must be controlled by a configure option.
34243    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34244    if test "x$COMPILER_BASENAME" = "xccache"; then
34245      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34246$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34247      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34248    fi
34249  fi
34250
34251
34252  COMPILER=$CC
34253  COMPILER_NAME=$COMPILER_NAME
34254
34255  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34256    # cc -V output typically looks like
34257    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34258    # or
34259    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34260    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34261    # Check that this is likely to be the Solaris Studio cc.
34262    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34263    if test $? -ne 0; then
34264      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34265      { $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
34266$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34267      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34268$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34269      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34270$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34271      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34272    fi
34273    # Remove usage instructions (if present), and
34274    # collapse compiler output into a single line
34275    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34276        $SED -e 's/ *[Uu]sage:.*//'`
34277    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34278        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34279  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34280    # xlc -qversion output typically looks like
34281    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34282    #     Version: 11.01.0000.0015
34283    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34284    # Check that this is likely to be the IBM XL C compiler.
34285    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34286    if test $? -ne 0; then
34287      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34288      { $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
34289$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34290      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34291$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34292      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34293$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34294      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34295    fi
34296    # Collapse compiler output into a single line
34297    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34298    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34299        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34300  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34301    # There is no specific version flag, but all output starts with a version string.
34302    # First line typically looks something like:
34303    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34304    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34305    # Check that this is likely to be Microsoft CL.EXE.
34306    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34307    if test $? -ne 0; then
34308      { $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
34309$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34310      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34311$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34312      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34313    fi
34314    # Collapse compiler output into a single line
34315    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34316    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34317        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34318  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34319    # gcc --version output typically looks like
34320    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34321    #     Copyright (C) 2013 Free Software Foundation, Inc.
34322    #     This is free software; see the source for copying conditions.  There is NO
34323    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34324    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34325    # Check that this is likely to be GCC.
34326    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34327    if test $? -ne 0; then
34328      { $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
34329$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34330      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34331$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34332      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34333    fi
34334    # Remove Copyright and legalese from version string, and
34335    # collapse into a single line
34336    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34337        $SED -e 's/ *Copyright .*//'`
34338    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34339        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34340  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34341    # clang --version output typically looks like
34342    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34343    #    clang version 3.3 (tags/RELEASE_33/final)
34344    # or
34345    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34346    #    Target: x86_64-pc-linux-gnu
34347    #    Thread model: posix
34348    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34349    # Check that this is likely to be clang
34350    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34351    if test $? -ne 0; then
34352      { $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
34353$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34354      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34355$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34356      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34357    fi
34358    # Collapse compiler output into a single line
34359    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34360    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34361        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34362  else
34363      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34364  fi
34365  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34366  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34367  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34368  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34369
34370  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34371$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34372
34373
34374  # Now that we have resolved CC ourself, let autoconf have its go at it
34375  ac_ext=c
34376ac_cpp='$CPP $CPPFLAGS'
34377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34379ac_compiler_gnu=$ac_cv_c_compiler_gnu
34380if test -n "$ac_tool_prefix"; then
34381  for ac_prog in $CC
34382  do
34383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34386$as_echo_n "checking for $ac_word... " >&6; }
34387if ${ac_cv_prog_CC+:} false; then :
34388  $as_echo_n "(cached) " >&6
34389else
34390  if test -n "$CC"; then
34391  ac_cv_prog_CC="$CC" # Let the user override the test.
34392else
34393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34394for as_dir in $PATH
34395do
34396  IFS=$as_save_IFS
34397  test -z "$as_dir" && as_dir=.
34398    for ac_exec_ext in '' $ac_executable_extensions; do
34399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34400    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34402    break 2
34403  fi
34404done
34405  done
34406IFS=$as_save_IFS
34407
34408fi
34409fi
34410CC=$ac_cv_prog_CC
34411if test -n "$CC"; then
34412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34413$as_echo "$CC" >&6; }
34414else
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34416$as_echo "no" >&6; }
34417fi
34418
34419
34420    test -n "$CC" && break
34421  done
34422fi
34423if test -z "$CC"; then
34424  ac_ct_CC=$CC
34425  for ac_prog in $CC
34426do
34427  # Extract the first word of "$ac_prog", so it can be a program name with args.
34428set dummy $ac_prog; ac_word=$2
34429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34430$as_echo_n "checking for $ac_word... " >&6; }
34431if ${ac_cv_prog_ac_ct_CC+:} false; then :
34432  $as_echo_n "(cached) " >&6
34433else
34434  if test -n "$ac_ct_CC"; then
34435  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34436else
34437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34438for as_dir in $PATH
34439do
34440  IFS=$as_save_IFS
34441  test -z "$as_dir" && as_dir=.
34442    for ac_exec_ext in '' $ac_executable_extensions; do
34443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34444    ac_cv_prog_ac_ct_CC="$ac_prog"
34445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34446    break 2
34447  fi
34448done
34449  done
34450IFS=$as_save_IFS
34451
34452fi
34453fi
34454ac_ct_CC=$ac_cv_prog_ac_ct_CC
34455if test -n "$ac_ct_CC"; then
34456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34457$as_echo "$ac_ct_CC" >&6; }
34458else
34459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34460$as_echo "no" >&6; }
34461fi
34462
34463
34464  test -n "$ac_ct_CC" && break
34465done
34466
34467  if test "x$ac_ct_CC" = x; then
34468    CC=""
34469  else
34470    case $cross_compiling:$ac_tool_warned in
34471yes:)
34472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34474ac_tool_warned=yes ;;
34475esac
34476    CC=$ac_ct_CC
34477  fi
34478fi
34479
34480
34481test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34483as_fn_error $? "no acceptable C compiler found in \$PATH
34484See \`config.log' for more details" "$LINENO" 5; }
34485
34486# Provide some information about the compiler.
34487$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34488set X $ac_compile
34489ac_compiler=$2
34490for ac_option in --version -v -V -qversion; do
34491  { { ac_try="$ac_compiler $ac_option >&5"
34492case "(($ac_try" in
34493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34494  *) ac_try_echo=$ac_try;;
34495esac
34496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34497$as_echo "$ac_try_echo"; } >&5
34498  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34499  ac_status=$?
34500  if test -s conftest.err; then
34501    sed '10a\
34502... rest of stderr output deleted ...
34503         10q' conftest.err >conftest.er1
34504    cat conftest.er1 >&5
34505  fi
34506  rm -f conftest.er1 conftest.err
34507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34508  test $ac_status = 0; }
34509done
34510
34511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34512/* end confdefs.h.  */
34513
34514int
34515main ()
34516{
34517
34518  ;
34519  return 0;
34520}
34521_ACEOF
34522ac_clean_files_save=$ac_clean_files
34523ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34524# Try to create an executable without -o first, disregard a.out.
34525# It will help us diagnose broken compilers, and finding out an intuition
34526# of exeext.
34527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34528$as_echo_n "checking whether the C compiler works... " >&6; }
34529ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34530
34531# The possible output files:
34532ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34533
34534ac_rmfiles=
34535for ac_file in $ac_files
34536do
34537  case $ac_file in
34538    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34539    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34540  esac
34541done
34542rm -f $ac_rmfiles
34543
34544if { { ac_try="$ac_link_default"
34545case "(($ac_try" in
34546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34547  *) ac_try_echo=$ac_try;;
34548esac
34549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34550$as_echo "$ac_try_echo"; } >&5
34551  (eval "$ac_link_default") 2>&5
34552  ac_status=$?
34553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34554  test $ac_status = 0; }; then :
34555  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34556# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34557# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34558# so that the user can short-circuit this test for compilers unknown to
34559# Autoconf.
34560for ac_file in $ac_files ''
34561do
34562  test -f "$ac_file" || continue
34563  case $ac_file in
34564    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34565	;;
34566    [ab].out )
34567	# We found the default executable, but exeext='' is most
34568	# certainly right.
34569	break;;
34570    *.* )
34571	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34572	then :; else
34573	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34574	fi
34575	# We set ac_cv_exeext here because the later test for it is not
34576	# safe: cross compilers may not add the suffix if given an `-o'
34577	# argument, so we may need to know it at that point already.
34578	# Even if this section looks crufty: it has the advantage of
34579	# actually working.
34580	break;;
34581    * )
34582	break;;
34583  esac
34584done
34585test "$ac_cv_exeext" = no && ac_cv_exeext=
34586
34587else
34588  ac_file=''
34589fi
34590if test -z "$ac_file"; then :
34591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34592$as_echo "no" >&6; }
34593$as_echo "$as_me: failed program was:" >&5
34594sed 's/^/| /' conftest.$ac_ext >&5
34595
34596{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34598as_fn_error 77 "C compiler cannot create executables
34599See \`config.log' for more details" "$LINENO" 5; }
34600else
34601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34602$as_echo "yes" >&6; }
34603fi
34604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34605$as_echo_n "checking for C compiler default output file name... " >&6; }
34606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34607$as_echo "$ac_file" >&6; }
34608ac_exeext=$ac_cv_exeext
34609
34610rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34611ac_clean_files=$ac_clean_files_save
34612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34613$as_echo_n "checking for suffix of executables... " >&6; }
34614if { { ac_try="$ac_link"
34615case "(($ac_try" in
34616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34617  *) ac_try_echo=$ac_try;;
34618esac
34619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34620$as_echo "$ac_try_echo"; } >&5
34621  (eval "$ac_link") 2>&5
34622  ac_status=$?
34623  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34624  test $ac_status = 0; }; then :
34625  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34626# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34627# work properly (i.e., refer to `conftest.exe'), while it won't with
34628# `rm'.
34629for ac_file in conftest.exe conftest conftest.*; do
34630  test -f "$ac_file" || continue
34631  case $ac_file in
34632    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34633    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34634	  break;;
34635    * ) break;;
34636  esac
34637done
34638else
34639  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34641as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34642See \`config.log' for more details" "$LINENO" 5; }
34643fi
34644rm -f conftest conftest$ac_cv_exeext
34645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34646$as_echo "$ac_cv_exeext" >&6; }
34647
34648rm -f conftest.$ac_ext
34649EXEEXT=$ac_cv_exeext
34650ac_exeext=$EXEEXT
34651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34652/* end confdefs.h.  */
34653#include <stdio.h>
34654int
34655main ()
34656{
34657FILE *f = fopen ("conftest.out", "w");
34658 return ferror (f) || fclose (f) != 0;
34659
34660  ;
34661  return 0;
34662}
34663_ACEOF
34664ac_clean_files="$ac_clean_files conftest.out"
34665# Check that the compiler produces executables we can run.  If not, either
34666# the compiler is broken, or we cross compile.
34667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34668$as_echo_n "checking whether we are cross compiling... " >&6; }
34669if test "$cross_compiling" != yes; then
34670  { { ac_try="$ac_link"
34671case "(($ac_try" in
34672  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34673  *) ac_try_echo=$ac_try;;
34674esac
34675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34676$as_echo "$ac_try_echo"; } >&5
34677  (eval "$ac_link") 2>&5
34678  ac_status=$?
34679  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34680  test $ac_status = 0; }
34681  if { ac_try='./conftest$ac_cv_exeext'
34682  { { case "(($ac_try" in
34683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34684  *) ac_try_echo=$ac_try;;
34685esac
34686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34687$as_echo "$ac_try_echo"; } >&5
34688  (eval "$ac_try") 2>&5
34689  ac_status=$?
34690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34691  test $ac_status = 0; }; }; then
34692    cross_compiling=no
34693  else
34694    if test "$cross_compiling" = maybe; then
34695	cross_compiling=yes
34696    else
34697	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34699as_fn_error $? "cannot run C compiled programs.
34700If you meant to cross compile, use \`--host'.
34701See \`config.log' for more details" "$LINENO" 5; }
34702    fi
34703  fi
34704fi
34705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34706$as_echo "$cross_compiling" >&6; }
34707
34708rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34709ac_clean_files=$ac_clean_files_save
34710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34711$as_echo_n "checking for suffix of object files... " >&6; }
34712if ${ac_cv_objext+:} false; then :
34713  $as_echo_n "(cached) " >&6
34714else
34715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34716/* end confdefs.h.  */
34717
34718int
34719main ()
34720{
34721
34722  ;
34723  return 0;
34724}
34725_ACEOF
34726rm -f conftest.o conftest.obj
34727if { { ac_try="$ac_compile"
34728case "(($ac_try" in
34729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34730  *) ac_try_echo=$ac_try;;
34731esac
34732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34733$as_echo "$ac_try_echo"; } >&5
34734  (eval "$ac_compile") 2>&5
34735  ac_status=$?
34736  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34737  test $ac_status = 0; }; then :
34738  for ac_file in conftest.o conftest.obj conftest.*; do
34739  test -f "$ac_file" || continue;
34740  case $ac_file in
34741    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34742    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34743       break;;
34744  esac
34745done
34746else
34747  $as_echo "$as_me: failed program was:" >&5
34748sed 's/^/| /' conftest.$ac_ext >&5
34749
34750{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34752as_fn_error $? "cannot compute suffix of object files: cannot compile
34753See \`config.log' for more details" "$LINENO" 5; }
34754fi
34755rm -f conftest.$ac_cv_objext conftest.$ac_ext
34756fi
34757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34758$as_echo "$ac_cv_objext" >&6; }
34759OBJEXT=$ac_cv_objext
34760ac_objext=$OBJEXT
34761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34762$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34763if ${ac_cv_c_compiler_gnu+:} false; then :
34764  $as_echo_n "(cached) " >&6
34765else
34766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34767/* end confdefs.h.  */
34768
34769int
34770main ()
34771{
34772#ifndef __GNUC__
34773       choke me
34774#endif
34775
34776  ;
34777  return 0;
34778}
34779_ACEOF
34780if ac_fn_c_try_compile "$LINENO"; then :
34781  ac_compiler_gnu=yes
34782else
34783  ac_compiler_gnu=no
34784fi
34785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34786ac_cv_c_compiler_gnu=$ac_compiler_gnu
34787
34788fi
34789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34790$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34791if test $ac_compiler_gnu = yes; then
34792  GCC=yes
34793else
34794  GCC=
34795fi
34796ac_test_CFLAGS=${CFLAGS+set}
34797ac_save_CFLAGS=$CFLAGS
34798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34799$as_echo_n "checking whether $CC accepts -g... " >&6; }
34800if ${ac_cv_prog_cc_g+:} false; then :
34801  $as_echo_n "(cached) " >&6
34802else
34803  ac_save_c_werror_flag=$ac_c_werror_flag
34804   ac_c_werror_flag=yes
34805   ac_cv_prog_cc_g=no
34806   CFLAGS="-g"
34807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34808/* end confdefs.h.  */
34809
34810int
34811main ()
34812{
34813
34814  ;
34815  return 0;
34816}
34817_ACEOF
34818if ac_fn_c_try_compile "$LINENO"; then :
34819  ac_cv_prog_cc_g=yes
34820else
34821  CFLAGS=""
34822      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34823/* end confdefs.h.  */
34824
34825int
34826main ()
34827{
34828
34829  ;
34830  return 0;
34831}
34832_ACEOF
34833if ac_fn_c_try_compile "$LINENO"; then :
34834
34835else
34836  ac_c_werror_flag=$ac_save_c_werror_flag
34837	 CFLAGS="-g"
34838	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34839/* end confdefs.h.  */
34840
34841int
34842main ()
34843{
34844
34845  ;
34846  return 0;
34847}
34848_ACEOF
34849if ac_fn_c_try_compile "$LINENO"; then :
34850  ac_cv_prog_cc_g=yes
34851fi
34852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34853fi
34854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34855fi
34856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34857   ac_c_werror_flag=$ac_save_c_werror_flag
34858fi
34859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34860$as_echo "$ac_cv_prog_cc_g" >&6; }
34861if test "$ac_test_CFLAGS" = set; then
34862  CFLAGS=$ac_save_CFLAGS
34863elif test $ac_cv_prog_cc_g = yes; then
34864  if test "$GCC" = yes; then
34865    CFLAGS="-g -O2"
34866  else
34867    CFLAGS="-g"
34868  fi
34869else
34870  if test "$GCC" = yes; then
34871    CFLAGS="-O2"
34872  else
34873    CFLAGS=
34874  fi
34875fi
34876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34877$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34878if ${ac_cv_prog_cc_c89+:} false; then :
34879  $as_echo_n "(cached) " >&6
34880else
34881  ac_cv_prog_cc_c89=no
34882ac_save_CC=$CC
34883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34884/* end confdefs.h.  */
34885#include <stdarg.h>
34886#include <stdio.h>
34887struct stat;
34888/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34889struct buf { int x; };
34890FILE * (*rcsopen) (struct buf *, struct stat *, int);
34891static char *e (p, i)
34892     char **p;
34893     int i;
34894{
34895  return p[i];
34896}
34897static char *f (char * (*g) (char **, int), char **p, ...)
34898{
34899  char *s;
34900  va_list v;
34901  va_start (v,p);
34902  s = g (p, va_arg (v,int));
34903  va_end (v);
34904  return s;
34905}
34906
34907/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34908   function prototypes and stuff, but not '\xHH' hex character constants.
34909   These don't provoke an error unfortunately, instead are silently treated
34910   as 'x'.  The following induces an error, until -std is added to get
34911   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34912   array size at least.  It's necessary to write '\x00'==0 to get something
34913   that's true only with -std.  */
34914int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34915
34916/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34917   inside strings and character constants.  */
34918#define FOO(x) 'x'
34919int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34920
34921int test (int i, double x);
34922struct s1 {int (*f) (int a);};
34923struct s2 {int (*f) (double a);};
34924int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34925int argc;
34926char **argv;
34927int
34928main ()
34929{
34930return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34931  ;
34932  return 0;
34933}
34934_ACEOF
34935for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34936	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34937do
34938  CC="$ac_save_CC $ac_arg"
34939  if ac_fn_c_try_compile "$LINENO"; then :
34940  ac_cv_prog_cc_c89=$ac_arg
34941fi
34942rm -f core conftest.err conftest.$ac_objext
34943  test "x$ac_cv_prog_cc_c89" != "xno" && break
34944done
34945rm -f conftest.$ac_ext
34946CC=$ac_save_CC
34947
34948fi
34949# AC_CACHE_VAL
34950case "x$ac_cv_prog_cc_c89" in
34951  x)
34952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34953$as_echo "none needed" >&6; } ;;
34954  xno)
34955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34956$as_echo "unsupported" >&6; } ;;
34957  *)
34958    CC="$CC $ac_cv_prog_cc_c89"
34959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34960$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34961esac
34962if test "x$ac_cv_prog_cc_c89" != xno; then :
34963
34964fi
34965
34966ac_ext=cpp
34967ac_cpp='$CXXCPP $CPPFLAGS'
34968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34971
34972
34973
34974  COMPILER_NAME=C++
34975  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34976
34977  if test "x$CXX" != x; then
34978    # User has supplied compiler name already, always let that override.
34979    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34980$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34981    if test "x`basename $CXX`" = "x$CXX"; then
34982      # A command without a complete path is provided, search $PATH.
34983
34984      for ac_prog in $CXX
34985do
34986  # Extract the first word of "$ac_prog", so it can be a program name with args.
34987set dummy $ac_prog; ac_word=$2
34988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34989$as_echo_n "checking for $ac_word... " >&6; }
34990if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34991  $as_echo_n "(cached) " >&6
34992else
34993  case $POTENTIAL_CXX in
34994  [\\/]* | ?:[\\/]*)
34995  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34996  ;;
34997  *)
34998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34999for as_dir in $PATH
35000do
35001  IFS=$as_save_IFS
35002  test -z "$as_dir" && as_dir=.
35003    for ac_exec_ext in '' $ac_executable_extensions; do
35004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35005    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35007    break 2
35008  fi
35009done
35010  done
35011IFS=$as_save_IFS
35012
35013  ;;
35014esac
35015fi
35016POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35017if test -n "$POTENTIAL_CXX"; then
35018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35019$as_echo "$POTENTIAL_CXX" >&6; }
35020else
35021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35022$as_echo "no" >&6; }
35023fi
35024
35025
35026  test -n "$POTENTIAL_CXX" && break
35027done
35028
35029      if test "x$POTENTIAL_CXX" != x; then
35030        CXX=$POTENTIAL_CXX
35031      else
35032        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35033      fi
35034    else
35035      # Otherwise it might already be a complete path
35036      if test ! -x "$CXX"; then
35037        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35038      fi
35039    fi
35040  else
35041    # No user supplied value. Locate compiler ourselves.
35042
35043    # If we are cross compiling, assume cross compilation tools follows the
35044    # cross compilation standard where they are prefixed with the autoconf
35045    # standard name for the target. For example the binary
35046    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35047    # If we are not cross compiling, then the default compiler name will be
35048    # used.
35049
35050    CXX=
35051    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35052    # before checking the rest of the PATH.
35053    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35054    # step, this should not be necessary.
35055    if test -n "$TOOLCHAIN_PATH"; then
35056      PATH_save="$PATH"
35057      PATH="$TOOLCHAIN_PATH"
35058      if test -n "$ac_tool_prefix"; then
35059  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35060set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35062$as_echo_n "checking for $ac_word... " >&6; }
35063if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35064  $as_echo_n "(cached) " >&6
35065else
35066  case $TOOLCHAIN_PATH_CXX in
35067  [\\/]* | ?:[\\/]*)
35068  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35069  ;;
35070  *)
35071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35072for as_dir in $PATH
35073do
35074  IFS=$as_save_IFS
35075  test -z "$as_dir" && as_dir=.
35076    for ac_exec_ext in '' $ac_executable_extensions; do
35077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35078    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35080    break 2
35081  fi
35082done
35083  done
35084IFS=$as_save_IFS
35085
35086  ;;
35087esac
35088fi
35089TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35090if test -n "$TOOLCHAIN_PATH_CXX"; then
35091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35092$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35093else
35094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35095$as_echo "no" >&6; }
35096fi
35097
35098
35099fi
35100if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35101  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35102  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35103set dummy $SEARCH_LIST; ac_word=$2
35104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35105$as_echo_n "checking for $ac_word... " >&6; }
35106if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35107  $as_echo_n "(cached) " >&6
35108else
35109  case $ac_pt_TOOLCHAIN_PATH_CXX in
35110  [\\/]* | ?:[\\/]*)
35111  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35112  ;;
35113  *)
35114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35115for as_dir in $PATH
35116do
35117  IFS=$as_save_IFS
35118  test -z "$as_dir" && as_dir=.
35119    for ac_exec_ext in '' $ac_executable_extensions; do
35120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35121    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35123    break 2
35124  fi
35125done
35126  done
35127IFS=$as_save_IFS
35128
35129  ;;
35130esac
35131fi
35132ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35133if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35135$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35136else
35137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35138$as_echo "no" >&6; }
35139fi
35140
35141  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35142    TOOLCHAIN_PATH_CXX=""
35143  else
35144    case $cross_compiling:$ac_tool_warned in
35145yes:)
35146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35148ac_tool_warned=yes ;;
35149esac
35150    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35151  fi
35152else
35153  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35154fi
35155
35156      CXX=$TOOLCHAIN_PATH_CXX
35157      PATH="$PATH_save"
35158    fi
35159
35160    # AC_PATH_TOOL can't be run multiple times with the same variable,
35161    # so create a new name for this run.
35162    if test "x$CXX" = x; then
35163      if test -n "$ac_tool_prefix"; then
35164  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35165set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35167$as_echo_n "checking for $ac_word... " >&6; }
35168if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35169  $as_echo_n "(cached) " >&6
35170else
35171  case $POTENTIAL_CXX in
35172  [\\/]* | ?:[\\/]*)
35173  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35174  ;;
35175  *)
35176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35177for as_dir in $PATH
35178do
35179  IFS=$as_save_IFS
35180  test -z "$as_dir" && as_dir=.
35181    for ac_exec_ext in '' $ac_executable_extensions; do
35182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35183    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35185    break 2
35186  fi
35187done
35188  done
35189IFS=$as_save_IFS
35190
35191  ;;
35192esac
35193fi
35194POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35195if test -n "$POTENTIAL_CXX"; then
35196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35197$as_echo "$POTENTIAL_CXX" >&6; }
35198else
35199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35200$as_echo "no" >&6; }
35201fi
35202
35203
35204fi
35205if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35206  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35207  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35208set dummy $SEARCH_LIST; ac_word=$2
35209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35210$as_echo_n "checking for $ac_word... " >&6; }
35211if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35212  $as_echo_n "(cached) " >&6
35213else
35214  case $ac_pt_POTENTIAL_CXX in
35215  [\\/]* | ?:[\\/]*)
35216  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35217  ;;
35218  *)
35219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35220for as_dir in $PATH
35221do
35222  IFS=$as_save_IFS
35223  test -z "$as_dir" && as_dir=.
35224    for ac_exec_ext in '' $ac_executable_extensions; do
35225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35226    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35228    break 2
35229  fi
35230done
35231  done
35232IFS=$as_save_IFS
35233
35234  ;;
35235esac
35236fi
35237ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35238if test -n "$ac_pt_POTENTIAL_CXX"; then
35239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35240$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35241else
35242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35243$as_echo "no" >&6; }
35244fi
35245
35246  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35247    POTENTIAL_CXX=""
35248  else
35249    case $cross_compiling:$ac_tool_warned in
35250yes:)
35251{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35252$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35253ac_tool_warned=yes ;;
35254esac
35255    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35256  fi
35257else
35258  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35259fi
35260
35261      CXX=$POTENTIAL_CXX
35262    fi
35263
35264    if test "x$CXX" = x; then
35265
35266  # Print a helpful message on how to acquire the necessary build dependency.
35267  # devkit is the help tag: freetype, cups, alsa etc
35268  MISSING_DEPENDENCY=devkit
35269
35270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35271    cygwin_help $MISSING_DEPENDENCY
35272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35273    msys_help $MISSING_DEPENDENCY
35274  else
35275    PKGHANDLER_COMMAND=
35276
35277    case $PKGHANDLER in
35278      apt-get)
35279        apt_help     $MISSING_DEPENDENCY ;;
35280      yum)
35281        yum_help     $MISSING_DEPENDENCY ;;
35282      brew)
35283        brew_help    $MISSING_DEPENDENCY ;;
35284      port)
35285        port_help    $MISSING_DEPENDENCY ;;
35286      pkgutil)
35287        pkgutil_help $MISSING_DEPENDENCY ;;
35288      pkgadd)
35289        pkgadd_help  $MISSING_DEPENDENCY ;;
35290    esac
35291
35292    if test "x$PKGHANDLER_COMMAND" != x; then
35293      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35294    fi
35295  fi
35296
35297      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35298    fi
35299  fi
35300
35301  # Now we have a compiler binary in CXX. Make sure it's okay.
35302
35303  # Only process if variable expands to non-empty
35304
35305  if test "x$CXX" != x; then
35306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35307
35308  # First separate the path from the arguments. This will split at the first
35309  # space.
35310  complete="$CXX"
35311  path="${complete%% *}"
35312  tmp="$complete EOL"
35313  arguments="${tmp#* }"
35314
35315  # Input might be given as Windows format, start by converting to
35316  # unix format.
35317  new_path=`$CYGPATH -u "$path"`
35318
35319  # Now try to locate executable using which
35320  new_path=`$WHICH "$new_path" 2> /dev/null`
35321  # bat and cmd files are not always considered executable in cygwin causing which
35322  # to not find them
35323  if test "x$new_path" = x \
35324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35326    new_path=`$CYGPATH -u "$path"`
35327  fi
35328  if test "x$new_path" = x; then
35329    # Oops. Which didn't find the executable.
35330    # The splitting of arguments from the executable at a space might have been incorrect,
35331    # since paths with space are more likely in Windows. Give it another try with the whole
35332    # argument.
35333    path="$complete"
35334    arguments="EOL"
35335    new_path=`$CYGPATH -u "$path"`
35336    new_path=`$WHICH "$new_path" 2> /dev/null`
35337    # bat and cmd files are not always considered executable in cygwin causing which
35338    # to not find them
35339    if test "x$new_path" = x \
35340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35342      new_path=`$CYGPATH -u "$path"`
35343    fi
35344    if test "x$new_path" = x; then
35345      # It's still not found. Now this is an unrecoverable error.
35346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35347$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35348      has_space=`$ECHO "$complete" | $GREP " "`
35349      if test "x$has_space" != x; then
35350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35352      fi
35353      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35354    fi
35355  fi
35356
35357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35360  # "foo.exe" is OK but "foo" is an error.
35361  #
35362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35363  # It is also a way to make sure we got the proper file name for the real test later on.
35364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35365  if test "x$test_shortpath" = x; then
35366    # Short path failed, file does not exist as specified.
35367    # Try adding .exe or .cmd
35368    if test -f "${new_path}.exe"; then
35369      input_to_shortpath="${new_path}.exe"
35370    elif test -f "${new_path}.cmd"; then
35371      input_to_shortpath="${new_path}.cmd"
35372    else
35373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35374$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35377      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35378    fi
35379  else
35380    input_to_shortpath="$new_path"
35381  fi
35382
35383  # Call helper function which possibly converts this using DOS-style short mode.
35384  # If so, the updated path is stored in $new_path.
35385  new_path="$input_to_shortpath"
35386
35387  input_path="$input_to_shortpath"
35388  # Check if we need to convert this using DOS-style short mode. If the path
35389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35390  # take no chances and rewrite it.
35391  # Note: m4 eats our [], so we need to use [ and ] instead.
35392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35393  if test "x$has_forbidden_chars" != x; then
35394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35398      # Going to short mode and back again did indeed matter. Since short mode is
35399      # case insensitive, let's make it lowercase to improve readability.
35400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35401      # Now convert it back to Unix-style (cygpath)
35402      input_path=`$CYGPATH -u "$shortmode_path"`
35403      new_path="$input_path"
35404    fi
35405  fi
35406
35407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35408  if test "x$test_cygdrive_prefix" = x; then
35409    # As a simple fix, exclude /usr/bin since it's not a real path.
35410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35412      # a path prefixed by /cygdrive for fixpath to work.
35413      new_path="$CYGWIN_ROOT_PATH$input_path"
35414    fi
35415  fi
35416
35417  # remove trailing .exe if any
35418  new_path="${new_path/%.exe/}"
35419
35420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35421
35422  # First separate the path from the arguments. This will split at the first
35423  # space.
35424  complete="$CXX"
35425  path="${complete%% *}"
35426  tmp="$complete EOL"
35427  arguments="${tmp#* }"
35428
35429  # Input might be given as Windows format, start by converting to
35430  # unix format.
35431  new_path="$path"
35432
35433  windows_path="$new_path"
35434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35435    unix_path=`$CYGPATH -u "$windows_path"`
35436    new_path="$unix_path"
35437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35439    new_path="$unix_path"
35440  fi
35441
35442
35443  # Now try to locate executable using which
35444  new_path=`$WHICH "$new_path" 2> /dev/null`
35445
35446  if test "x$new_path" = x; then
35447    # Oops. Which didn't find the executable.
35448    # The splitting of arguments from the executable at a space might have been incorrect,
35449    # since paths with space are more likely in Windows. Give it another try with the whole
35450    # argument.
35451    path="$complete"
35452    arguments="EOL"
35453    new_path="$path"
35454
35455  windows_path="$new_path"
35456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35457    unix_path=`$CYGPATH -u "$windows_path"`
35458    new_path="$unix_path"
35459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35461    new_path="$unix_path"
35462  fi
35463
35464
35465    new_path=`$WHICH "$new_path" 2> /dev/null`
35466    # bat and cmd files are not always considered executable in MSYS causing which
35467    # to not find them
35468    if test "x$new_path" = x \
35469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35471      new_path="$path"
35472
35473  windows_path="$new_path"
35474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35475    unix_path=`$CYGPATH -u "$windows_path"`
35476    new_path="$unix_path"
35477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35479    new_path="$unix_path"
35480  fi
35481
35482    fi
35483
35484    if test "x$new_path" = x; then
35485      # It's still not found. Now this is an unrecoverable error.
35486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35487$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35488      has_space=`$ECHO "$complete" | $GREP " "`
35489      if test "x$has_space" != x; then
35490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35492      fi
35493      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35494    fi
35495  fi
35496
35497  # Now new_path has a complete unix path to the binary
35498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35499    # Keep paths in /bin as-is, but remove trailing .exe if any
35500    new_path="${new_path/%.exe/}"
35501    # Do not save /bin paths to all_fixpath_prefixes!
35502  else
35503    # Not in mixed or Windows style, start by that.
35504    new_path=`cmd //c echo $new_path`
35505
35506  input_path="$new_path"
35507  # Check if we need to convert this using DOS-style short mode. If the path
35508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35509  # take no chances and rewrite it.
35510  # Note: m4 eats our [], so we need to use [ and ] instead.
35511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35512  if test "x$has_forbidden_chars" != x; then
35513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35515  fi
35516
35517    # Output is in $new_path
35518
35519  windows_path="$new_path"
35520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35521    unix_path=`$CYGPATH -u "$windows_path"`
35522    new_path="$unix_path"
35523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35525    new_path="$unix_path"
35526  fi
35527
35528    # remove trailing .exe if any
35529    new_path="${new_path/%.exe/}"
35530
35531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35533  fi
35534
35535    else
35536      # We're on a unix platform. Hooray! :)
35537      # First separate the path from the arguments. This will split at the first
35538      # space.
35539      complete="$CXX"
35540      path="${complete%% *}"
35541      tmp="$complete EOL"
35542      arguments="${tmp#* }"
35543
35544      # Cannot rely on the command "which" here since it doesn't always work.
35545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35546      if test -z "$is_absolute_path"; then
35547        # Path to executable is not absolute. Find it.
35548        IFS_save="$IFS"
35549        IFS=:
35550        for p in $PATH; do
35551          if test -f "$p/$path" && test -x "$p/$path"; then
35552            new_path="$p/$path"
35553            break
35554          fi
35555        done
35556        IFS="$IFS_save"
35557      else
35558        # This is an absolute path, we can use it without further modifications.
35559        new_path="$path"
35560      fi
35561
35562      if test "x$new_path" = x; then
35563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35564$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35565        has_space=`$ECHO "$complete" | $GREP " "`
35566        if test "x$has_space" != x; then
35567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35569        fi
35570        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35571      fi
35572    fi
35573
35574    # Now join together the path and the arguments once again
35575    if test "x$arguments" != xEOL; then
35576      new_complete="$new_path ${arguments% *}"
35577    else
35578      new_complete="$new_path"
35579    fi
35580
35581    if test "x$complete" != "x$new_complete"; then
35582      CXX="$new_complete"
35583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35584$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35585    fi
35586  fi
35587
35588  TEST_COMPILER="$CXX"
35589
35590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35591$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35592  SYMLINK_ORIGINAL="$TEST_COMPILER"
35593
35594  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35595    # Follow a chain of symbolic links. Use readlink
35596    # where it exists, else fall back to horribly
35597    # complicated shell code.
35598    if test "x$READLINK_TESTED" != yes; then
35599      # On MacOSX there is a readlink tool with a different
35600      # purpose than the GNU readlink tool. Check the found readlink.
35601      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35602      if test "x$ISGNU" = x; then
35603        # A readlink that we do not know how to use.
35604        # Are there other non-GNU readlinks out there?
35605        READLINK_TESTED=yes
35606        READLINK=
35607      fi
35608    fi
35609
35610    if test "x$READLINK" != x; then
35611      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35612    else
35613      # Save the current directory for restoring afterwards
35614      STARTDIR=$PWD
35615      COUNTER=0
35616      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35617      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35618      cd $sym_link_dir
35619      # Use -P flag to resolve symlinks in directories.
35620      cd `$THEPWDCMD -P`
35621      sym_link_dir=`$THEPWDCMD -P`
35622      # Resolve file symlinks
35623      while test $COUNTER -lt 20; do
35624        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35625        if test "x$ISLINK" == x; then
35626          # This is not a symbolic link! We are done!
35627          break
35628        fi
35629        # Again resolve directory symlinks since the target of the just found
35630        # link could be in a different directory
35631        cd `$DIRNAME $ISLINK`
35632        sym_link_dir=`$THEPWDCMD -P`
35633        sym_link_file=`$BASENAME $ISLINK`
35634        let COUNTER=COUNTER+1
35635      done
35636      cd $STARTDIR
35637      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35638    fi
35639  fi
35640
35641  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35643$as_echo "no symlink" >&6; }
35644  else
35645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35646$as_echo "$SYMLINK_ORIGINAL" >&6; }
35647
35648    # We can't handle ccache by gcc wrappers, since we need to know if we're
35649    # using ccache. Instead ccache usage must be controlled by a configure option.
35650    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35651    if test "x$COMPILER_BASENAME" = "xccache"; then
35652      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35653$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35654      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35655    fi
35656  fi
35657
35658
35659  COMPILER=$CXX
35660  COMPILER_NAME=$COMPILER_NAME
35661
35662  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35663    # cc -V output typically looks like
35664    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35665    # or
35666    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35667    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35668    # Check that this is likely to be the Solaris Studio cc.
35669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35670    if test $? -ne 0; then
35671      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35672      { $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
35673$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35674      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35675$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35676      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35677$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35678      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35679    fi
35680    # Remove usage instructions (if present), and
35681    # collapse compiler output into a single line
35682    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35683        $SED -e 's/ *[Uu]sage:.*//'`
35684    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35685        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35686  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35687    # xlc -qversion output typically looks like
35688    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35689    #     Version: 11.01.0000.0015
35690    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35691    # Check that this is likely to be the IBM XL C compiler.
35692    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35693    if test $? -ne 0; then
35694      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35695      { $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
35696$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35697      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35698$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35699      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35700$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35701      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35702    fi
35703    # Collapse compiler output into a single line
35704    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35705    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35706        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35707  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35708    # There is no specific version flag, but all output starts with a version string.
35709    # First line typically looks something like:
35710    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35711    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35712    # Check that this is likely to be Microsoft CL.EXE.
35713    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35714    if test $? -ne 0; then
35715      { $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
35716$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35717      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35718$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35719      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35720    fi
35721    # Collapse compiler output into a single line
35722    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35723    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35724        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35725  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35726    # gcc --version output typically looks like
35727    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35728    #     Copyright (C) 2013 Free Software Foundation, Inc.
35729    #     This is free software; see the source for copying conditions.  There is NO
35730    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35731    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35732    # Check that this is likely to be GCC.
35733    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35734    if test $? -ne 0; then
35735      { $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
35736$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35737      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35738$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35739      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35740    fi
35741    # Remove Copyright and legalese from version string, and
35742    # collapse into a single line
35743    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35744        $SED -e 's/ *Copyright .*//'`
35745    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35746        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35747  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35748    # clang --version output typically looks like
35749    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35750    #    clang version 3.3 (tags/RELEASE_33/final)
35751    # or
35752    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35753    #    Target: x86_64-pc-linux-gnu
35754    #    Thread model: posix
35755    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35756    # Check that this is likely to be clang
35757    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35758    if test $? -ne 0; then
35759      { $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
35760$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35761      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35762$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35763      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35764    fi
35765    # Collapse compiler output into a single line
35766    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35767    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35768        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35769  else
35770      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35771  fi
35772  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35773  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35774  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35775  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35776
35777  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35778$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35779
35780
35781  # Now that we have resolved CXX ourself, let autoconf have its go at it
35782  ac_ext=cpp
35783ac_cpp='$CXXCPP $CPPFLAGS'
35784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35787if test -z "$CXX"; then
35788  if test -n "$CCC"; then
35789    CXX=$CCC
35790  else
35791    if test -n "$ac_tool_prefix"; then
35792  for ac_prog in $CXX
35793  do
35794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35797$as_echo_n "checking for $ac_word... " >&6; }
35798if ${ac_cv_prog_CXX+:} false; then :
35799  $as_echo_n "(cached) " >&6
35800else
35801  if test -n "$CXX"; then
35802  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35803else
35804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35805for as_dir in $PATH
35806do
35807  IFS=$as_save_IFS
35808  test -z "$as_dir" && as_dir=.
35809    for ac_exec_ext in '' $ac_executable_extensions; do
35810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35811    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35813    break 2
35814  fi
35815done
35816  done
35817IFS=$as_save_IFS
35818
35819fi
35820fi
35821CXX=$ac_cv_prog_CXX
35822if test -n "$CXX"; then
35823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35824$as_echo "$CXX" >&6; }
35825else
35826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35827$as_echo "no" >&6; }
35828fi
35829
35830
35831    test -n "$CXX" && break
35832  done
35833fi
35834if test -z "$CXX"; then
35835  ac_ct_CXX=$CXX
35836  for ac_prog in $CXX
35837do
35838  # Extract the first word of "$ac_prog", so it can be a program name with args.
35839set dummy $ac_prog; ac_word=$2
35840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35841$as_echo_n "checking for $ac_word... " >&6; }
35842if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35843  $as_echo_n "(cached) " >&6
35844else
35845  if test -n "$ac_ct_CXX"; then
35846  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35847else
35848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35849for as_dir in $PATH
35850do
35851  IFS=$as_save_IFS
35852  test -z "$as_dir" && as_dir=.
35853    for ac_exec_ext in '' $ac_executable_extensions; do
35854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35855    ac_cv_prog_ac_ct_CXX="$ac_prog"
35856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35857    break 2
35858  fi
35859done
35860  done
35861IFS=$as_save_IFS
35862
35863fi
35864fi
35865ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35866if test -n "$ac_ct_CXX"; then
35867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35868$as_echo "$ac_ct_CXX" >&6; }
35869else
35870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35871$as_echo "no" >&6; }
35872fi
35873
35874
35875  test -n "$ac_ct_CXX" && break
35876done
35877
35878  if test "x$ac_ct_CXX" = x; then
35879    CXX="g++"
35880  else
35881    case $cross_compiling:$ac_tool_warned in
35882yes:)
35883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35885ac_tool_warned=yes ;;
35886esac
35887    CXX=$ac_ct_CXX
35888  fi
35889fi
35890
35891  fi
35892fi
35893# Provide some information about the compiler.
35894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35895set X $ac_compile
35896ac_compiler=$2
35897for ac_option in --version -v -V -qversion; do
35898  { { ac_try="$ac_compiler $ac_option >&5"
35899case "(($ac_try" in
35900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35901  *) ac_try_echo=$ac_try;;
35902esac
35903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35904$as_echo "$ac_try_echo"; } >&5
35905  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35906  ac_status=$?
35907  if test -s conftest.err; then
35908    sed '10a\
35909... rest of stderr output deleted ...
35910         10q' conftest.err >conftest.er1
35911    cat conftest.er1 >&5
35912  fi
35913  rm -f conftest.er1 conftest.err
35914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35915  test $ac_status = 0; }
35916done
35917
35918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35919$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35920if ${ac_cv_cxx_compiler_gnu+:} false; then :
35921  $as_echo_n "(cached) " >&6
35922else
35923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35924/* end confdefs.h.  */
35925
35926int
35927main ()
35928{
35929#ifndef __GNUC__
35930       choke me
35931#endif
35932
35933  ;
35934  return 0;
35935}
35936_ACEOF
35937if ac_fn_cxx_try_compile "$LINENO"; then :
35938  ac_compiler_gnu=yes
35939else
35940  ac_compiler_gnu=no
35941fi
35942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35943ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35944
35945fi
35946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35947$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35948if test $ac_compiler_gnu = yes; then
35949  GXX=yes
35950else
35951  GXX=
35952fi
35953ac_test_CXXFLAGS=${CXXFLAGS+set}
35954ac_save_CXXFLAGS=$CXXFLAGS
35955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35956$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35957if ${ac_cv_prog_cxx_g+:} false; then :
35958  $as_echo_n "(cached) " >&6
35959else
35960  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35961   ac_cxx_werror_flag=yes
35962   ac_cv_prog_cxx_g=no
35963   CXXFLAGS="-g"
35964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35965/* end confdefs.h.  */
35966
35967int
35968main ()
35969{
35970
35971  ;
35972  return 0;
35973}
35974_ACEOF
35975if ac_fn_cxx_try_compile "$LINENO"; then :
35976  ac_cv_prog_cxx_g=yes
35977else
35978  CXXFLAGS=""
35979      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35980/* end confdefs.h.  */
35981
35982int
35983main ()
35984{
35985
35986  ;
35987  return 0;
35988}
35989_ACEOF
35990if ac_fn_cxx_try_compile "$LINENO"; then :
35991
35992else
35993  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35994	 CXXFLAGS="-g"
35995	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35996/* end confdefs.h.  */
35997
35998int
35999main ()
36000{
36001
36002  ;
36003  return 0;
36004}
36005_ACEOF
36006if ac_fn_cxx_try_compile "$LINENO"; then :
36007  ac_cv_prog_cxx_g=yes
36008fi
36009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36010fi
36011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36012fi
36013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36014   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36015fi
36016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36017$as_echo "$ac_cv_prog_cxx_g" >&6; }
36018if test "$ac_test_CXXFLAGS" = set; then
36019  CXXFLAGS=$ac_save_CXXFLAGS
36020elif test $ac_cv_prog_cxx_g = yes; then
36021  if test "$GXX" = yes; then
36022    CXXFLAGS="-g -O2"
36023  else
36024    CXXFLAGS="-g"
36025  fi
36026else
36027  if test "$GXX" = yes; then
36028    CXXFLAGS="-O2"
36029  else
36030    CXXFLAGS=
36031  fi
36032fi
36033ac_ext=cpp
36034ac_cpp='$CXXCPP $CPPFLAGS'
36035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36038
36039
36040  # This is the compiler version number on the form X.Y[.Z]
36041
36042
36043
36044
36045  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36046    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36047$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36048    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36049$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36050  fi
36051
36052  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36053  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36054    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36055$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36056  fi
36057
36058  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36059    { $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
36060$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36061  fi
36062
36063  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36064
36065
36066  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116    # Execute function body
36117
36118  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36119  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36120
36121  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36122    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36123  fi
36124
36125  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36126    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36127  fi
36128
36129  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36130  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36131
36132  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36133    :
36134
36135  else
36136    :
36137
36138          { $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
36139$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36140
36141
36142  fi
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157  fi
36158
36159  #
36160  # Setup the preprocessor (CPP and CXXCPP)
36161  #
36162  ac_ext=c
36163ac_cpp='$CPP $CPPFLAGS'
36164ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36165ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36166ac_compiler_gnu=$ac_cv_c_compiler_gnu
36167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36168$as_echo_n "checking how to run the C preprocessor... " >&6; }
36169# On Suns, sometimes $CPP names a directory.
36170if test -n "$CPP" && test -d "$CPP"; then
36171  CPP=
36172fi
36173if test -z "$CPP"; then
36174  if ${ac_cv_prog_CPP+:} false; then :
36175  $as_echo_n "(cached) " >&6
36176else
36177      # Double quotes because CPP needs to be expanded
36178    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36179    do
36180      ac_preproc_ok=false
36181for ac_c_preproc_warn_flag in '' yes
36182do
36183  # Use a header file that comes with gcc, so configuring glibc
36184  # with a fresh cross-compiler works.
36185  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36186  # <limits.h> exists even on freestanding compilers.
36187  # On the NeXT, cc -E runs the code through the compiler's parser,
36188  # not just through cpp. "Syntax error" is here to catch this case.
36189  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36190/* end confdefs.h.  */
36191#ifdef __STDC__
36192# include <limits.h>
36193#else
36194# include <assert.h>
36195#endif
36196		     Syntax error
36197_ACEOF
36198if ac_fn_c_try_cpp "$LINENO"; then :
36199
36200else
36201  # Broken: fails on valid input.
36202continue
36203fi
36204rm -f conftest.err conftest.i conftest.$ac_ext
36205
36206  # OK, works on sane cases.  Now check whether nonexistent headers
36207  # can be detected and how.
36208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36209/* end confdefs.h.  */
36210#include <ac_nonexistent.h>
36211_ACEOF
36212if ac_fn_c_try_cpp "$LINENO"; then :
36213  # Broken: success on invalid input.
36214continue
36215else
36216  # Passes both tests.
36217ac_preproc_ok=:
36218break
36219fi
36220rm -f conftest.err conftest.i conftest.$ac_ext
36221
36222done
36223# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36224rm -f conftest.i conftest.err conftest.$ac_ext
36225if $ac_preproc_ok; then :
36226  break
36227fi
36228
36229    done
36230    ac_cv_prog_CPP=$CPP
36231
36232fi
36233  CPP=$ac_cv_prog_CPP
36234else
36235  ac_cv_prog_CPP=$CPP
36236fi
36237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36238$as_echo "$CPP" >&6; }
36239ac_preproc_ok=false
36240for ac_c_preproc_warn_flag in '' yes
36241do
36242  # Use a header file that comes with gcc, so configuring glibc
36243  # with a fresh cross-compiler works.
36244  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36245  # <limits.h> exists even on freestanding compilers.
36246  # On the NeXT, cc -E runs the code through the compiler's parser,
36247  # not just through cpp. "Syntax error" is here to catch this case.
36248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36249/* end confdefs.h.  */
36250#ifdef __STDC__
36251# include <limits.h>
36252#else
36253# include <assert.h>
36254#endif
36255		     Syntax error
36256_ACEOF
36257if ac_fn_c_try_cpp "$LINENO"; then :
36258
36259else
36260  # Broken: fails on valid input.
36261continue
36262fi
36263rm -f conftest.err conftest.i conftest.$ac_ext
36264
36265  # OK, works on sane cases.  Now check whether nonexistent headers
36266  # can be detected and how.
36267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36268/* end confdefs.h.  */
36269#include <ac_nonexistent.h>
36270_ACEOF
36271if ac_fn_c_try_cpp "$LINENO"; then :
36272  # Broken: success on invalid input.
36273continue
36274else
36275  # Passes both tests.
36276ac_preproc_ok=:
36277break
36278fi
36279rm -f conftest.err conftest.i conftest.$ac_ext
36280
36281done
36282# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36283rm -f conftest.i conftest.err conftest.$ac_ext
36284if $ac_preproc_ok; then :
36285
36286else
36287  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36289as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36290See \`config.log' for more details" "$LINENO" 5; }
36291fi
36292
36293ac_ext=cpp
36294ac_cpp='$CXXCPP $CPPFLAGS'
36295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36298
36299
36300  # Only process if variable expands to non-empty
36301
36302  if test "x$CPP" != x; then
36303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36304
36305  # First separate the path from the arguments. This will split at the first
36306  # space.
36307  complete="$CPP"
36308  path="${complete%% *}"
36309  tmp="$complete EOL"
36310  arguments="${tmp#* }"
36311
36312  # Input might be given as Windows format, start by converting to
36313  # unix format.
36314  new_path=`$CYGPATH -u "$path"`
36315
36316  # Now try to locate executable using which
36317  new_path=`$WHICH "$new_path" 2> /dev/null`
36318  # bat and cmd files are not always considered executable in cygwin causing which
36319  # to not find them
36320  if test "x$new_path" = x \
36321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36323    new_path=`$CYGPATH -u "$path"`
36324  fi
36325  if test "x$new_path" = x; then
36326    # Oops. Which didn't find the executable.
36327    # The splitting of arguments from the executable at a space might have been incorrect,
36328    # since paths with space are more likely in Windows. Give it another try with the whole
36329    # argument.
36330    path="$complete"
36331    arguments="EOL"
36332    new_path=`$CYGPATH -u "$path"`
36333    new_path=`$WHICH "$new_path" 2> /dev/null`
36334    # bat and cmd files are not always considered executable in cygwin causing which
36335    # to not find them
36336    if test "x$new_path" = x \
36337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36339      new_path=`$CYGPATH -u "$path"`
36340    fi
36341    if test "x$new_path" = x; then
36342      # It's still not found. Now this is an unrecoverable error.
36343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36344$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36345      has_space=`$ECHO "$complete" | $GREP " "`
36346      if test "x$has_space" != x; then
36347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36349      fi
36350      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36351    fi
36352  fi
36353
36354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36357  # "foo.exe" is OK but "foo" is an error.
36358  #
36359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36360  # It is also a way to make sure we got the proper file name for the real test later on.
36361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36362  if test "x$test_shortpath" = x; then
36363    # Short path failed, file does not exist as specified.
36364    # Try adding .exe or .cmd
36365    if test -f "${new_path}.exe"; then
36366      input_to_shortpath="${new_path}.exe"
36367    elif test -f "${new_path}.cmd"; then
36368      input_to_shortpath="${new_path}.cmd"
36369    else
36370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36371$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36374      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36375    fi
36376  else
36377    input_to_shortpath="$new_path"
36378  fi
36379
36380  # Call helper function which possibly converts this using DOS-style short mode.
36381  # If so, the updated path is stored in $new_path.
36382  new_path="$input_to_shortpath"
36383
36384  input_path="$input_to_shortpath"
36385  # Check if we need to convert this using DOS-style short mode. If the path
36386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36387  # take no chances and rewrite it.
36388  # Note: m4 eats our [], so we need to use [ and ] instead.
36389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36390  if test "x$has_forbidden_chars" != x; then
36391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36395      # Going to short mode and back again did indeed matter. Since short mode is
36396      # case insensitive, let's make it lowercase to improve readability.
36397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36398      # Now convert it back to Unix-style (cygpath)
36399      input_path=`$CYGPATH -u "$shortmode_path"`
36400      new_path="$input_path"
36401    fi
36402  fi
36403
36404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36405  if test "x$test_cygdrive_prefix" = x; then
36406    # As a simple fix, exclude /usr/bin since it's not a real path.
36407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36409      # a path prefixed by /cygdrive for fixpath to work.
36410      new_path="$CYGWIN_ROOT_PATH$input_path"
36411    fi
36412  fi
36413
36414  # remove trailing .exe if any
36415  new_path="${new_path/%.exe/}"
36416
36417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36418
36419  # First separate the path from the arguments. This will split at the first
36420  # space.
36421  complete="$CPP"
36422  path="${complete%% *}"
36423  tmp="$complete EOL"
36424  arguments="${tmp#* }"
36425
36426  # Input might be given as Windows format, start by converting to
36427  # unix format.
36428  new_path="$path"
36429
36430  windows_path="$new_path"
36431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36432    unix_path=`$CYGPATH -u "$windows_path"`
36433    new_path="$unix_path"
36434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36436    new_path="$unix_path"
36437  fi
36438
36439
36440  # Now try to locate executable using which
36441  new_path=`$WHICH "$new_path" 2> /dev/null`
36442
36443  if test "x$new_path" = x; then
36444    # Oops. Which didn't find the executable.
36445    # The splitting of arguments from the executable at a space might have been incorrect,
36446    # since paths with space are more likely in Windows. Give it another try with the whole
36447    # argument.
36448    path="$complete"
36449    arguments="EOL"
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
36462    new_path=`$WHICH "$new_path" 2> /dev/null`
36463    # bat and cmd files are not always considered executable in MSYS causing which
36464    # to not find them
36465    if test "x$new_path" = x \
36466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36468      new_path="$path"
36469
36470  windows_path="$new_path"
36471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36472    unix_path=`$CYGPATH -u "$windows_path"`
36473    new_path="$unix_path"
36474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36476    new_path="$unix_path"
36477  fi
36478
36479    fi
36480
36481    if test "x$new_path" = x; then
36482      # It's still not found. Now this is an unrecoverable error.
36483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36484$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36485      has_space=`$ECHO "$complete" | $GREP " "`
36486      if test "x$has_space" != x; then
36487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36489      fi
36490      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36491    fi
36492  fi
36493
36494  # Now new_path has a complete unix path to the binary
36495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36496    # Keep paths in /bin as-is, but remove trailing .exe if any
36497    new_path="${new_path/%.exe/}"
36498    # Do not save /bin paths to all_fixpath_prefixes!
36499  else
36500    # Not in mixed or Windows style, start by that.
36501    new_path=`cmd //c echo $new_path`
36502
36503  input_path="$new_path"
36504  # Check if we need to convert this using DOS-style short mode. If the path
36505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36506  # take no chances and rewrite it.
36507  # Note: m4 eats our [], so we need to use [ and ] instead.
36508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36509  if test "x$has_forbidden_chars" != x; then
36510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36512  fi
36513
36514    # Output is in $new_path
36515
36516  windows_path="$new_path"
36517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36518    unix_path=`$CYGPATH -u "$windows_path"`
36519    new_path="$unix_path"
36520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36522    new_path="$unix_path"
36523  fi
36524
36525    # remove trailing .exe if any
36526    new_path="${new_path/%.exe/}"
36527
36528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36530  fi
36531
36532    else
36533      # We're on a unix platform. Hooray! :)
36534      # First separate the path from the arguments. This will split at the first
36535      # space.
36536      complete="$CPP"
36537      path="${complete%% *}"
36538      tmp="$complete EOL"
36539      arguments="${tmp#* }"
36540
36541      # Cannot rely on the command "which" here since it doesn't always work.
36542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36543      if test -z "$is_absolute_path"; then
36544        # Path to executable is not absolute. Find it.
36545        IFS_save="$IFS"
36546        IFS=:
36547        for p in $PATH; do
36548          if test -f "$p/$path" && test -x "$p/$path"; then
36549            new_path="$p/$path"
36550            break
36551          fi
36552        done
36553        IFS="$IFS_save"
36554      else
36555        # This is an absolute path, we can use it without further modifications.
36556        new_path="$path"
36557      fi
36558
36559      if test "x$new_path" = x; then
36560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36561$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36562        has_space=`$ECHO "$complete" | $GREP " "`
36563        if test "x$has_space" != x; then
36564          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36566        fi
36567        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36568      fi
36569    fi
36570
36571    # Now join together the path and the arguments once again
36572    if test "x$arguments" != xEOL; then
36573      new_complete="$new_path ${arguments% *}"
36574    else
36575      new_complete="$new_path"
36576    fi
36577
36578    if test "x$complete" != "x$new_complete"; then
36579      CPP="$new_complete"
36580      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36581$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36582    fi
36583  fi
36584
36585  ac_ext=cpp
36586ac_cpp='$CXXCPP $CPPFLAGS'
36587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36591$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36592if test -z "$CXXCPP"; then
36593  if ${ac_cv_prog_CXXCPP+:} false; then :
36594  $as_echo_n "(cached) " >&6
36595else
36596      # Double quotes because CXXCPP needs to be expanded
36597    for CXXCPP in "$CXX -E" "/lib/cpp"
36598    do
36599      ac_preproc_ok=false
36600for ac_cxx_preproc_warn_flag in '' yes
36601do
36602  # Use a header file that comes with gcc, so configuring glibc
36603  # with a fresh cross-compiler works.
36604  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36605  # <limits.h> exists even on freestanding compilers.
36606  # On the NeXT, cc -E runs the code through the compiler's parser,
36607  # not just through cpp. "Syntax error" is here to catch this case.
36608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36609/* end confdefs.h.  */
36610#ifdef __STDC__
36611# include <limits.h>
36612#else
36613# include <assert.h>
36614#endif
36615		     Syntax error
36616_ACEOF
36617if ac_fn_cxx_try_cpp "$LINENO"; then :
36618
36619else
36620  # Broken: fails on valid input.
36621continue
36622fi
36623rm -f conftest.err conftest.i conftest.$ac_ext
36624
36625  # OK, works on sane cases.  Now check whether nonexistent headers
36626  # can be detected and how.
36627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36628/* end confdefs.h.  */
36629#include <ac_nonexistent.h>
36630_ACEOF
36631if ac_fn_cxx_try_cpp "$LINENO"; then :
36632  # Broken: success on invalid input.
36633continue
36634else
36635  # Passes both tests.
36636ac_preproc_ok=:
36637break
36638fi
36639rm -f conftest.err conftest.i conftest.$ac_ext
36640
36641done
36642# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36643rm -f conftest.i conftest.err conftest.$ac_ext
36644if $ac_preproc_ok; then :
36645  break
36646fi
36647
36648    done
36649    ac_cv_prog_CXXCPP=$CXXCPP
36650
36651fi
36652  CXXCPP=$ac_cv_prog_CXXCPP
36653else
36654  ac_cv_prog_CXXCPP=$CXXCPP
36655fi
36656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36657$as_echo "$CXXCPP" >&6; }
36658ac_preproc_ok=false
36659for ac_cxx_preproc_warn_flag in '' yes
36660do
36661  # Use a header file that comes with gcc, so configuring glibc
36662  # with a fresh cross-compiler works.
36663  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36664  # <limits.h> exists even on freestanding compilers.
36665  # On the NeXT, cc -E runs the code through the compiler's parser,
36666  # not just through cpp. "Syntax error" is here to catch this case.
36667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36668/* end confdefs.h.  */
36669#ifdef __STDC__
36670# include <limits.h>
36671#else
36672# include <assert.h>
36673#endif
36674		     Syntax error
36675_ACEOF
36676if ac_fn_cxx_try_cpp "$LINENO"; then :
36677
36678else
36679  # Broken: fails on valid input.
36680continue
36681fi
36682rm -f conftest.err conftest.i conftest.$ac_ext
36683
36684  # OK, works on sane cases.  Now check whether nonexistent headers
36685  # can be detected and how.
36686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36687/* end confdefs.h.  */
36688#include <ac_nonexistent.h>
36689_ACEOF
36690if ac_fn_cxx_try_cpp "$LINENO"; then :
36691  # Broken: success on invalid input.
36692continue
36693else
36694  # Passes both tests.
36695ac_preproc_ok=:
36696break
36697fi
36698rm -f conftest.err conftest.i conftest.$ac_ext
36699
36700done
36701# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36702rm -f conftest.i conftest.err conftest.$ac_ext
36703if $ac_preproc_ok; then :
36704
36705else
36706  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36708as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36709See \`config.log' for more details" "$LINENO" 5; }
36710fi
36711
36712ac_ext=cpp
36713ac_cpp='$CXXCPP $CPPFLAGS'
36714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36717
36718
36719  # Only process if variable expands to non-empty
36720
36721  if test "x$CXXCPP" != x; then
36722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36723
36724  # First separate the path from the arguments. This will split at the first
36725  # space.
36726  complete="$CXXCPP"
36727  path="${complete%% *}"
36728  tmp="$complete EOL"
36729  arguments="${tmp#* }"
36730
36731  # Input might be given as Windows format, start by converting to
36732  # unix format.
36733  new_path=`$CYGPATH -u "$path"`
36734
36735  # Now try to locate executable using which
36736  new_path=`$WHICH "$new_path" 2> /dev/null`
36737  # bat and cmd files are not always considered executable in cygwin causing which
36738  # to not find them
36739  if test "x$new_path" = x \
36740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36742    new_path=`$CYGPATH -u "$path"`
36743  fi
36744  if test "x$new_path" = x; then
36745    # Oops. Which didn't find the executable.
36746    # The splitting of arguments from the executable at a space might have been incorrect,
36747    # since paths with space are more likely in Windows. Give it another try with the whole
36748    # argument.
36749    path="$complete"
36750    arguments="EOL"
36751    new_path=`$CYGPATH -u "$path"`
36752    new_path=`$WHICH "$new_path" 2> /dev/null`
36753    # bat and cmd files are not always considered executable in cygwin causing which
36754    # to not find them
36755    if test "x$new_path" = x \
36756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36758      new_path=`$CYGPATH -u "$path"`
36759    fi
36760    if test "x$new_path" = x; then
36761      # It's still not found. Now this is an unrecoverable error.
36762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36763$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36764      has_space=`$ECHO "$complete" | $GREP " "`
36765      if test "x$has_space" != x; then
36766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36768      fi
36769      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36770    fi
36771  fi
36772
36773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36776  # "foo.exe" is OK but "foo" is an error.
36777  #
36778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36779  # It is also a way to make sure we got the proper file name for the real test later on.
36780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36781  if test "x$test_shortpath" = x; then
36782    # Short path failed, file does not exist as specified.
36783    # Try adding .exe or .cmd
36784    if test -f "${new_path}.exe"; then
36785      input_to_shortpath="${new_path}.exe"
36786    elif test -f "${new_path}.cmd"; then
36787      input_to_shortpath="${new_path}.cmd"
36788    else
36789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36790$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36793      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36794    fi
36795  else
36796    input_to_shortpath="$new_path"
36797  fi
36798
36799  # Call helper function which possibly converts this using DOS-style short mode.
36800  # If so, the updated path is stored in $new_path.
36801  new_path="$input_to_shortpath"
36802
36803  input_path="$input_to_shortpath"
36804  # Check if we need to convert this using DOS-style short mode. If the path
36805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36806  # take no chances and rewrite it.
36807  # Note: m4 eats our [], so we need to use [ and ] instead.
36808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36809  if test "x$has_forbidden_chars" != x; then
36810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36814      # Going to short mode and back again did indeed matter. Since short mode is
36815      # case insensitive, let's make it lowercase to improve readability.
36816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36817      # Now convert it back to Unix-style (cygpath)
36818      input_path=`$CYGPATH -u "$shortmode_path"`
36819      new_path="$input_path"
36820    fi
36821  fi
36822
36823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36824  if test "x$test_cygdrive_prefix" = x; then
36825    # As a simple fix, exclude /usr/bin since it's not a real path.
36826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36828      # a path prefixed by /cygdrive for fixpath to work.
36829      new_path="$CYGWIN_ROOT_PATH$input_path"
36830    fi
36831  fi
36832
36833  # remove trailing .exe if any
36834  new_path="${new_path/%.exe/}"
36835
36836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36837
36838  # First separate the path from the arguments. This will split at the first
36839  # space.
36840  complete="$CXXCPP"
36841  path="${complete%% *}"
36842  tmp="$complete EOL"
36843  arguments="${tmp#* }"
36844
36845  # Input might be given as Windows format, start by converting to
36846  # unix format.
36847  new_path="$path"
36848
36849  windows_path="$new_path"
36850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36851    unix_path=`$CYGPATH -u "$windows_path"`
36852    new_path="$unix_path"
36853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36855    new_path="$unix_path"
36856  fi
36857
36858
36859  # Now try to locate executable using which
36860  new_path=`$WHICH "$new_path" 2> /dev/null`
36861
36862  if test "x$new_path" = x; then
36863    # Oops. Which didn't find the executable.
36864    # The splitting of arguments from the executable at a space might have been incorrect,
36865    # since paths with space are more likely in Windows. Give it another try with the whole
36866    # argument.
36867    path="$complete"
36868    arguments="EOL"
36869    new_path="$path"
36870
36871  windows_path="$new_path"
36872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36873    unix_path=`$CYGPATH -u "$windows_path"`
36874    new_path="$unix_path"
36875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36877    new_path="$unix_path"
36878  fi
36879
36880
36881    new_path=`$WHICH "$new_path" 2> /dev/null`
36882    # bat and cmd files are not always considered executable in MSYS causing which
36883    # to not find them
36884    if test "x$new_path" = x \
36885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36887      new_path="$path"
36888
36889  windows_path="$new_path"
36890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36891    unix_path=`$CYGPATH -u "$windows_path"`
36892    new_path="$unix_path"
36893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36895    new_path="$unix_path"
36896  fi
36897
36898    fi
36899
36900    if test "x$new_path" = x; then
36901      # It's still not found. Now this is an unrecoverable error.
36902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36903$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36904      has_space=`$ECHO "$complete" | $GREP " "`
36905      if test "x$has_space" != x; then
36906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36908      fi
36909      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36910    fi
36911  fi
36912
36913  # Now new_path has a complete unix path to the binary
36914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36915    # Keep paths in /bin as-is, but remove trailing .exe if any
36916    new_path="${new_path/%.exe/}"
36917    # Do not save /bin paths to all_fixpath_prefixes!
36918  else
36919    # Not in mixed or Windows style, start by that.
36920    new_path=`cmd //c echo $new_path`
36921
36922  input_path="$new_path"
36923  # Check if we need to convert this using DOS-style short mode. If the path
36924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36925  # take no chances and rewrite it.
36926  # Note: m4 eats our [], so we need to use [ and ] instead.
36927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36928  if test "x$has_forbidden_chars" != x; then
36929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36931  fi
36932
36933    # Output is in $new_path
36934
36935  windows_path="$new_path"
36936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36937    unix_path=`$CYGPATH -u "$windows_path"`
36938    new_path="$unix_path"
36939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36941    new_path="$unix_path"
36942  fi
36943
36944    # remove trailing .exe if any
36945    new_path="${new_path/%.exe/}"
36946
36947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36949  fi
36950
36951    else
36952      # We're on a unix platform. Hooray! :)
36953      # First separate the path from the arguments. This will split at the first
36954      # space.
36955      complete="$CXXCPP"
36956      path="${complete%% *}"
36957      tmp="$complete EOL"
36958      arguments="${tmp#* }"
36959
36960      # Cannot rely on the command "which" here since it doesn't always work.
36961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36962      if test -z "$is_absolute_path"; then
36963        # Path to executable is not absolute. Find it.
36964        IFS_save="$IFS"
36965        IFS=:
36966        for p in $PATH; do
36967          if test -f "$p/$path" && test -x "$p/$path"; then
36968            new_path="$p/$path"
36969            break
36970          fi
36971        done
36972        IFS="$IFS_save"
36973      else
36974        # This is an absolute path, we can use it without further modifications.
36975        new_path="$path"
36976      fi
36977
36978      if test "x$new_path" = x; then
36979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36980$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36981        has_space=`$ECHO "$complete" | $GREP " "`
36982        if test "x$has_space" != x; then
36983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36985        fi
36986        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36987      fi
36988    fi
36989
36990    # Now join together the path and the arguments once again
36991    if test "x$arguments" != xEOL; then
36992      new_complete="$new_path ${arguments% *}"
36993    else
36994      new_complete="$new_path"
36995    fi
36996
36997    if test "x$complete" != "x$new_complete"; then
36998      CXXCPP="$new_complete"
36999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37000$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37001    fi
37002  fi
37003
37004
37005  #
37006  # Setup the linker (LD)
37007  #
37008  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37009    # In the Microsoft toolchain we have a separate LD command "link".
37010    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37011    # a cygwin program for something completely different.
37012    # Extract the first word of "link", so it can be a program name with args.
37013set dummy link; ac_word=$2
37014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37015$as_echo_n "checking for $ac_word... " >&6; }
37016if ${ac_cv_prog_LD+:} false; then :
37017  $as_echo_n "(cached) " >&6
37018else
37019  if test -n "$LD"; then
37020  ac_cv_prog_LD="$LD" # Let the user override the test.
37021else
37022  ac_prog_rejected=no
37023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37024for as_dir in $PATH
37025do
37026  IFS=$as_save_IFS
37027  test -z "$as_dir" && as_dir=.
37028    for ac_exec_ext in '' $ac_executable_extensions; do
37029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37030    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37031       ac_prog_rejected=yes
37032       continue
37033     fi
37034    ac_cv_prog_LD="link"
37035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37036    break 2
37037  fi
37038done
37039  done
37040IFS=$as_save_IFS
37041
37042if test $ac_prog_rejected = yes; then
37043  # We found a bogon in the path, so make sure we never use it.
37044  set dummy $ac_cv_prog_LD
37045  shift
37046  if test $# != 0; then
37047    # We chose a different compiler from the bogus one.
37048    # However, it has the same basename, so the bogon will be chosen
37049    # first if we set LD to just the basename; use the full file name.
37050    shift
37051    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37052  fi
37053fi
37054fi
37055fi
37056LD=$ac_cv_prog_LD
37057if test -n "$LD"; then
37058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37059$as_echo "$LD" >&6; }
37060else
37061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37062$as_echo "no" >&6; }
37063fi
37064
37065
37066
37067  # Only process if variable expands to non-empty
37068
37069  if test "x$LD" != x; then
37070    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37071
37072  # First separate the path from the arguments. This will split at the first
37073  # space.
37074  complete="$LD"
37075  path="${complete%% *}"
37076  tmp="$complete EOL"
37077  arguments="${tmp#* }"
37078
37079  # Input might be given as Windows format, start by converting to
37080  # unix format.
37081  new_path=`$CYGPATH -u "$path"`
37082
37083  # Now try to locate executable using which
37084  new_path=`$WHICH "$new_path" 2> /dev/null`
37085  # bat and cmd files are not always considered executable in cygwin causing which
37086  # to not find them
37087  if test "x$new_path" = x \
37088      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37089      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37090    new_path=`$CYGPATH -u "$path"`
37091  fi
37092  if test "x$new_path" = x; then
37093    # Oops. Which didn't find the executable.
37094    # The splitting of arguments from the executable at a space might have been incorrect,
37095    # since paths with space are more likely in Windows. Give it another try with the whole
37096    # argument.
37097    path="$complete"
37098    arguments="EOL"
37099    new_path=`$CYGPATH -u "$path"`
37100    new_path=`$WHICH "$new_path" 2> /dev/null`
37101    # bat and cmd files are not always considered executable in cygwin causing which
37102    # to not find them
37103    if test "x$new_path" = x \
37104        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37105        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37106      new_path=`$CYGPATH -u "$path"`
37107    fi
37108    if test "x$new_path" = x; then
37109      # It's still not found. Now this is an unrecoverable error.
37110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37111$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37112      has_space=`$ECHO "$complete" | $GREP " "`
37113      if test "x$has_space" != x; then
37114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37116      fi
37117      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37118    fi
37119  fi
37120
37121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37124  # "foo.exe" is OK but "foo" is an error.
37125  #
37126  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37127  # It is also a way to make sure we got the proper file name for the real test later on.
37128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37129  if test "x$test_shortpath" = x; then
37130    # Short path failed, file does not exist as specified.
37131    # Try adding .exe or .cmd
37132    if test -f "${new_path}.exe"; then
37133      input_to_shortpath="${new_path}.exe"
37134    elif test -f "${new_path}.cmd"; then
37135      input_to_shortpath="${new_path}.cmd"
37136    else
37137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37138$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37139      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37140$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37141      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37142    fi
37143  else
37144    input_to_shortpath="$new_path"
37145  fi
37146
37147  # Call helper function which possibly converts this using DOS-style short mode.
37148  # If so, the updated path is stored in $new_path.
37149  new_path="$input_to_shortpath"
37150
37151  input_path="$input_to_shortpath"
37152  # Check if we need to convert this using DOS-style short mode. If the path
37153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37154  # take no chances and rewrite it.
37155  # Note: m4 eats our [], so we need to use [ and ] instead.
37156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37157  if test "x$has_forbidden_chars" != x; then
37158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37162      # Going to short mode and back again did indeed matter. Since short mode is
37163      # case insensitive, let's make it lowercase to improve readability.
37164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37165      # Now convert it back to Unix-style (cygpath)
37166      input_path=`$CYGPATH -u "$shortmode_path"`
37167      new_path="$input_path"
37168    fi
37169  fi
37170
37171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37172  if test "x$test_cygdrive_prefix" = x; then
37173    # As a simple fix, exclude /usr/bin since it's not a real path.
37174    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37176      # a path prefixed by /cygdrive for fixpath to work.
37177      new_path="$CYGWIN_ROOT_PATH$input_path"
37178    fi
37179  fi
37180
37181  # remove trailing .exe if any
37182  new_path="${new_path/%.exe/}"
37183
37184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37185
37186  # First separate the path from the arguments. This will split at the first
37187  # space.
37188  complete="$LD"
37189  path="${complete%% *}"
37190  tmp="$complete EOL"
37191  arguments="${tmp#* }"
37192
37193  # Input might be given as Windows format, start by converting to
37194  # unix format.
37195  new_path="$path"
37196
37197  windows_path="$new_path"
37198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37199    unix_path=`$CYGPATH -u "$windows_path"`
37200    new_path="$unix_path"
37201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37203    new_path="$unix_path"
37204  fi
37205
37206
37207  # Now try to locate executable using which
37208  new_path=`$WHICH "$new_path" 2> /dev/null`
37209
37210  if test "x$new_path" = x; then
37211    # Oops. Which didn't find the executable.
37212    # The splitting of arguments from the executable at a space might have been incorrect,
37213    # since paths with space are more likely in Windows. Give it another try with the whole
37214    # argument.
37215    path="$complete"
37216    arguments="EOL"
37217    new_path="$path"
37218
37219  windows_path="$new_path"
37220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37221    unix_path=`$CYGPATH -u "$windows_path"`
37222    new_path="$unix_path"
37223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37225    new_path="$unix_path"
37226  fi
37227
37228
37229    new_path=`$WHICH "$new_path" 2> /dev/null`
37230    # bat and cmd files are not always considered executable in MSYS causing which
37231    # to not find them
37232    if test "x$new_path" = x \
37233        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37234        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37235      new_path="$path"
37236
37237  windows_path="$new_path"
37238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37239    unix_path=`$CYGPATH -u "$windows_path"`
37240    new_path="$unix_path"
37241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37243    new_path="$unix_path"
37244  fi
37245
37246    fi
37247
37248    if test "x$new_path" = x; then
37249      # It's still not found. Now this is an unrecoverable error.
37250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37251$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37252      has_space=`$ECHO "$complete" | $GREP " "`
37253      if test "x$has_space" != x; then
37254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37256      fi
37257      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37258    fi
37259  fi
37260
37261  # Now new_path has a complete unix path to the binary
37262  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37263    # Keep paths in /bin as-is, but remove trailing .exe if any
37264    new_path="${new_path/%.exe/}"
37265    # Do not save /bin paths to all_fixpath_prefixes!
37266  else
37267    # Not in mixed or Windows style, start by that.
37268    new_path=`cmd //c echo $new_path`
37269
37270  input_path="$new_path"
37271  # Check if we need to convert this using DOS-style short mode. If the path
37272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37273  # take no chances and rewrite it.
37274  # Note: m4 eats our [], so we need to use [ and ] instead.
37275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37276  if test "x$has_forbidden_chars" != x; then
37277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37279  fi
37280
37281    # Output is in $new_path
37282
37283  windows_path="$new_path"
37284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37285    unix_path=`$CYGPATH -u "$windows_path"`
37286    new_path="$unix_path"
37287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37289    new_path="$unix_path"
37290  fi
37291
37292    # remove trailing .exe if any
37293    new_path="${new_path/%.exe/}"
37294
37295    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37296    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37297  fi
37298
37299    else
37300      # We're on a unix platform. Hooray! :)
37301      # First separate the path from the arguments. This will split at the first
37302      # space.
37303      complete="$LD"
37304      path="${complete%% *}"
37305      tmp="$complete EOL"
37306      arguments="${tmp#* }"
37307
37308      # Cannot rely on the command "which" here since it doesn't always work.
37309      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37310      if test -z "$is_absolute_path"; then
37311        # Path to executable is not absolute. Find it.
37312        IFS_save="$IFS"
37313        IFS=:
37314        for p in $PATH; do
37315          if test -f "$p/$path" && test -x "$p/$path"; then
37316            new_path="$p/$path"
37317            break
37318          fi
37319        done
37320        IFS="$IFS_save"
37321      else
37322        # This is an absolute path, we can use it without further modifications.
37323        new_path="$path"
37324      fi
37325
37326      if test "x$new_path" = x; then
37327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37328$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37329        has_space=`$ECHO "$complete" | $GREP " "`
37330        if test "x$has_space" != x; then
37331          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37333        fi
37334        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37335      fi
37336    fi
37337
37338    # Now join together the path and the arguments once again
37339    if test "x$arguments" != xEOL; then
37340      new_complete="$new_path ${arguments% *}"
37341    else
37342      new_complete="$new_path"
37343    fi
37344
37345    if test "x$complete" != "x$new_complete"; then
37346      LD="$new_complete"
37347      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37348$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37349    fi
37350  fi
37351
37352    # Verify that we indeed succeeded with this trick.
37353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37354$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37355    "$LD" --version > /dev/null
37356    if test $? -eq 0 ; then
37357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37358$as_echo "no" >&6; }
37359      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37360    else
37361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37362$as_echo "yes" >&6; }
37363    fi
37364    LDCXX="$LD"
37365  else
37366    # All other toolchains use the compiler to link.
37367    LD="$CC"
37368    LDCXX="$CXX"
37369  fi
37370
37371  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37372
37373
37374  #
37375  # Setup the assembler (AS)
37376  #
37377  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37378
37379
37380  # Publish this variable in the help.
37381
37382
37383  if [ -z "${AS+x}" ]; then
37384    # The variable is not set by user, try to locate tool using the code snippet
37385    for ac_prog in as
37386do
37387  # Extract the first word of "$ac_prog", so it can be a program name with args.
37388set dummy $ac_prog; ac_word=$2
37389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37390$as_echo_n "checking for $ac_word... " >&6; }
37391if ${ac_cv_path_AS+:} false; then :
37392  $as_echo_n "(cached) " >&6
37393else
37394  case $AS in
37395  [\\/]* | ?:[\\/]*)
37396  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37397  ;;
37398  *)
37399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37400for as_dir in $PATH
37401do
37402  IFS=$as_save_IFS
37403  test -z "$as_dir" && as_dir=.
37404    for ac_exec_ext in '' $ac_executable_extensions; do
37405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37406    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37408    break 2
37409  fi
37410done
37411  done
37412IFS=$as_save_IFS
37413
37414  ;;
37415esac
37416fi
37417AS=$ac_cv_path_AS
37418if test -n "$AS"; then
37419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37420$as_echo "$AS" >&6; }
37421else
37422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37423$as_echo "no" >&6; }
37424fi
37425
37426
37427  test -n "$AS" && break
37428done
37429
37430  else
37431    # The variable is set, but is it from the command line or the environment?
37432
37433    # Try to remove the string !AS! from our list.
37434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37436      # If it failed, the variable was not from the command line. Ignore it,
37437      # but warn the user (except for BASH, which is always set by the calling BASH).
37438      if test "xAS" != xBASH; then
37439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37440$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37441      fi
37442      # Try to locate tool using the code snippet
37443      for ac_prog in as
37444do
37445  # Extract the first word of "$ac_prog", so it can be a program name with args.
37446set dummy $ac_prog; ac_word=$2
37447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37448$as_echo_n "checking for $ac_word... " >&6; }
37449if ${ac_cv_path_AS+:} false; then :
37450  $as_echo_n "(cached) " >&6
37451else
37452  case $AS in
37453  [\\/]* | ?:[\\/]*)
37454  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37455  ;;
37456  *)
37457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37458for as_dir in $PATH
37459do
37460  IFS=$as_save_IFS
37461  test -z "$as_dir" && as_dir=.
37462    for ac_exec_ext in '' $ac_executable_extensions; do
37463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37464    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37466    break 2
37467  fi
37468done
37469  done
37470IFS=$as_save_IFS
37471
37472  ;;
37473esac
37474fi
37475AS=$ac_cv_path_AS
37476if test -n "$AS"; then
37477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37478$as_echo "$AS" >&6; }
37479else
37480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37481$as_echo "no" >&6; }
37482fi
37483
37484
37485  test -n "$AS" && break
37486done
37487
37488    else
37489      # If it succeeded, then it was overridden by the user. We will use it
37490      # for the tool.
37491
37492      # First remove it from the list of overridden variables, so we can test
37493      # for unknown variables in the end.
37494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37495
37496      # Check if we try to supply an empty value
37497      if test "x$AS" = x; then
37498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37499$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37501$as_echo_n "checking for AS... " >&6; }
37502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37503$as_echo "disabled" >&6; }
37504      else
37505        # Check if the provided tool contains a complete path.
37506        tool_specified="$AS"
37507        tool_basename="${tool_specified##*/}"
37508        if test "x$tool_basename" = "x$tool_specified"; then
37509          # A command without a complete path is provided, search $PATH.
37510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37511$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37512          # Extract the first word of "$tool_basename", so it can be a program name with args.
37513set dummy $tool_basename; ac_word=$2
37514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37515$as_echo_n "checking for $ac_word... " >&6; }
37516if ${ac_cv_path_AS+:} false; then :
37517  $as_echo_n "(cached) " >&6
37518else
37519  case $AS in
37520  [\\/]* | ?:[\\/]*)
37521  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37522  ;;
37523  *)
37524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37525for as_dir in $PATH
37526do
37527  IFS=$as_save_IFS
37528  test -z "$as_dir" && as_dir=.
37529    for ac_exec_ext in '' $ac_executable_extensions; do
37530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37531    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37533    break 2
37534  fi
37535done
37536  done
37537IFS=$as_save_IFS
37538
37539  ;;
37540esac
37541fi
37542AS=$ac_cv_path_AS
37543if test -n "$AS"; then
37544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37545$as_echo "$AS" >&6; }
37546else
37547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37548$as_echo "no" >&6; }
37549fi
37550
37551
37552          if test "x$AS" = x; then
37553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37554          fi
37555        else
37556          # Otherwise we believe it is a complete path. Use it as it is.
37557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37558$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37560$as_echo_n "checking for AS... " >&6; }
37561          if test ! -x "$tool_specified"; then
37562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37563$as_echo "not found" >&6; }
37564            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37565          fi
37566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37567$as_echo "$tool_specified" >&6; }
37568        fi
37569      fi
37570    fi
37571
37572  fi
37573
37574
37575
37576  # Only process if variable expands to non-empty
37577
37578  if test "x$AS" != x; then
37579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37580
37581  # First separate the path from the arguments. This will split at the first
37582  # space.
37583  complete="$AS"
37584  path="${complete%% *}"
37585  tmp="$complete EOL"
37586  arguments="${tmp#* }"
37587
37588  # Input might be given as Windows format, start by converting to
37589  # unix format.
37590  new_path=`$CYGPATH -u "$path"`
37591
37592  # Now try to locate executable using which
37593  new_path=`$WHICH "$new_path" 2> /dev/null`
37594  # bat and cmd files are not always considered executable in cygwin causing which
37595  # to not find them
37596  if test "x$new_path" = x \
37597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37599    new_path=`$CYGPATH -u "$path"`
37600  fi
37601  if test "x$new_path" = x; then
37602    # Oops. Which didn't find the executable.
37603    # The splitting of arguments from the executable at a space might have been incorrect,
37604    # since paths with space are more likely in Windows. Give it another try with the whole
37605    # argument.
37606    path="$complete"
37607    arguments="EOL"
37608    new_path=`$CYGPATH -u "$path"`
37609    new_path=`$WHICH "$new_path" 2> /dev/null`
37610    # bat and cmd files are not always considered executable in cygwin causing which
37611    # to not find them
37612    if test "x$new_path" = x \
37613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37615      new_path=`$CYGPATH -u "$path"`
37616    fi
37617    if test "x$new_path" = x; then
37618      # It's still not found. Now this is an unrecoverable error.
37619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37620$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37621      has_space=`$ECHO "$complete" | $GREP " "`
37622      if test "x$has_space" != x; then
37623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37625      fi
37626      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37627    fi
37628  fi
37629
37630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37633  # "foo.exe" is OK but "foo" is an error.
37634  #
37635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37636  # It is also a way to make sure we got the proper file name for the real test later on.
37637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37638  if test "x$test_shortpath" = x; then
37639    # Short path failed, file does not exist as specified.
37640    # Try adding .exe or .cmd
37641    if test -f "${new_path}.exe"; then
37642      input_to_shortpath="${new_path}.exe"
37643    elif test -f "${new_path}.cmd"; then
37644      input_to_shortpath="${new_path}.cmd"
37645    else
37646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37647$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37650      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37651    fi
37652  else
37653    input_to_shortpath="$new_path"
37654  fi
37655
37656  # Call helper function which possibly converts this using DOS-style short mode.
37657  # If so, the updated path is stored in $new_path.
37658  new_path="$input_to_shortpath"
37659
37660  input_path="$input_to_shortpath"
37661  # Check if we need to convert this using DOS-style short mode. If the path
37662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37663  # take no chances and rewrite it.
37664  # Note: m4 eats our [], so we need to use [ and ] instead.
37665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37666  if test "x$has_forbidden_chars" != x; then
37667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37671      # Going to short mode and back again did indeed matter. Since short mode is
37672      # case insensitive, let's make it lowercase to improve readability.
37673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37674      # Now convert it back to Unix-style (cygpath)
37675      input_path=`$CYGPATH -u "$shortmode_path"`
37676      new_path="$input_path"
37677    fi
37678  fi
37679
37680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37681  if test "x$test_cygdrive_prefix" = x; then
37682    # As a simple fix, exclude /usr/bin since it's not a real path.
37683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37685      # a path prefixed by /cygdrive for fixpath to work.
37686      new_path="$CYGWIN_ROOT_PATH$input_path"
37687    fi
37688  fi
37689
37690  # remove trailing .exe if any
37691  new_path="${new_path/%.exe/}"
37692
37693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37694
37695  # First separate the path from the arguments. This will split at the first
37696  # space.
37697  complete="$AS"
37698  path="${complete%% *}"
37699  tmp="$complete EOL"
37700  arguments="${tmp#* }"
37701
37702  # Input might be given as Windows format, start by converting to
37703  # unix format.
37704  new_path="$path"
37705
37706  windows_path="$new_path"
37707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37708    unix_path=`$CYGPATH -u "$windows_path"`
37709    new_path="$unix_path"
37710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37712    new_path="$unix_path"
37713  fi
37714
37715
37716  # Now try to locate executable using which
37717  new_path=`$WHICH "$new_path" 2> /dev/null`
37718
37719  if test "x$new_path" = x; then
37720    # Oops. Which didn't find the executable.
37721    # The splitting of arguments from the executable at a space might have been incorrect,
37722    # since paths with space are more likely in Windows. Give it another try with the whole
37723    # argument.
37724    path="$complete"
37725    arguments="EOL"
37726    new_path="$path"
37727
37728  windows_path="$new_path"
37729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37730    unix_path=`$CYGPATH -u "$windows_path"`
37731    new_path="$unix_path"
37732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37734    new_path="$unix_path"
37735  fi
37736
37737
37738    new_path=`$WHICH "$new_path" 2> /dev/null`
37739    # bat and cmd files are not always considered executable in MSYS causing which
37740    # to not find them
37741    if test "x$new_path" = x \
37742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37744      new_path="$path"
37745
37746  windows_path="$new_path"
37747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37748    unix_path=`$CYGPATH -u "$windows_path"`
37749    new_path="$unix_path"
37750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37752    new_path="$unix_path"
37753  fi
37754
37755    fi
37756
37757    if test "x$new_path" = x; then
37758      # It's still not found. Now this is an unrecoverable error.
37759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37760$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37761      has_space=`$ECHO "$complete" | $GREP " "`
37762      if test "x$has_space" != x; then
37763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37765      fi
37766      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37767    fi
37768  fi
37769
37770  # Now new_path has a complete unix path to the binary
37771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37772    # Keep paths in /bin as-is, but remove trailing .exe if any
37773    new_path="${new_path/%.exe/}"
37774    # Do not save /bin paths to all_fixpath_prefixes!
37775  else
37776    # Not in mixed or Windows style, start by that.
37777    new_path=`cmd //c echo $new_path`
37778
37779  input_path="$new_path"
37780  # Check if we need to convert this using DOS-style short mode. If the path
37781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37782  # take no chances and rewrite it.
37783  # Note: m4 eats our [], so we need to use [ and ] instead.
37784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37785  if test "x$has_forbidden_chars" != x; then
37786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37788  fi
37789
37790    # Output is in $new_path
37791
37792  windows_path="$new_path"
37793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37794    unix_path=`$CYGPATH -u "$windows_path"`
37795    new_path="$unix_path"
37796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37798    new_path="$unix_path"
37799  fi
37800
37801    # remove trailing .exe if any
37802    new_path="${new_path/%.exe/}"
37803
37804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37806  fi
37807
37808    else
37809      # We're on a unix platform. Hooray! :)
37810      # First separate the path from the arguments. This will split at the first
37811      # space.
37812      complete="$AS"
37813      path="${complete%% *}"
37814      tmp="$complete EOL"
37815      arguments="${tmp#* }"
37816
37817      # Cannot rely on the command "which" here since it doesn't always work.
37818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37819      if test -z "$is_absolute_path"; then
37820        # Path to executable is not absolute. Find it.
37821        IFS_save="$IFS"
37822        IFS=:
37823        for p in $PATH; do
37824          if test -f "$p/$path" && test -x "$p/$path"; then
37825            new_path="$p/$path"
37826            break
37827          fi
37828        done
37829        IFS="$IFS_save"
37830      else
37831        # This is an absolute path, we can use it without further modifications.
37832        new_path="$path"
37833      fi
37834
37835      if test "x$new_path" = x; then
37836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37837$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37838        has_space=`$ECHO "$complete" | $GREP " "`
37839        if test "x$has_space" != x; then
37840          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37842        fi
37843        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37844      fi
37845    fi
37846
37847    # Now join together the path and the arguments once again
37848    if test "x$arguments" != xEOL; then
37849      new_complete="$new_path ${arguments% *}"
37850    else
37851      new_complete="$new_path"
37852    fi
37853
37854    if test "x$complete" != "x$new_complete"; then
37855      AS="$new_complete"
37856      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37857$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37858    fi
37859  fi
37860
37861    if test "x$AS" = x; then
37862      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37863    fi
37864  else
37865    # FIXME: is this correct for microsoft?
37866    AS="$CC -c"
37867  fi
37868
37869
37870  #
37871  # Setup the archiver (AR)
37872  #
37873  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37874    # The corresponding ar tool is lib.exe (used to create static libraries)
37875    # Extract the first word of "lib", so it can be a program name with args.
37876set dummy lib; ac_word=$2
37877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37878$as_echo_n "checking for $ac_word... " >&6; }
37879if ${ac_cv_prog_AR+:} false; then :
37880  $as_echo_n "(cached) " >&6
37881else
37882  if test -n "$AR"; then
37883  ac_cv_prog_AR="$AR" # Let the user override the test.
37884else
37885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37886for as_dir in $PATH
37887do
37888  IFS=$as_save_IFS
37889  test -z "$as_dir" && as_dir=.
37890    for ac_exec_ext in '' $ac_executable_extensions; do
37891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37892    ac_cv_prog_AR="lib"
37893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37894    break 2
37895  fi
37896done
37897  done
37898IFS=$as_save_IFS
37899
37900fi
37901fi
37902AR=$ac_cv_prog_AR
37903if test -n "$AR"; then
37904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37905$as_echo "$AR" >&6; }
37906else
37907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37908$as_echo "no" >&6; }
37909fi
37910
37911
37912  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37913
37914
37915  # Publish this variable in the help.
37916
37917
37918  if [ -z "${AR+x}" ]; then
37919    # The variable is not set by user, try to locate tool using the code snippet
37920    if test -n "$ac_tool_prefix"; then
37921  for ac_prog in ar gcc-ar
37922  do
37923    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37924set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37926$as_echo_n "checking for $ac_word... " >&6; }
37927if ${ac_cv_prog_AR+:} false; then :
37928  $as_echo_n "(cached) " >&6
37929else
37930  if test -n "$AR"; then
37931  ac_cv_prog_AR="$AR" # Let the user override the test.
37932else
37933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37934for as_dir in $PATH
37935do
37936  IFS=$as_save_IFS
37937  test -z "$as_dir" && as_dir=.
37938    for ac_exec_ext in '' $ac_executable_extensions; do
37939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37940    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37942    break 2
37943  fi
37944done
37945  done
37946IFS=$as_save_IFS
37947
37948fi
37949fi
37950AR=$ac_cv_prog_AR
37951if test -n "$AR"; then
37952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37953$as_echo "$AR" >&6; }
37954else
37955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37956$as_echo "no" >&6; }
37957fi
37958
37959
37960    test -n "$AR" && break
37961  done
37962fi
37963if test -z "$AR"; then
37964  ac_ct_AR=$AR
37965  for ac_prog in ar gcc-ar
37966do
37967  # Extract the first word of "$ac_prog", so it can be a program name with args.
37968set dummy $ac_prog; ac_word=$2
37969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37970$as_echo_n "checking for $ac_word... " >&6; }
37971if ${ac_cv_prog_ac_ct_AR+:} false; then :
37972  $as_echo_n "(cached) " >&6
37973else
37974  if test -n "$ac_ct_AR"; then
37975  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37976else
37977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37978for as_dir in $PATH
37979do
37980  IFS=$as_save_IFS
37981  test -z "$as_dir" && as_dir=.
37982    for ac_exec_ext in '' $ac_executable_extensions; do
37983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37984    ac_cv_prog_ac_ct_AR="$ac_prog"
37985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37986    break 2
37987  fi
37988done
37989  done
37990IFS=$as_save_IFS
37991
37992fi
37993fi
37994ac_ct_AR=$ac_cv_prog_ac_ct_AR
37995if test -n "$ac_ct_AR"; then
37996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37997$as_echo "$ac_ct_AR" >&6; }
37998else
37999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38000$as_echo "no" >&6; }
38001fi
38002
38003
38004  test -n "$ac_ct_AR" && break
38005done
38006
38007  if test "x$ac_ct_AR" = x; then
38008    AR=""
38009  else
38010    case $cross_compiling:$ac_tool_warned in
38011yes:)
38012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38014ac_tool_warned=yes ;;
38015esac
38016    AR=$ac_ct_AR
38017  fi
38018fi
38019
38020  else
38021    # The variable is set, but is it from the command line or the environment?
38022
38023    # Try to remove the string !AR! from our list.
38024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38026      # If it failed, the variable was not from the command line. Ignore it,
38027      # but warn the user (except for BASH, which is always set by the calling BASH).
38028      if test "xAR" != xBASH; then
38029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38030$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38031      fi
38032      # Try to locate tool using the code snippet
38033      if test -n "$ac_tool_prefix"; then
38034  for ac_prog in ar gcc-ar
38035  do
38036    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38037set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38039$as_echo_n "checking for $ac_word... " >&6; }
38040if ${ac_cv_prog_AR+:} false; then :
38041  $as_echo_n "(cached) " >&6
38042else
38043  if test -n "$AR"; then
38044  ac_cv_prog_AR="$AR" # Let the user override the test.
38045else
38046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38047for as_dir in $PATH
38048do
38049  IFS=$as_save_IFS
38050  test -z "$as_dir" && as_dir=.
38051    for ac_exec_ext in '' $ac_executable_extensions; do
38052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38053    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38055    break 2
38056  fi
38057done
38058  done
38059IFS=$as_save_IFS
38060
38061fi
38062fi
38063AR=$ac_cv_prog_AR
38064if test -n "$AR"; then
38065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38066$as_echo "$AR" >&6; }
38067else
38068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38069$as_echo "no" >&6; }
38070fi
38071
38072
38073    test -n "$AR" && break
38074  done
38075fi
38076if test -z "$AR"; then
38077  ac_ct_AR=$AR
38078  for ac_prog in ar gcc-ar
38079do
38080  # Extract the first word of "$ac_prog", so it can be a program name with args.
38081set dummy $ac_prog; ac_word=$2
38082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38083$as_echo_n "checking for $ac_word... " >&6; }
38084if ${ac_cv_prog_ac_ct_AR+:} false; then :
38085  $as_echo_n "(cached) " >&6
38086else
38087  if test -n "$ac_ct_AR"; then
38088  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38089else
38090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38091for as_dir in $PATH
38092do
38093  IFS=$as_save_IFS
38094  test -z "$as_dir" && as_dir=.
38095    for ac_exec_ext in '' $ac_executable_extensions; do
38096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38097    ac_cv_prog_ac_ct_AR="$ac_prog"
38098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38099    break 2
38100  fi
38101done
38102  done
38103IFS=$as_save_IFS
38104
38105fi
38106fi
38107ac_ct_AR=$ac_cv_prog_ac_ct_AR
38108if test -n "$ac_ct_AR"; then
38109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38110$as_echo "$ac_ct_AR" >&6; }
38111else
38112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38113$as_echo "no" >&6; }
38114fi
38115
38116
38117  test -n "$ac_ct_AR" && break
38118done
38119
38120  if test "x$ac_ct_AR" = x; then
38121    AR=""
38122  else
38123    case $cross_compiling:$ac_tool_warned in
38124yes:)
38125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38127ac_tool_warned=yes ;;
38128esac
38129    AR=$ac_ct_AR
38130  fi
38131fi
38132
38133    else
38134      # If it succeeded, then it was overridden by the user. We will use it
38135      # for the tool.
38136
38137      # First remove it from the list of overridden variables, so we can test
38138      # for unknown variables in the end.
38139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38140
38141      # Check if we try to supply an empty value
38142      if test "x$AR" = x; then
38143        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38144$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38146$as_echo_n "checking for AR... " >&6; }
38147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38148$as_echo "disabled" >&6; }
38149      else
38150        # Check if the provided tool contains a complete path.
38151        tool_specified="$AR"
38152        tool_basename="${tool_specified##*/}"
38153        if test "x$tool_basename" = "x$tool_specified"; then
38154          # A command without a complete path is provided, search $PATH.
38155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38156$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38157          # Extract the first word of "$tool_basename", so it can be a program name with args.
38158set dummy $tool_basename; ac_word=$2
38159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38160$as_echo_n "checking for $ac_word... " >&6; }
38161if ${ac_cv_path_AR+:} false; then :
38162  $as_echo_n "(cached) " >&6
38163else
38164  case $AR in
38165  [\\/]* | ?:[\\/]*)
38166  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38167  ;;
38168  *)
38169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38170for as_dir in $PATH
38171do
38172  IFS=$as_save_IFS
38173  test -z "$as_dir" && as_dir=.
38174    for ac_exec_ext in '' $ac_executable_extensions; do
38175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38176    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38178    break 2
38179  fi
38180done
38181  done
38182IFS=$as_save_IFS
38183
38184  ;;
38185esac
38186fi
38187AR=$ac_cv_path_AR
38188if test -n "$AR"; then
38189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38190$as_echo "$AR" >&6; }
38191else
38192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38193$as_echo "no" >&6; }
38194fi
38195
38196
38197          if test "x$AR" = x; then
38198            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38199          fi
38200        else
38201          # Otherwise we believe it is a complete path. Use it as it is.
38202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38203$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38205$as_echo_n "checking for AR... " >&6; }
38206          if test ! -x "$tool_specified"; then
38207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38208$as_echo "not found" >&6; }
38209            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38210          fi
38211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38212$as_echo "$tool_specified" >&6; }
38213        fi
38214      fi
38215    fi
38216
38217  fi
38218
38219
38220  else
38221
38222
38223  # Publish this variable in the help.
38224
38225
38226  if [ -z "${AR+x}" ]; then
38227    # The variable is not set by user, try to locate tool using the code snippet
38228    if test -n "$ac_tool_prefix"; then
38229  for ac_prog in ar
38230  do
38231    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38234$as_echo_n "checking for $ac_word... " >&6; }
38235if ${ac_cv_prog_AR+:} false; then :
38236  $as_echo_n "(cached) " >&6
38237else
38238  if test -n "$AR"; then
38239  ac_cv_prog_AR="$AR" # Let the user override the test.
38240else
38241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38242for as_dir in $PATH
38243do
38244  IFS=$as_save_IFS
38245  test -z "$as_dir" && as_dir=.
38246    for ac_exec_ext in '' $ac_executable_extensions; do
38247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38248    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38250    break 2
38251  fi
38252done
38253  done
38254IFS=$as_save_IFS
38255
38256fi
38257fi
38258AR=$ac_cv_prog_AR
38259if test -n "$AR"; then
38260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38261$as_echo "$AR" >&6; }
38262else
38263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38264$as_echo "no" >&6; }
38265fi
38266
38267
38268    test -n "$AR" && break
38269  done
38270fi
38271if test -z "$AR"; then
38272  ac_ct_AR=$AR
38273  for ac_prog in ar
38274do
38275  # Extract the first word of "$ac_prog", so it can be a program name with args.
38276set dummy $ac_prog; ac_word=$2
38277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38278$as_echo_n "checking for $ac_word... " >&6; }
38279if ${ac_cv_prog_ac_ct_AR+:} false; then :
38280  $as_echo_n "(cached) " >&6
38281else
38282  if test -n "$ac_ct_AR"; then
38283  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38284else
38285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38286for as_dir in $PATH
38287do
38288  IFS=$as_save_IFS
38289  test -z "$as_dir" && as_dir=.
38290    for ac_exec_ext in '' $ac_executable_extensions; do
38291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38292    ac_cv_prog_ac_ct_AR="$ac_prog"
38293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38294    break 2
38295  fi
38296done
38297  done
38298IFS=$as_save_IFS
38299
38300fi
38301fi
38302ac_ct_AR=$ac_cv_prog_ac_ct_AR
38303if test -n "$ac_ct_AR"; then
38304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38305$as_echo "$ac_ct_AR" >&6; }
38306else
38307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38308$as_echo "no" >&6; }
38309fi
38310
38311
38312  test -n "$ac_ct_AR" && break
38313done
38314
38315  if test "x$ac_ct_AR" = x; then
38316    AR=""
38317  else
38318    case $cross_compiling:$ac_tool_warned in
38319yes:)
38320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38322ac_tool_warned=yes ;;
38323esac
38324    AR=$ac_ct_AR
38325  fi
38326fi
38327
38328  else
38329    # The variable is set, but is it from the command line or the environment?
38330
38331    # Try to remove the string !AR! from our list.
38332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38334      # If it failed, the variable was not from the command line. Ignore it,
38335      # but warn the user (except for BASH, which is always set by the calling BASH).
38336      if test "xAR" != xBASH; then
38337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38338$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38339      fi
38340      # Try to locate tool using the code snippet
38341      if test -n "$ac_tool_prefix"; then
38342  for ac_prog in ar
38343  do
38344    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38345set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38347$as_echo_n "checking for $ac_word... " >&6; }
38348if ${ac_cv_prog_AR+:} false; then :
38349  $as_echo_n "(cached) " >&6
38350else
38351  if test -n "$AR"; then
38352  ac_cv_prog_AR="$AR" # Let the user override the test.
38353else
38354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38355for as_dir in $PATH
38356do
38357  IFS=$as_save_IFS
38358  test -z "$as_dir" && as_dir=.
38359    for ac_exec_ext in '' $ac_executable_extensions; do
38360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38361    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38363    break 2
38364  fi
38365done
38366  done
38367IFS=$as_save_IFS
38368
38369fi
38370fi
38371AR=$ac_cv_prog_AR
38372if test -n "$AR"; then
38373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38374$as_echo "$AR" >&6; }
38375else
38376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38377$as_echo "no" >&6; }
38378fi
38379
38380
38381    test -n "$AR" && break
38382  done
38383fi
38384if test -z "$AR"; then
38385  ac_ct_AR=$AR
38386  for ac_prog in ar
38387do
38388  # Extract the first word of "$ac_prog", so it can be a program name with args.
38389set dummy $ac_prog; ac_word=$2
38390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38391$as_echo_n "checking for $ac_word... " >&6; }
38392if ${ac_cv_prog_ac_ct_AR+:} false; then :
38393  $as_echo_n "(cached) " >&6
38394else
38395  if test -n "$ac_ct_AR"; then
38396  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38397else
38398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38399for as_dir in $PATH
38400do
38401  IFS=$as_save_IFS
38402  test -z "$as_dir" && as_dir=.
38403    for ac_exec_ext in '' $ac_executable_extensions; do
38404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38405    ac_cv_prog_ac_ct_AR="$ac_prog"
38406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38407    break 2
38408  fi
38409done
38410  done
38411IFS=$as_save_IFS
38412
38413fi
38414fi
38415ac_ct_AR=$ac_cv_prog_ac_ct_AR
38416if test -n "$ac_ct_AR"; then
38417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38418$as_echo "$ac_ct_AR" >&6; }
38419else
38420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38421$as_echo "no" >&6; }
38422fi
38423
38424
38425  test -n "$ac_ct_AR" && break
38426done
38427
38428  if test "x$ac_ct_AR" = x; then
38429    AR=""
38430  else
38431    case $cross_compiling:$ac_tool_warned in
38432yes:)
38433{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38434$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38435ac_tool_warned=yes ;;
38436esac
38437    AR=$ac_ct_AR
38438  fi
38439fi
38440
38441    else
38442      # If it succeeded, then it was overridden by the user. We will use it
38443      # for the tool.
38444
38445      # First remove it from the list of overridden variables, so we can test
38446      # for unknown variables in the end.
38447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38448
38449      # Check if we try to supply an empty value
38450      if test "x$AR" = x; then
38451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38452$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38454$as_echo_n "checking for AR... " >&6; }
38455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38456$as_echo "disabled" >&6; }
38457      else
38458        # Check if the provided tool contains a complete path.
38459        tool_specified="$AR"
38460        tool_basename="${tool_specified##*/}"
38461        if test "x$tool_basename" = "x$tool_specified"; then
38462          # A command without a complete path is provided, search $PATH.
38463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38464$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38465          # Extract the first word of "$tool_basename", so it can be a program name with args.
38466set dummy $tool_basename; ac_word=$2
38467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38468$as_echo_n "checking for $ac_word... " >&6; }
38469if ${ac_cv_path_AR+:} false; then :
38470  $as_echo_n "(cached) " >&6
38471else
38472  case $AR in
38473  [\\/]* | ?:[\\/]*)
38474  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38475  ;;
38476  *)
38477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38478for as_dir in $PATH
38479do
38480  IFS=$as_save_IFS
38481  test -z "$as_dir" && as_dir=.
38482    for ac_exec_ext in '' $ac_executable_extensions; do
38483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38484    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38486    break 2
38487  fi
38488done
38489  done
38490IFS=$as_save_IFS
38491
38492  ;;
38493esac
38494fi
38495AR=$ac_cv_path_AR
38496if test -n "$AR"; then
38497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38498$as_echo "$AR" >&6; }
38499else
38500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38501$as_echo "no" >&6; }
38502fi
38503
38504
38505          if test "x$AR" = x; then
38506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38507          fi
38508        else
38509          # Otherwise we believe it is a complete path. Use it as it is.
38510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38511$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38513$as_echo_n "checking for AR... " >&6; }
38514          if test ! -x "$tool_specified"; then
38515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38516$as_echo "not found" >&6; }
38517            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38518          fi
38519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38520$as_echo "$tool_specified" >&6; }
38521        fi
38522      fi
38523    fi
38524
38525  fi
38526
38527
38528  fi
38529
38530  # Only process if variable expands to non-empty
38531
38532  if test "x$AR" != x; then
38533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38534
38535  # First separate the path from the arguments. This will split at the first
38536  # space.
38537  complete="$AR"
38538  path="${complete%% *}"
38539  tmp="$complete EOL"
38540  arguments="${tmp#* }"
38541
38542  # Input might be given as Windows format, start by converting to
38543  # unix format.
38544  new_path=`$CYGPATH -u "$path"`
38545
38546  # Now try to locate executable using which
38547  new_path=`$WHICH "$new_path" 2> /dev/null`
38548  # bat and cmd files are not always considered executable in cygwin causing which
38549  # to not find them
38550  if test "x$new_path" = x \
38551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38553    new_path=`$CYGPATH -u "$path"`
38554  fi
38555  if test "x$new_path" = x; then
38556    # Oops. Which didn't find the executable.
38557    # The splitting of arguments from the executable at a space might have been incorrect,
38558    # since paths with space are more likely in Windows. Give it another try with the whole
38559    # argument.
38560    path="$complete"
38561    arguments="EOL"
38562    new_path=`$CYGPATH -u "$path"`
38563    new_path=`$WHICH "$new_path" 2> /dev/null`
38564    # bat and cmd files are not always considered executable in cygwin causing which
38565    # to not find them
38566    if test "x$new_path" = x \
38567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38569      new_path=`$CYGPATH -u "$path"`
38570    fi
38571    if test "x$new_path" = x; then
38572      # It's still not found. Now this is an unrecoverable error.
38573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38574$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38575      has_space=`$ECHO "$complete" | $GREP " "`
38576      if test "x$has_space" != x; then
38577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38579      fi
38580      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38581    fi
38582  fi
38583
38584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38587  # "foo.exe" is OK but "foo" is an error.
38588  #
38589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38590  # It is also a way to make sure we got the proper file name for the real test later on.
38591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38592  if test "x$test_shortpath" = x; then
38593    # Short path failed, file does not exist as specified.
38594    # Try adding .exe or .cmd
38595    if test -f "${new_path}.exe"; then
38596      input_to_shortpath="${new_path}.exe"
38597    elif test -f "${new_path}.cmd"; then
38598      input_to_shortpath="${new_path}.cmd"
38599    else
38600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38601$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38604      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38605    fi
38606  else
38607    input_to_shortpath="$new_path"
38608  fi
38609
38610  # Call helper function which possibly converts this using DOS-style short mode.
38611  # If so, the updated path is stored in $new_path.
38612  new_path="$input_to_shortpath"
38613
38614  input_path="$input_to_shortpath"
38615  # Check if we need to convert this using DOS-style short mode. If the path
38616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38617  # take no chances and rewrite it.
38618  # Note: m4 eats our [], so we need to use [ and ] instead.
38619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38620  if test "x$has_forbidden_chars" != x; then
38621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38625      # Going to short mode and back again did indeed matter. Since short mode is
38626      # case insensitive, let's make it lowercase to improve readability.
38627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38628      # Now convert it back to Unix-style (cygpath)
38629      input_path=`$CYGPATH -u "$shortmode_path"`
38630      new_path="$input_path"
38631    fi
38632  fi
38633
38634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38635  if test "x$test_cygdrive_prefix" = x; then
38636    # As a simple fix, exclude /usr/bin since it's not a real path.
38637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38639      # a path prefixed by /cygdrive for fixpath to work.
38640      new_path="$CYGWIN_ROOT_PATH$input_path"
38641    fi
38642  fi
38643
38644  # remove trailing .exe if any
38645  new_path="${new_path/%.exe/}"
38646
38647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648
38649  # First separate the path from the arguments. This will split at the first
38650  # space.
38651  complete="$AR"
38652  path="${complete%% *}"
38653  tmp="$complete EOL"
38654  arguments="${tmp#* }"
38655
38656  # Input might be given as Windows format, start by converting to
38657  # unix format.
38658  new_path="$path"
38659
38660  windows_path="$new_path"
38661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38662    unix_path=`$CYGPATH -u "$windows_path"`
38663    new_path="$unix_path"
38664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38666    new_path="$unix_path"
38667  fi
38668
38669
38670  # Now try to locate executable using which
38671  new_path=`$WHICH "$new_path" 2> /dev/null`
38672
38673  if test "x$new_path" = x; then
38674    # Oops. Which didn't find the executable.
38675    # The splitting of arguments from the executable at a space might have been incorrect,
38676    # since paths with space are more likely in Windows. Give it another try with the whole
38677    # argument.
38678    path="$complete"
38679    arguments="EOL"
38680    new_path="$path"
38681
38682  windows_path="$new_path"
38683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38684    unix_path=`$CYGPATH -u "$windows_path"`
38685    new_path="$unix_path"
38686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38688    new_path="$unix_path"
38689  fi
38690
38691
38692    new_path=`$WHICH "$new_path" 2> /dev/null`
38693    # bat and cmd files are not always considered executable in MSYS causing which
38694    # to not find them
38695    if test "x$new_path" = x \
38696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38698      new_path="$path"
38699
38700  windows_path="$new_path"
38701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38702    unix_path=`$CYGPATH -u "$windows_path"`
38703    new_path="$unix_path"
38704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38706    new_path="$unix_path"
38707  fi
38708
38709    fi
38710
38711    if test "x$new_path" = x; then
38712      # It's still not found. Now this is an unrecoverable error.
38713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38714$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38715      has_space=`$ECHO "$complete" | $GREP " "`
38716      if test "x$has_space" != x; then
38717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38719      fi
38720      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38721    fi
38722  fi
38723
38724  # Now new_path has a complete unix path to the binary
38725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38726    # Keep paths in /bin as-is, but remove trailing .exe if any
38727    new_path="${new_path/%.exe/}"
38728    # Do not save /bin paths to all_fixpath_prefixes!
38729  else
38730    # Not in mixed or Windows style, start by that.
38731    new_path=`cmd //c echo $new_path`
38732
38733  input_path="$new_path"
38734  # Check if we need to convert this using DOS-style short mode. If the path
38735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38736  # take no chances and rewrite it.
38737  # Note: m4 eats our [], so we need to use [ and ] instead.
38738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38739  if test "x$has_forbidden_chars" != x; then
38740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38742  fi
38743
38744    # Output is in $new_path
38745
38746  windows_path="$new_path"
38747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38748    unix_path=`$CYGPATH -u "$windows_path"`
38749    new_path="$unix_path"
38750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38752    new_path="$unix_path"
38753  fi
38754
38755    # remove trailing .exe if any
38756    new_path="${new_path/%.exe/}"
38757
38758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38760  fi
38761
38762    else
38763      # We're on a unix platform. Hooray! :)
38764      # First separate the path from the arguments. This will split at the first
38765      # space.
38766      complete="$AR"
38767      path="${complete%% *}"
38768      tmp="$complete EOL"
38769      arguments="${tmp#* }"
38770
38771      # Cannot rely on the command "which" here since it doesn't always work.
38772      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38773      if test -z "$is_absolute_path"; then
38774        # Path to executable is not absolute. Find it.
38775        IFS_save="$IFS"
38776        IFS=:
38777        for p in $PATH; do
38778          if test -f "$p/$path" && test -x "$p/$path"; then
38779            new_path="$p/$path"
38780            break
38781          fi
38782        done
38783        IFS="$IFS_save"
38784      else
38785        # This is an absolute path, we can use it without further modifications.
38786        new_path="$path"
38787      fi
38788
38789      if test "x$new_path" = x; then
38790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38791$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38792        has_space=`$ECHO "$complete" | $GREP " "`
38793        if test "x$has_space" != x; then
38794          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38796        fi
38797        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38798      fi
38799    fi
38800
38801    # Now join together the path and the arguments once again
38802    if test "x$arguments" != xEOL; then
38803      new_complete="$new_path ${arguments% *}"
38804    else
38805      new_complete="$new_path"
38806    fi
38807
38808    if test "x$complete" != "x$new_complete"; then
38809      AR="$new_complete"
38810      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38811$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38812    fi
38813  fi
38814
38815
38816
38817  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38818
38819
38820  # Publish this variable in the help.
38821
38822
38823  if [ -z "${LIPO+x}" ]; then
38824    # The variable is not set by user, try to locate tool using the code snippet
38825    for ac_prog in lipo
38826do
38827  # Extract the first word of "$ac_prog", so it can be a program name with args.
38828set dummy $ac_prog; ac_word=$2
38829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38830$as_echo_n "checking for $ac_word... " >&6; }
38831if ${ac_cv_path_LIPO+:} false; then :
38832  $as_echo_n "(cached) " >&6
38833else
38834  case $LIPO in
38835  [\\/]* | ?:[\\/]*)
38836  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38837  ;;
38838  *)
38839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38840for as_dir in $PATH
38841do
38842  IFS=$as_save_IFS
38843  test -z "$as_dir" && as_dir=.
38844    for ac_exec_ext in '' $ac_executable_extensions; do
38845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38846    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38848    break 2
38849  fi
38850done
38851  done
38852IFS=$as_save_IFS
38853
38854  ;;
38855esac
38856fi
38857LIPO=$ac_cv_path_LIPO
38858if test -n "$LIPO"; then
38859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38860$as_echo "$LIPO" >&6; }
38861else
38862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38863$as_echo "no" >&6; }
38864fi
38865
38866
38867  test -n "$LIPO" && break
38868done
38869
38870  else
38871    # The variable is set, but is it from the command line or the environment?
38872
38873    # Try to remove the string !LIPO! from our list.
38874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38876      # If it failed, the variable was not from the command line. Ignore it,
38877      # but warn the user (except for BASH, which is always set by the calling BASH).
38878      if test "xLIPO" != xBASH; then
38879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38880$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38881      fi
38882      # Try to locate tool using the code snippet
38883      for ac_prog in lipo
38884do
38885  # Extract the first word of "$ac_prog", so it can be a program name with args.
38886set dummy $ac_prog; ac_word=$2
38887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38888$as_echo_n "checking for $ac_word... " >&6; }
38889if ${ac_cv_path_LIPO+:} false; then :
38890  $as_echo_n "(cached) " >&6
38891else
38892  case $LIPO in
38893  [\\/]* | ?:[\\/]*)
38894  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38895  ;;
38896  *)
38897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38898for as_dir in $PATH
38899do
38900  IFS=$as_save_IFS
38901  test -z "$as_dir" && as_dir=.
38902    for ac_exec_ext in '' $ac_executable_extensions; do
38903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38904    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38906    break 2
38907  fi
38908done
38909  done
38910IFS=$as_save_IFS
38911
38912  ;;
38913esac
38914fi
38915LIPO=$ac_cv_path_LIPO
38916if test -n "$LIPO"; then
38917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38918$as_echo "$LIPO" >&6; }
38919else
38920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38921$as_echo "no" >&6; }
38922fi
38923
38924
38925  test -n "$LIPO" && break
38926done
38927
38928    else
38929      # If it succeeded, then it was overridden by the user. We will use it
38930      # for the tool.
38931
38932      # First remove it from the list of overridden variables, so we can test
38933      # for unknown variables in the end.
38934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38935
38936      # Check if we try to supply an empty value
38937      if test "x$LIPO" = x; then
38938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38939$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38941$as_echo_n "checking for LIPO... " >&6; }
38942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38943$as_echo "disabled" >&6; }
38944      else
38945        # Check if the provided tool contains a complete path.
38946        tool_specified="$LIPO"
38947        tool_basename="${tool_specified##*/}"
38948        if test "x$tool_basename" = "x$tool_specified"; then
38949          # A command without a complete path is provided, search $PATH.
38950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38951$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38952          # Extract the first word of "$tool_basename", so it can be a program name with args.
38953set dummy $tool_basename; ac_word=$2
38954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38955$as_echo_n "checking for $ac_word... " >&6; }
38956if ${ac_cv_path_LIPO+:} false; then :
38957  $as_echo_n "(cached) " >&6
38958else
38959  case $LIPO in
38960  [\\/]* | ?:[\\/]*)
38961  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38962  ;;
38963  *)
38964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38965for as_dir in $PATH
38966do
38967  IFS=$as_save_IFS
38968  test -z "$as_dir" && as_dir=.
38969    for ac_exec_ext in '' $ac_executable_extensions; do
38970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38971    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38973    break 2
38974  fi
38975done
38976  done
38977IFS=$as_save_IFS
38978
38979  ;;
38980esac
38981fi
38982LIPO=$ac_cv_path_LIPO
38983if test -n "$LIPO"; then
38984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38985$as_echo "$LIPO" >&6; }
38986else
38987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38988$as_echo "no" >&6; }
38989fi
38990
38991
38992          if test "x$LIPO" = x; then
38993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38994          fi
38995        else
38996          # Otherwise we believe it is a complete path. Use it as it is.
38997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38998$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39000$as_echo_n "checking for LIPO... " >&6; }
39001          if test ! -x "$tool_specified"; then
39002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39003$as_echo "not found" >&6; }
39004            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39005          fi
39006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39007$as_echo "$tool_specified" >&6; }
39008        fi
39009      fi
39010    fi
39011
39012  fi
39013
39014
39015
39016  # Only process if variable expands to non-empty
39017
39018  if test "x$LIPO" != x; then
39019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39020
39021  # First separate the path from the arguments. This will split at the first
39022  # space.
39023  complete="$LIPO"
39024  path="${complete%% *}"
39025  tmp="$complete EOL"
39026  arguments="${tmp#* }"
39027
39028  # Input might be given as Windows format, start by converting to
39029  # unix format.
39030  new_path=`$CYGPATH -u "$path"`
39031
39032  # Now try to locate executable using which
39033  new_path=`$WHICH "$new_path" 2> /dev/null`
39034  # bat and cmd files are not always considered executable in cygwin causing which
39035  # to not find them
39036  if test "x$new_path" = x \
39037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39039    new_path=`$CYGPATH -u "$path"`
39040  fi
39041  if test "x$new_path" = x; then
39042    # Oops. Which didn't find the executable.
39043    # The splitting of arguments from the executable at a space might have been incorrect,
39044    # since paths with space are more likely in Windows. Give it another try with the whole
39045    # argument.
39046    path="$complete"
39047    arguments="EOL"
39048    new_path=`$CYGPATH -u "$path"`
39049    new_path=`$WHICH "$new_path" 2> /dev/null`
39050    # bat and cmd files are not always considered executable in cygwin causing which
39051    # to not find them
39052    if test "x$new_path" = x \
39053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39055      new_path=`$CYGPATH -u "$path"`
39056    fi
39057    if test "x$new_path" = x; then
39058      # It's still not found. Now this is an unrecoverable error.
39059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39060$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39061      has_space=`$ECHO "$complete" | $GREP " "`
39062      if test "x$has_space" != x; then
39063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39065      fi
39066      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39067    fi
39068  fi
39069
39070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39073  # "foo.exe" is OK but "foo" is an error.
39074  #
39075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39076  # It is also a way to make sure we got the proper file name for the real test later on.
39077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39078  if test "x$test_shortpath" = x; then
39079    # Short path failed, file does not exist as specified.
39080    # Try adding .exe or .cmd
39081    if test -f "${new_path}.exe"; then
39082      input_to_shortpath="${new_path}.exe"
39083    elif test -f "${new_path}.cmd"; then
39084      input_to_shortpath="${new_path}.cmd"
39085    else
39086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39087$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39090      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39091    fi
39092  else
39093    input_to_shortpath="$new_path"
39094  fi
39095
39096  # Call helper function which possibly converts this using DOS-style short mode.
39097  # If so, the updated path is stored in $new_path.
39098  new_path="$input_to_shortpath"
39099
39100  input_path="$input_to_shortpath"
39101  # Check if we need to convert this using DOS-style short mode. If the path
39102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39103  # take no chances and rewrite it.
39104  # Note: m4 eats our [], so we need to use [ and ] instead.
39105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39106  if test "x$has_forbidden_chars" != x; then
39107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39111      # Going to short mode and back again did indeed matter. Since short mode is
39112      # case insensitive, let's make it lowercase to improve readability.
39113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39114      # Now convert it back to Unix-style (cygpath)
39115      input_path=`$CYGPATH -u "$shortmode_path"`
39116      new_path="$input_path"
39117    fi
39118  fi
39119
39120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39121  if test "x$test_cygdrive_prefix" = x; then
39122    # As a simple fix, exclude /usr/bin since it's not a real path.
39123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39125      # a path prefixed by /cygdrive for fixpath to work.
39126      new_path="$CYGWIN_ROOT_PATH$input_path"
39127    fi
39128  fi
39129
39130  # remove trailing .exe if any
39131  new_path="${new_path/%.exe/}"
39132
39133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39134
39135  # First separate the path from the arguments. This will split at the first
39136  # space.
39137  complete="$LIPO"
39138  path="${complete%% *}"
39139  tmp="$complete EOL"
39140  arguments="${tmp#* }"
39141
39142  # Input might be given as Windows format, start by converting to
39143  # unix format.
39144  new_path="$path"
39145
39146  windows_path="$new_path"
39147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148    unix_path=`$CYGPATH -u "$windows_path"`
39149    new_path="$unix_path"
39150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39152    new_path="$unix_path"
39153  fi
39154
39155
39156  # Now try to locate executable using which
39157  new_path=`$WHICH "$new_path" 2> /dev/null`
39158
39159  if test "x$new_path" = x; then
39160    # Oops. Which didn't find the executable.
39161    # The splitting of arguments from the executable at a space might have been incorrect,
39162    # since paths with space are more likely in Windows. Give it another try with the whole
39163    # argument.
39164    path="$complete"
39165    arguments="EOL"
39166    new_path="$path"
39167
39168  windows_path="$new_path"
39169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170    unix_path=`$CYGPATH -u "$windows_path"`
39171    new_path="$unix_path"
39172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174    new_path="$unix_path"
39175  fi
39176
39177
39178    new_path=`$WHICH "$new_path" 2> /dev/null`
39179    # bat and cmd files are not always considered executable in MSYS causing which
39180    # to not find them
39181    if test "x$new_path" = x \
39182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39184      new_path="$path"
39185
39186  windows_path="$new_path"
39187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39188    unix_path=`$CYGPATH -u "$windows_path"`
39189    new_path="$unix_path"
39190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39192    new_path="$unix_path"
39193  fi
39194
39195    fi
39196
39197    if test "x$new_path" = x; then
39198      # It's still not found. Now this is an unrecoverable error.
39199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39200$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39201      has_space=`$ECHO "$complete" | $GREP " "`
39202      if test "x$has_space" != x; then
39203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39205      fi
39206      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39207    fi
39208  fi
39209
39210  # Now new_path has a complete unix path to the binary
39211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39212    # Keep paths in /bin as-is, but remove trailing .exe if any
39213    new_path="${new_path/%.exe/}"
39214    # Do not save /bin paths to all_fixpath_prefixes!
39215  else
39216    # Not in mixed or Windows style, start by that.
39217    new_path=`cmd //c echo $new_path`
39218
39219  input_path="$new_path"
39220  # Check if we need to convert this using DOS-style short mode. If the path
39221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39222  # take no chances and rewrite it.
39223  # Note: m4 eats our [], so we need to use [ and ] instead.
39224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39225  if test "x$has_forbidden_chars" != x; then
39226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39228  fi
39229
39230    # Output is in $new_path
39231
39232  windows_path="$new_path"
39233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39234    unix_path=`$CYGPATH -u "$windows_path"`
39235    new_path="$unix_path"
39236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39238    new_path="$unix_path"
39239  fi
39240
39241    # remove trailing .exe if any
39242    new_path="${new_path/%.exe/}"
39243
39244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39246  fi
39247
39248    else
39249      # We're on a unix platform. Hooray! :)
39250      # First separate the path from the arguments. This will split at the first
39251      # space.
39252      complete="$LIPO"
39253      path="${complete%% *}"
39254      tmp="$complete EOL"
39255      arguments="${tmp#* }"
39256
39257      # Cannot rely on the command "which" here since it doesn't always work.
39258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39259      if test -z "$is_absolute_path"; then
39260        # Path to executable is not absolute. Find it.
39261        IFS_save="$IFS"
39262        IFS=:
39263        for p in $PATH; do
39264          if test -f "$p/$path" && test -x "$p/$path"; then
39265            new_path="$p/$path"
39266            break
39267          fi
39268        done
39269        IFS="$IFS_save"
39270      else
39271        # This is an absolute path, we can use it without further modifications.
39272        new_path="$path"
39273      fi
39274
39275      if test "x$new_path" = x; then
39276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39277$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39278        has_space=`$ECHO "$complete" | $GREP " "`
39279        if test "x$has_space" != x; then
39280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39282        fi
39283        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39284      fi
39285    fi
39286
39287    # Now join together the path and the arguments once again
39288    if test "x$arguments" != xEOL; then
39289      new_complete="$new_path ${arguments% *}"
39290    else
39291      new_complete="$new_path"
39292    fi
39293
39294    if test "x$complete" != "x$new_complete"; then
39295      LIPO="$new_complete"
39296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39297$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39298    fi
39299  fi
39300
39301  fi
39302
39303  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39304    # Extract the first word of "mt", so it can be a program name with args.
39305set dummy mt; ac_word=$2
39306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39307$as_echo_n "checking for $ac_word... " >&6; }
39308if ${ac_cv_prog_MT+:} false; then :
39309  $as_echo_n "(cached) " >&6
39310else
39311  if test -n "$MT"; then
39312  ac_cv_prog_MT="$MT" # Let the user override the test.
39313else
39314  ac_prog_rejected=no
39315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39316for as_dir in $PATH
39317do
39318  IFS=$as_save_IFS
39319  test -z "$as_dir" && as_dir=.
39320    for ac_exec_ext in '' $ac_executable_extensions; do
39321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39322    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39323       ac_prog_rejected=yes
39324       continue
39325     fi
39326    ac_cv_prog_MT="mt"
39327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39328    break 2
39329  fi
39330done
39331  done
39332IFS=$as_save_IFS
39333
39334if test $ac_prog_rejected = yes; then
39335  # We found a bogon in the path, so make sure we never use it.
39336  set dummy $ac_cv_prog_MT
39337  shift
39338  if test $# != 0; then
39339    # We chose a different compiler from the bogus one.
39340    # However, it has the same basename, so the bogon will be chosen
39341    # first if we set MT to just the basename; use the full file name.
39342    shift
39343    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39344  fi
39345fi
39346fi
39347fi
39348MT=$ac_cv_prog_MT
39349if test -n "$MT"; then
39350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39351$as_echo "$MT" >&6; }
39352else
39353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39354$as_echo "no" >&6; }
39355fi
39356
39357
39358
39359  # Only process if variable expands to non-empty
39360
39361  if test "x$MT" != x; then
39362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39363
39364  # First separate the path from the arguments. This will split at the first
39365  # space.
39366  complete="$MT"
39367  path="${complete%% *}"
39368  tmp="$complete EOL"
39369  arguments="${tmp#* }"
39370
39371  # Input might be given as Windows format, start by converting to
39372  # unix format.
39373  new_path=`$CYGPATH -u "$path"`
39374
39375  # Now try to locate executable using which
39376  new_path=`$WHICH "$new_path" 2> /dev/null`
39377  # bat and cmd files are not always considered executable in cygwin causing which
39378  # to not find them
39379  if test "x$new_path" = x \
39380      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39381      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39382    new_path=`$CYGPATH -u "$path"`
39383  fi
39384  if test "x$new_path" = x; then
39385    # Oops. Which didn't find the executable.
39386    # The splitting of arguments from the executable at a space might have been incorrect,
39387    # since paths with space are more likely in Windows. Give it another try with the whole
39388    # argument.
39389    path="$complete"
39390    arguments="EOL"
39391    new_path=`$CYGPATH -u "$path"`
39392    new_path=`$WHICH "$new_path" 2> /dev/null`
39393    # bat and cmd files are not always considered executable in cygwin causing which
39394    # to not find them
39395    if test "x$new_path" = x \
39396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39398      new_path=`$CYGPATH -u "$path"`
39399    fi
39400    if test "x$new_path" = x; then
39401      # It's still not found. Now this is an unrecoverable error.
39402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39403$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39404      has_space=`$ECHO "$complete" | $GREP " "`
39405      if test "x$has_space" != x; then
39406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39408      fi
39409      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39410    fi
39411  fi
39412
39413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39416  # "foo.exe" is OK but "foo" is an error.
39417  #
39418  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39419  # It is also a way to make sure we got the proper file name for the real test later on.
39420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39421  if test "x$test_shortpath" = x; then
39422    # Short path failed, file does not exist as specified.
39423    # Try adding .exe or .cmd
39424    if test -f "${new_path}.exe"; then
39425      input_to_shortpath="${new_path}.exe"
39426    elif test -f "${new_path}.cmd"; then
39427      input_to_shortpath="${new_path}.cmd"
39428    else
39429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39430$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39433      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39434    fi
39435  else
39436    input_to_shortpath="$new_path"
39437  fi
39438
39439  # Call helper function which possibly converts this using DOS-style short mode.
39440  # If so, the updated path is stored in $new_path.
39441  new_path="$input_to_shortpath"
39442
39443  input_path="$input_to_shortpath"
39444  # Check if we need to convert this using DOS-style short mode. If the path
39445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39446  # take no chances and rewrite it.
39447  # Note: m4 eats our [], so we need to use [ and ] instead.
39448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39449  if test "x$has_forbidden_chars" != x; then
39450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39454      # Going to short mode and back again did indeed matter. Since short mode is
39455      # case insensitive, let's make it lowercase to improve readability.
39456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39457      # Now convert it back to Unix-style (cygpath)
39458      input_path=`$CYGPATH -u "$shortmode_path"`
39459      new_path="$input_path"
39460    fi
39461  fi
39462
39463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39464  if test "x$test_cygdrive_prefix" = x; then
39465    # As a simple fix, exclude /usr/bin since it's not a real path.
39466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39468      # a path prefixed by /cygdrive for fixpath to work.
39469      new_path="$CYGWIN_ROOT_PATH$input_path"
39470    fi
39471  fi
39472
39473  # remove trailing .exe if any
39474  new_path="${new_path/%.exe/}"
39475
39476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39477
39478  # First separate the path from the arguments. This will split at the first
39479  # space.
39480  complete="$MT"
39481  path="${complete%% *}"
39482  tmp="$complete EOL"
39483  arguments="${tmp#* }"
39484
39485  # Input might be given as Windows format, start by converting to
39486  # unix format.
39487  new_path="$path"
39488
39489  windows_path="$new_path"
39490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39491    unix_path=`$CYGPATH -u "$windows_path"`
39492    new_path="$unix_path"
39493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39495    new_path="$unix_path"
39496  fi
39497
39498
39499  # Now try to locate executable using which
39500  new_path=`$WHICH "$new_path" 2> /dev/null`
39501
39502  if test "x$new_path" = x; then
39503    # Oops. Which didn't find the executable.
39504    # The splitting of arguments from the executable at a space might have been incorrect,
39505    # since paths with space are more likely in Windows. Give it another try with the whole
39506    # argument.
39507    path="$complete"
39508    arguments="EOL"
39509    new_path="$path"
39510
39511  windows_path="$new_path"
39512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39513    unix_path=`$CYGPATH -u "$windows_path"`
39514    new_path="$unix_path"
39515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39517    new_path="$unix_path"
39518  fi
39519
39520
39521    new_path=`$WHICH "$new_path" 2> /dev/null`
39522    # bat and cmd files are not always considered executable in MSYS causing which
39523    # to not find them
39524    if test "x$new_path" = x \
39525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39527      new_path="$path"
39528
39529  windows_path="$new_path"
39530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39531    unix_path=`$CYGPATH -u "$windows_path"`
39532    new_path="$unix_path"
39533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39535    new_path="$unix_path"
39536  fi
39537
39538    fi
39539
39540    if test "x$new_path" = x; then
39541      # It's still not found. Now this is an unrecoverable error.
39542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39543$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39544      has_space=`$ECHO "$complete" | $GREP " "`
39545      if test "x$has_space" != x; then
39546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39548      fi
39549      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39550    fi
39551  fi
39552
39553  # Now new_path has a complete unix path to the binary
39554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39555    # Keep paths in /bin as-is, but remove trailing .exe if any
39556    new_path="${new_path/%.exe/}"
39557    # Do not save /bin paths to all_fixpath_prefixes!
39558  else
39559    # Not in mixed or Windows style, start by that.
39560    new_path=`cmd //c echo $new_path`
39561
39562  input_path="$new_path"
39563  # Check if we need to convert this using DOS-style short mode. If the path
39564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39565  # take no chances and rewrite it.
39566  # Note: m4 eats our [], so we need to use [ and ] instead.
39567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39568  if test "x$has_forbidden_chars" != x; then
39569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39571  fi
39572
39573    # Output is in $new_path
39574
39575  windows_path="$new_path"
39576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39577    unix_path=`$CYGPATH -u "$windows_path"`
39578    new_path="$unix_path"
39579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39581    new_path="$unix_path"
39582  fi
39583
39584    # remove trailing .exe if any
39585    new_path="${new_path/%.exe/}"
39586
39587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39589  fi
39590
39591    else
39592      # We're on a unix platform. Hooray! :)
39593      # First separate the path from the arguments. This will split at the first
39594      # space.
39595      complete="$MT"
39596      path="${complete%% *}"
39597      tmp="$complete EOL"
39598      arguments="${tmp#* }"
39599
39600      # Cannot rely on the command "which" here since it doesn't always work.
39601      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39602      if test -z "$is_absolute_path"; then
39603        # Path to executable is not absolute. Find it.
39604        IFS_save="$IFS"
39605        IFS=:
39606        for p in $PATH; do
39607          if test -f "$p/$path" && test -x "$p/$path"; then
39608            new_path="$p/$path"
39609            break
39610          fi
39611        done
39612        IFS="$IFS_save"
39613      else
39614        # This is an absolute path, we can use it without further modifications.
39615        new_path="$path"
39616      fi
39617
39618      if test "x$new_path" = x; then
39619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39620$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39621        has_space=`$ECHO "$complete" | $GREP " "`
39622        if test "x$has_space" != x; then
39623          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39624$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39625        fi
39626        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39627      fi
39628    fi
39629
39630    # Now join together the path and the arguments once again
39631    if test "x$arguments" != xEOL; then
39632      new_complete="$new_path ${arguments% *}"
39633    else
39634      new_complete="$new_path"
39635    fi
39636
39637    if test "x$complete" != "x$new_complete"; then
39638      MT="$new_complete"
39639      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39640$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39641    fi
39642  fi
39643
39644    # Setup the resource compiler (RC)
39645    # Extract the first word of "rc", so it can be a program name with args.
39646set dummy rc; ac_word=$2
39647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39648$as_echo_n "checking for $ac_word... " >&6; }
39649if ${ac_cv_prog_RC+:} false; then :
39650  $as_echo_n "(cached) " >&6
39651else
39652  if test -n "$RC"; then
39653  ac_cv_prog_RC="$RC" # Let the user override the test.
39654else
39655  ac_prog_rejected=no
39656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39657for as_dir in $PATH
39658do
39659  IFS=$as_save_IFS
39660  test -z "$as_dir" && as_dir=.
39661    for ac_exec_ext in '' $ac_executable_extensions; do
39662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39663    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39664       ac_prog_rejected=yes
39665       continue
39666     fi
39667    ac_cv_prog_RC="rc"
39668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39669    break 2
39670  fi
39671done
39672  done
39673IFS=$as_save_IFS
39674
39675if test $ac_prog_rejected = yes; then
39676  # We found a bogon in the path, so make sure we never use it.
39677  set dummy $ac_cv_prog_RC
39678  shift
39679  if test $# != 0; then
39680    # We chose a different compiler from the bogus one.
39681    # However, it has the same basename, so the bogon will be chosen
39682    # first if we set RC to just the basename; use the full file name.
39683    shift
39684    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39685  fi
39686fi
39687fi
39688fi
39689RC=$ac_cv_prog_RC
39690if test -n "$RC"; then
39691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39692$as_echo "$RC" >&6; }
39693else
39694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39695$as_echo "no" >&6; }
39696fi
39697
39698
39699
39700  # Only process if variable expands to non-empty
39701
39702  if test "x$RC" != x; then
39703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39704
39705  # First separate the path from the arguments. This will split at the first
39706  # space.
39707  complete="$RC"
39708  path="${complete%% *}"
39709  tmp="$complete EOL"
39710  arguments="${tmp#* }"
39711
39712  # Input might be given as Windows format, start by converting to
39713  # unix format.
39714  new_path=`$CYGPATH -u "$path"`
39715
39716  # Now try to locate executable using which
39717  new_path=`$WHICH "$new_path" 2> /dev/null`
39718  # bat and cmd files are not always considered executable in cygwin causing which
39719  # to not find them
39720  if test "x$new_path" = x \
39721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39723    new_path=`$CYGPATH -u "$path"`
39724  fi
39725  if test "x$new_path" = x; then
39726    # Oops. Which didn't find the executable.
39727    # The splitting of arguments from the executable at a space might have been incorrect,
39728    # since paths with space are more likely in Windows. Give it another try with the whole
39729    # argument.
39730    path="$complete"
39731    arguments="EOL"
39732    new_path=`$CYGPATH -u "$path"`
39733    new_path=`$WHICH "$new_path" 2> /dev/null`
39734    # bat and cmd files are not always considered executable in cygwin causing which
39735    # to not find them
39736    if test "x$new_path" = x \
39737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39739      new_path=`$CYGPATH -u "$path"`
39740    fi
39741    if test "x$new_path" = x; then
39742      # It's still not found. Now this is an unrecoverable error.
39743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39744$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39745      has_space=`$ECHO "$complete" | $GREP " "`
39746      if test "x$has_space" != x; then
39747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39749      fi
39750      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39751    fi
39752  fi
39753
39754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39757  # "foo.exe" is OK but "foo" is an error.
39758  #
39759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39760  # It is also a way to make sure we got the proper file name for the real test later on.
39761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39762  if test "x$test_shortpath" = x; then
39763    # Short path failed, file does not exist as specified.
39764    # Try adding .exe or .cmd
39765    if test -f "${new_path}.exe"; then
39766      input_to_shortpath="${new_path}.exe"
39767    elif test -f "${new_path}.cmd"; then
39768      input_to_shortpath="${new_path}.cmd"
39769    else
39770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39771$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39774      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39775    fi
39776  else
39777    input_to_shortpath="$new_path"
39778  fi
39779
39780  # Call helper function which possibly converts this using DOS-style short mode.
39781  # If so, the updated path is stored in $new_path.
39782  new_path="$input_to_shortpath"
39783
39784  input_path="$input_to_shortpath"
39785  # Check if we need to convert this using DOS-style short mode. If the path
39786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39787  # take no chances and rewrite it.
39788  # Note: m4 eats our [], so we need to use [ and ] instead.
39789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39790  if test "x$has_forbidden_chars" != x; then
39791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39795      # Going to short mode and back again did indeed matter. Since short mode is
39796      # case insensitive, let's make it lowercase to improve readability.
39797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39798      # Now convert it back to Unix-style (cygpath)
39799      input_path=`$CYGPATH -u "$shortmode_path"`
39800      new_path="$input_path"
39801    fi
39802  fi
39803
39804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39805  if test "x$test_cygdrive_prefix" = x; then
39806    # As a simple fix, exclude /usr/bin since it's not a real path.
39807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39809      # a path prefixed by /cygdrive for fixpath to work.
39810      new_path="$CYGWIN_ROOT_PATH$input_path"
39811    fi
39812  fi
39813
39814  # remove trailing .exe if any
39815  new_path="${new_path/%.exe/}"
39816
39817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39818
39819  # First separate the path from the arguments. This will split at the first
39820  # space.
39821  complete="$RC"
39822  path="${complete%% *}"
39823  tmp="$complete EOL"
39824  arguments="${tmp#* }"
39825
39826  # Input might be given as Windows format, start by converting to
39827  # unix format.
39828  new_path="$path"
39829
39830  windows_path="$new_path"
39831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39832    unix_path=`$CYGPATH -u "$windows_path"`
39833    new_path="$unix_path"
39834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39836    new_path="$unix_path"
39837  fi
39838
39839
39840  # Now try to locate executable using which
39841  new_path=`$WHICH "$new_path" 2> /dev/null`
39842
39843  if test "x$new_path" = x; then
39844    # Oops. Which didn't find the executable.
39845    # The splitting of arguments from the executable at a space might have been incorrect,
39846    # since paths with space are more likely in Windows. Give it another try with the whole
39847    # argument.
39848    path="$complete"
39849    arguments="EOL"
39850    new_path="$path"
39851
39852  windows_path="$new_path"
39853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39854    unix_path=`$CYGPATH -u "$windows_path"`
39855    new_path="$unix_path"
39856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39858    new_path="$unix_path"
39859  fi
39860
39861
39862    new_path=`$WHICH "$new_path" 2> /dev/null`
39863    # bat and cmd files are not always considered executable in MSYS causing which
39864    # to not find them
39865    if test "x$new_path" = x \
39866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39868      new_path="$path"
39869
39870  windows_path="$new_path"
39871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39872    unix_path=`$CYGPATH -u "$windows_path"`
39873    new_path="$unix_path"
39874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39876    new_path="$unix_path"
39877  fi
39878
39879    fi
39880
39881    if test "x$new_path" = x; then
39882      # It's still not found. Now this is an unrecoverable error.
39883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39884$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39885      has_space=`$ECHO "$complete" | $GREP " "`
39886      if test "x$has_space" != x; then
39887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39889      fi
39890      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39891    fi
39892  fi
39893
39894  # Now new_path has a complete unix path to the binary
39895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39896    # Keep paths in /bin as-is, but remove trailing .exe if any
39897    new_path="${new_path/%.exe/}"
39898    # Do not save /bin paths to all_fixpath_prefixes!
39899  else
39900    # Not in mixed or Windows style, start by that.
39901    new_path=`cmd //c echo $new_path`
39902
39903  input_path="$new_path"
39904  # Check if we need to convert this using DOS-style short mode. If the path
39905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39906  # take no chances and rewrite it.
39907  # Note: m4 eats our [], so we need to use [ and ] instead.
39908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39909  if test "x$has_forbidden_chars" != x; then
39910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39912  fi
39913
39914    # Output is in $new_path
39915
39916  windows_path="$new_path"
39917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39918    unix_path=`$CYGPATH -u "$windows_path"`
39919    new_path="$unix_path"
39920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39922    new_path="$unix_path"
39923  fi
39924
39925    # remove trailing .exe if any
39926    new_path="${new_path/%.exe/}"
39927
39928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39930  fi
39931
39932    else
39933      # We're on a unix platform. Hooray! :)
39934      # First separate the path from the arguments. This will split at the first
39935      # space.
39936      complete="$RC"
39937      path="${complete%% *}"
39938      tmp="$complete EOL"
39939      arguments="${tmp#* }"
39940
39941      # Cannot rely on the command "which" here since it doesn't always work.
39942      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39943      if test -z "$is_absolute_path"; then
39944        # Path to executable is not absolute. Find it.
39945        IFS_save="$IFS"
39946        IFS=:
39947        for p in $PATH; do
39948          if test -f "$p/$path" && test -x "$p/$path"; then
39949            new_path="$p/$path"
39950            break
39951          fi
39952        done
39953        IFS="$IFS_save"
39954      else
39955        # This is an absolute path, we can use it without further modifications.
39956        new_path="$path"
39957      fi
39958
39959      if test "x$new_path" = x; then
39960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39961$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39962        has_space=`$ECHO "$complete" | $GREP " "`
39963        if test "x$has_space" != x; then
39964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39966        fi
39967        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39968      fi
39969    fi
39970
39971    # Now join together the path and the arguments once again
39972    if test "x$arguments" != xEOL; then
39973      new_complete="$new_path ${arguments% *}"
39974    else
39975      new_complete="$new_path"
39976    fi
39977
39978    if test "x$complete" != "x$new_complete"; then
39979      RC="$new_complete"
39980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39981$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39982    fi
39983  fi
39984
39985    # Extract the first word of "dumpbin", so it can be a program name with args.
39986set dummy dumpbin; ac_word=$2
39987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39988$as_echo_n "checking for $ac_word... " >&6; }
39989if ${ac_cv_prog_DUMPBIN+:} false; then :
39990  $as_echo_n "(cached) " >&6
39991else
39992  if test -n "$DUMPBIN"; then
39993  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39994else
39995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39996for as_dir in $PATH
39997do
39998  IFS=$as_save_IFS
39999  test -z "$as_dir" && as_dir=.
40000    for ac_exec_ext in '' $ac_executable_extensions; do
40001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40002    ac_cv_prog_DUMPBIN="dumpbin"
40003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40004    break 2
40005  fi
40006done
40007  done
40008IFS=$as_save_IFS
40009
40010fi
40011fi
40012DUMPBIN=$ac_cv_prog_DUMPBIN
40013if test -n "$DUMPBIN"; then
40014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40015$as_echo "$DUMPBIN" >&6; }
40016else
40017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40018$as_echo "no" >&6; }
40019fi
40020
40021
40022
40023  # Only process if variable expands to non-empty
40024
40025  if test "x$DUMPBIN" != x; then
40026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40027
40028  # First separate the path from the arguments. This will split at the first
40029  # space.
40030  complete="$DUMPBIN"
40031  path="${complete%% *}"
40032  tmp="$complete EOL"
40033  arguments="${tmp#* }"
40034
40035  # Input might be given as Windows format, start by converting to
40036  # unix format.
40037  new_path=`$CYGPATH -u "$path"`
40038
40039  # Now try to locate executable using which
40040  new_path=`$WHICH "$new_path" 2> /dev/null`
40041  # bat and cmd files are not always considered executable in cygwin causing which
40042  # to not find them
40043  if test "x$new_path" = x \
40044      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40045      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40046    new_path=`$CYGPATH -u "$path"`
40047  fi
40048  if test "x$new_path" = x; then
40049    # Oops. Which didn't find the executable.
40050    # The splitting of arguments from the executable at a space might have been incorrect,
40051    # since paths with space are more likely in Windows. Give it another try with the whole
40052    # argument.
40053    path="$complete"
40054    arguments="EOL"
40055    new_path=`$CYGPATH -u "$path"`
40056    new_path=`$WHICH "$new_path" 2> /dev/null`
40057    # bat and cmd files are not always considered executable in cygwin causing which
40058    # to not find them
40059    if test "x$new_path" = x \
40060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40062      new_path=`$CYGPATH -u "$path"`
40063    fi
40064    if test "x$new_path" = x; then
40065      # It's still not found. Now this is an unrecoverable error.
40066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40067$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40068      has_space=`$ECHO "$complete" | $GREP " "`
40069      if test "x$has_space" != x; then
40070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40072      fi
40073      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40074    fi
40075  fi
40076
40077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40080  # "foo.exe" is OK but "foo" is an error.
40081  #
40082  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40083  # It is also a way to make sure we got the proper file name for the real test later on.
40084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40085  if test "x$test_shortpath" = x; then
40086    # Short path failed, file does not exist as specified.
40087    # Try adding .exe or .cmd
40088    if test -f "${new_path}.exe"; then
40089      input_to_shortpath="${new_path}.exe"
40090    elif test -f "${new_path}.cmd"; then
40091      input_to_shortpath="${new_path}.cmd"
40092    else
40093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40094$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40097      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40098    fi
40099  else
40100    input_to_shortpath="$new_path"
40101  fi
40102
40103  # Call helper function which possibly converts this using DOS-style short mode.
40104  # If so, the updated path is stored in $new_path.
40105  new_path="$input_to_shortpath"
40106
40107  input_path="$input_to_shortpath"
40108  # Check if we need to convert this using DOS-style short mode. If the path
40109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40110  # take no chances and rewrite it.
40111  # Note: m4 eats our [], so we need to use [ and ] instead.
40112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40113  if test "x$has_forbidden_chars" != x; then
40114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40118      # Going to short mode and back again did indeed matter. Since short mode is
40119      # case insensitive, let's make it lowercase to improve readability.
40120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40121      # Now convert it back to Unix-style (cygpath)
40122      input_path=`$CYGPATH -u "$shortmode_path"`
40123      new_path="$input_path"
40124    fi
40125  fi
40126
40127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40128  if test "x$test_cygdrive_prefix" = x; then
40129    # As a simple fix, exclude /usr/bin since it's not a real path.
40130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40132      # a path prefixed by /cygdrive for fixpath to work.
40133      new_path="$CYGWIN_ROOT_PATH$input_path"
40134    fi
40135  fi
40136
40137  # remove trailing .exe if any
40138  new_path="${new_path/%.exe/}"
40139
40140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40141
40142  # First separate the path from the arguments. This will split at the first
40143  # space.
40144  complete="$DUMPBIN"
40145  path="${complete%% *}"
40146  tmp="$complete EOL"
40147  arguments="${tmp#* }"
40148
40149  # Input might be given as Windows format, start by converting to
40150  # unix format.
40151  new_path="$path"
40152
40153  windows_path="$new_path"
40154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40155    unix_path=`$CYGPATH -u "$windows_path"`
40156    new_path="$unix_path"
40157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40159    new_path="$unix_path"
40160  fi
40161
40162
40163  # Now try to locate executable using which
40164  new_path=`$WHICH "$new_path" 2> /dev/null`
40165
40166  if test "x$new_path" = x; then
40167    # Oops. Which didn't find the executable.
40168    # The splitting of arguments from the executable at a space might have been incorrect,
40169    # since paths with space are more likely in Windows. Give it another try with the whole
40170    # argument.
40171    path="$complete"
40172    arguments="EOL"
40173    new_path="$path"
40174
40175  windows_path="$new_path"
40176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40177    unix_path=`$CYGPATH -u "$windows_path"`
40178    new_path="$unix_path"
40179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40181    new_path="$unix_path"
40182  fi
40183
40184
40185    new_path=`$WHICH "$new_path" 2> /dev/null`
40186    # bat and cmd files are not always considered executable in MSYS causing which
40187    # to not find them
40188    if test "x$new_path" = x \
40189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40191      new_path="$path"
40192
40193  windows_path="$new_path"
40194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40195    unix_path=`$CYGPATH -u "$windows_path"`
40196    new_path="$unix_path"
40197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40199    new_path="$unix_path"
40200  fi
40201
40202    fi
40203
40204    if test "x$new_path" = x; then
40205      # It's still not found. Now this is an unrecoverable error.
40206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40207$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40208      has_space=`$ECHO "$complete" | $GREP " "`
40209      if test "x$has_space" != x; then
40210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40212      fi
40213      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40214    fi
40215  fi
40216
40217  # Now new_path has a complete unix path to the binary
40218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40219    # Keep paths in /bin as-is, but remove trailing .exe if any
40220    new_path="${new_path/%.exe/}"
40221    # Do not save /bin paths to all_fixpath_prefixes!
40222  else
40223    # Not in mixed or Windows style, start by that.
40224    new_path=`cmd //c echo $new_path`
40225
40226  input_path="$new_path"
40227  # Check if we need to convert this using DOS-style short mode. If the path
40228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40229  # take no chances and rewrite it.
40230  # Note: m4 eats our [], so we need to use [ and ] instead.
40231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40232  if test "x$has_forbidden_chars" != x; then
40233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40235  fi
40236
40237    # Output is in $new_path
40238
40239  windows_path="$new_path"
40240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40241    unix_path=`$CYGPATH -u "$windows_path"`
40242    new_path="$unix_path"
40243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40245    new_path="$unix_path"
40246  fi
40247
40248    # remove trailing .exe if any
40249    new_path="${new_path/%.exe/}"
40250
40251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40253  fi
40254
40255    else
40256      # We're on a unix platform. Hooray! :)
40257      # First separate the path from the arguments. This will split at the first
40258      # space.
40259      complete="$DUMPBIN"
40260      path="${complete%% *}"
40261      tmp="$complete EOL"
40262      arguments="${tmp#* }"
40263
40264      # Cannot rely on the command "which" here since it doesn't always work.
40265      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40266      if test -z "$is_absolute_path"; then
40267        # Path to executable is not absolute. Find it.
40268        IFS_save="$IFS"
40269        IFS=:
40270        for p in $PATH; do
40271          if test -f "$p/$path" && test -x "$p/$path"; then
40272            new_path="$p/$path"
40273            break
40274          fi
40275        done
40276        IFS="$IFS_save"
40277      else
40278        # This is an absolute path, we can use it without further modifications.
40279        new_path="$path"
40280      fi
40281
40282      if test "x$new_path" = x; then
40283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40284$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40285        has_space=`$ECHO "$complete" | $GREP " "`
40286        if test "x$has_space" != x; then
40287          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40289        fi
40290        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40291      fi
40292    fi
40293
40294    # Now join together the path and the arguments once again
40295    if test "x$arguments" != xEOL; then
40296      new_complete="$new_path ${arguments% *}"
40297    else
40298      new_complete="$new_path"
40299    fi
40300
40301    if test "x$complete" != "x$new_complete"; then
40302      DUMPBIN="$new_complete"
40303      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40304$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40305    fi
40306  fi
40307
40308    # We need to check for 'msbuild.exe' because at the place where we expect to
40309    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40310    # won't find the 'msbuild.exe' executable in that case (and the
40311    # 'ac_executable_extensions' is unusable due to performance reasons).
40312    # Notice that we intentionally don't fix up the path to MSBUILD because we
40313    # will call it in a DOS shell during freetype detection on Windows (see
40314    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40315    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40316set dummy msbuild.exe; ac_word=$2
40317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40318$as_echo_n "checking for $ac_word... " >&6; }
40319if ${ac_cv_prog_MSBUILD+:} false; then :
40320  $as_echo_n "(cached) " >&6
40321else
40322  if test -n "$MSBUILD"; then
40323  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40324else
40325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40326for as_dir in $PATH
40327do
40328  IFS=$as_save_IFS
40329  test -z "$as_dir" && as_dir=.
40330    for ac_exec_ext in '' $ac_executable_extensions; do
40331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40332    ac_cv_prog_MSBUILD="msbuild.exe"
40333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40334    break 2
40335  fi
40336done
40337  done
40338IFS=$as_save_IFS
40339
40340fi
40341fi
40342MSBUILD=$ac_cv_prog_MSBUILD
40343if test -n "$MSBUILD"; then
40344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40345$as_echo "$MSBUILD" >&6; }
40346else
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40348$as_echo "no" >&6; }
40349fi
40350
40351
40352  fi
40353
40354  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40355
40356
40357  # Publish this variable in the help.
40358
40359
40360  if [ -z "${STRIP+x}" ]; then
40361    # The variable is not set by user, try to locate tool using the code snippet
40362    for ac_prog in strip
40363do
40364  # Extract the first word of "$ac_prog", so it can be a program name with args.
40365set dummy $ac_prog; ac_word=$2
40366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40367$as_echo_n "checking for $ac_word... " >&6; }
40368if ${ac_cv_path_STRIP+:} false; then :
40369  $as_echo_n "(cached) " >&6
40370else
40371  case $STRIP in
40372  [\\/]* | ?:[\\/]*)
40373  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40374  ;;
40375  *)
40376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40377for as_dir in $PATH
40378do
40379  IFS=$as_save_IFS
40380  test -z "$as_dir" && as_dir=.
40381    for ac_exec_ext in '' $ac_executable_extensions; do
40382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40383    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40385    break 2
40386  fi
40387done
40388  done
40389IFS=$as_save_IFS
40390
40391  ;;
40392esac
40393fi
40394STRIP=$ac_cv_path_STRIP
40395if test -n "$STRIP"; then
40396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40397$as_echo "$STRIP" >&6; }
40398else
40399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40400$as_echo "no" >&6; }
40401fi
40402
40403
40404  test -n "$STRIP" && break
40405done
40406
40407  else
40408    # The variable is set, but is it from the command line or the environment?
40409
40410    # Try to remove the string !STRIP! from our list.
40411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40413      # If it failed, the variable was not from the command line. Ignore it,
40414      # but warn the user (except for BASH, which is always set by the calling BASH).
40415      if test "xSTRIP" != xBASH; then
40416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40417$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40418      fi
40419      # Try to locate tool using the code snippet
40420      for ac_prog in strip
40421do
40422  # Extract the first word of "$ac_prog", so it can be a program name with args.
40423set dummy $ac_prog; ac_word=$2
40424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40425$as_echo_n "checking for $ac_word... " >&6; }
40426if ${ac_cv_path_STRIP+:} false; then :
40427  $as_echo_n "(cached) " >&6
40428else
40429  case $STRIP in
40430  [\\/]* | ?:[\\/]*)
40431  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40432  ;;
40433  *)
40434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40435for as_dir in $PATH
40436do
40437  IFS=$as_save_IFS
40438  test -z "$as_dir" && as_dir=.
40439    for ac_exec_ext in '' $ac_executable_extensions; do
40440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40441    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40443    break 2
40444  fi
40445done
40446  done
40447IFS=$as_save_IFS
40448
40449  ;;
40450esac
40451fi
40452STRIP=$ac_cv_path_STRIP
40453if test -n "$STRIP"; then
40454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40455$as_echo "$STRIP" >&6; }
40456else
40457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40458$as_echo "no" >&6; }
40459fi
40460
40461
40462  test -n "$STRIP" && break
40463done
40464
40465    else
40466      # If it succeeded, then it was overridden by the user. We will use it
40467      # for the tool.
40468
40469      # First remove it from the list of overridden variables, so we can test
40470      # for unknown variables in the end.
40471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40472
40473      # Check if we try to supply an empty value
40474      if test "x$STRIP" = x; then
40475        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40476$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40478$as_echo_n "checking for STRIP... " >&6; }
40479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40480$as_echo "disabled" >&6; }
40481      else
40482        # Check if the provided tool contains a complete path.
40483        tool_specified="$STRIP"
40484        tool_basename="${tool_specified##*/}"
40485        if test "x$tool_basename" = "x$tool_specified"; then
40486          # A command without a complete path is provided, search $PATH.
40487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40488$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40489          # Extract the first word of "$tool_basename", so it can be a program name with args.
40490set dummy $tool_basename; ac_word=$2
40491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40492$as_echo_n "checking for $ac_word... " >&6; }
40493if ${ac_cv_path_STRIP+:} false; then :
40494  $as_echo_n "(cached) " >&6
40495else
40496  case $STRIP in
40497  [\\/]* | ?:[\\/]*)
40498  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40499  ;;
40500  *)
40501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40502for as_dir in $PATH
40503do
40504  IFS=$as_save_IFS
40505  test -z "$as_dir" && as_dir=.
40506    for ac_exec_ext in '' $ac_executable_extensions; do
40507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40508    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40510    break 2
40511  fi
40512done
40513  done
40514IFS=$as_save_IFS
40515
40516  ;;
40517esac
40518fi
40519STRIP=$ac_cv_path_STRIP
40520if test -n "$STRIP"; then
40521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40522$as_echo "$STRIP" >&6; }
40523else
40524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40525$as_echo "no" >&6; }
40526fi
40527
40528
40529          if test "x$STRIP" = x; then
40530            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40531          fi
40532        else
40533          # Otherwise we believe it is a complete path. Use it as it is.
40534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40535$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40536          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40537$as_echo_n "checking for STRIP... " >&6; }
40538          if test ! -x "$tool_specified"; then
40539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40540$as_echo "not found" >&6; }
40541            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40542          fi
40543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40544$as_echo "$tool_specified" >&6; }
40545        fi
40546      fi
40547    fi
40548
40549  fi
40550
40551
40552
40553  # Only process if variable expands to non-empty
40554
40555  if test "x$STRIP" != x; then
40556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40557
40558  # First separate the path from the arguments. This will split at the first
40559  # space.
40560  complete="$STRIP"
40561  path="${complete%% *}"
40562  tmp="$complete EOL"
40563  arguments="${tmp#* }"
40564
40565  # Input might be given as Windows format, start by converting to
40566  # unix format.
40567  new_path=`$CYGPATH -u "$path"`
40568
40569  # Now try to locate executable using which
40570  new_path=`$WHICH "$new_path" 2> /dev/null`
40571  # bat and cmd files are not always considered executable in cygwin causing which
40572  # to not find them
40573  if test "x$new_path" = x \
40574      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40575      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40576    new_path=`$CYGPATH -u "$path"`
40577  fi
40578  if test "x$new_path" = x; then
40579    # Oops. Which didn't find the executable.
40580    # The splitting of arguments from the executable at a space might have been incorrect,
40581    # since paths with space are more likely in Windows. Give it another try with the whole
40582    # argument.
40583    path="$complete"
40584    arguments="EOL"
40585    new_path=`$CYGPATH -u "$path"`
40586    new_path=`$WHICH "$new_path" 2> /dev/null`
40587    # bat and cmd files are not always considered executable in cygwin causing which
40588    # to not find them
40589    if test "x$new_path" = x \
40590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40592      new_path=`$CYGPATH -u "$path"`
40593    fi
40594    if test "x$new_path" = x; then
40595      # It's still not found. Now this is an unrecoverable error.
40596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40597$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40598      has_space=`$ECHO "$complete" | $GREP " "`
40599      if test "x$has_space" != x; then
40600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40602      fi
40603      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40604    fi
40605  fi
40606
40607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40610  # "foo.exe" is OK but "foo" is an error.
40611  #
40612  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40613  # It is also a way to make sure we got the proper file name for the real test later on.
40614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40615  if test "x$test_shortpath" = x; then
40616    # Short path failed, file does not exist as specified.
40617    # Try adding .exe or .cmd
40618    if test -f "${new_path}.exe"; then
40619      input_to_shortpath="${new_path}.exe"
40620    elif test -f "${new_path}.cmd"; then
40621      input_to_shortpath="${new_path}.cmd"
40622    else
40623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40624$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40625      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40626$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40627      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40628    fi
40629  else
40630    input_to_shortpath="$new_path"
40631  fi
40632
40633  # Call helper function which possibly converts this using DOS-style short mode.
40634  # If so, the updated path is stored in $new_path.
40635  new_path="$input_to_shortpath"
40636
40637  input_path="$input_to_shortpath"
40638  # Check if we need to convert this using DOS-style short mode. If the path
40639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40640  # take no chances and rewrite it.
40641  # Note: m4 eats our [], so we need to use [ and ] instead.
40642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40643  if test "x$has_forbidden_chars" != x; then
40644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40648      # Going to short mode and back again did indeed matter. Since short mode is
40649      # case insensitive, let's make it lowercase to improve readability.
40650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40651      # Now convert it back to Unix-style (cygpath)
40652      input_path=`$CYGPATH -u "$shortmode_path"`
40653      new_path="$input_path"
40654    fi
40655  fi
40656
40657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40658  if test "x$test_cygdrive_prefix" = x; then
40659    # As a simple fix, exclude /usr/bin since it's not a real path.
40660    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40662      # a path prefixed by /cygdrive for fixpath to work.
40663      new_path="$CYGWIN_ROOT_PATH$input_path"
40664    fi
40665  fi
40666
40667  # remove trailing .exe if any
40668  new_path="${new_path/%.exe/}"
40669
40670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40671
40672  # First separate the path from the arguments. This will split at the first
40673  # space.
40674  complete="$STRIP"
40675  path="${complete%% *}"
40676  tmp="$complete EOL"
40677  arguments="${tmp#* }"
40678
40679  # Input might be given as Windows format, start by converting to
40680  # unix format.
40681  new_path="$path"
40682
40683  windows_path="$new_path"
40684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40685    unix_path=`$CYGPATH -u "$windows_path"`
40686    new_path="$unix_path"
40687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40689    new_path="$unix_path"
40690  fi
40691
40692
40693  # Now try to locate executable using which
40694  new_path=`$WHICH "$new_path" 2> /dev/null`
40695
40696  if test "x$new_path" = x; then
40697    # Oops. Which didn't find the executable.
40698    # The splitting of arguments from the executable at a space might have been incorrect,
40699    # since paths with space are more likely in Windows. Give it another try with the whole
40700    # argument.
40701    path="$complete"
40702    arguments="EOL"
40703    new_path="$path"
40704
40705  windows_path="$new_path"
40706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40707    unix_path=`$CYGPATH -u "$windows_path"`
40708    new_path="$unix_path"
40709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40711    new_path="$unix_path"
40712  fi
40713
40714
40715    new_path=`$WHICH "$new_path" 2> /dev/null`
40716    # bat and cmd files are not always considered executable in MSYS causing which
40717    # to not find them
40718    if test "x$new_path" = x \
40719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40721      new_path="$path"
40722
40723  windows_path="$new_path"
40724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40725    unix_path=`$CYGPATH -u "$windows_path"`
40726    new_path="$unix_path"
40727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40729    new_path="$unix_path"
40730  fi
40731
40732    fi
40733
40734    if test "x$new_path" = x; then
40735      # It's still not found. Now this is an unrecoverable error.
40736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40737$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40738      has_space=`$ECHO "$complete" | $GREP " "`
40739      if test "x$has_space" != x; then
40740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40742      fi
40743      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40744    fi
40745  fi
40746
40747  # Now new_path has a complete unix path to the binary
40748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40749    # Keep paths in /bin as-is, but remove trailing .exe if any
40750    new_path="${new_path/%.exe/}"
40751    # Do not save /bin paths to all_fixpath_prefixes!
40752  else
40753    # Not in mixed or Windows style, start by that.
40754    new_path=`cmd //c echo $new_path`
40755
40756  input_path="$new_path"
40757  # Check if we need to convert this using DOS-style short mode. If the path
40758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40759  # take no chances and rewrite it.
40760  # Note: m4 eats our [], so we need to use [ and ] instead.
40761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40762  if test "x$has_forbidden_chars" != x; then
40763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40765  fi
40766
40767    # Output is in $new_path
40768
40769  windows_path="$new_path"
40770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40771    unix_path=`$CYGPATH -u "$windows_path"`
40772    new_path="$unix_path"
40773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40775    new_path="$unix_path"
40776  fi
40777
40778    # remove trailing .exe if any
40779    new_path="${new_path/%.exe/}"
40780
40781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40783  fi
40784
40785    else
40786      # We're on a unix platform. Hooray! :)
40787      # First separate the path from the arguments. This will split at the first
40788      # space.
40789      complete="$STRIP"
40790      path="${complete%% *}"
40791      tmp="$complete EOL"
40792      arguments="${tmp#* }"
40793
40794      # Cannot rely on the command "which" here since it doesn't always work.
40795      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40796      if test -z "$is_absolute_path"; then
40797        # Path to executable is not absolute. Find it.
40798        IFS_save="$IFS"
40799        IFS=:
40800        for p in $PATH; do
40801          if test -f "$p/$path" && test -x "$p/$path"; then
40802            new_path="$p/$path"
40803            break
40804          fi
40805        done
40806        IFS="$IFS_save"
40807      else
40808        # This is an absolute path, we can use it without further modifications.
40809        new_path="$path"
40810      fi
40811
40812      if test "x$new_path" = x; then
40813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40814$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40815        has_space=`$ECHO "$complete" | $GREP " "`
40816        if test "x$has_space" != x; then
40817          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40818$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40819        fi
40820        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40821      fi
40822    fi
40823
40824    # Now join together the path and the arguments once again
40825    if test "x$arguments" != xEOL; then
40826      new_complete="$new_path ${arguments% *}"
40827    else
40828      new_complete="$new_path"
40829    fi
40830
40831    if test "x$complete" != "x$new_complete"; then
40832      STRIP="$new_complete"
40833      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40834$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40835    fi
40836  fi
40837
40838
40839
40840  # Publish this variable in the help.
40841
40842
40843  if [ -z "${NM+x}" ]; then
40844    # The variable is not set by user, try to locate tool using the code snippet
40845    for ac_prog in nm
40846do
40847  # Extract the first word of "$ac_prog", so it can be a program name with args.
40848set dummy $ac_prog; ac_word=$2
40849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40850$as_echo_n "checking for $ac_word... " >&6; }
40851if ${ac_cv_path_NM+:} false; then :
40852  $as_echo_n "(cached) " >&6
40853else
40854  case $NM in
40855  [\\/]* | ?:[\\/]*)
40856  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40857  ;;
40858  *)
40859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40860for as_dir in $PATH
40861do
40862  IFS=$as_save_IFS
40863  test -z "$as_dir" && as_dir=.
40864    for ac_exec_ext in '' $ac_executable_extensions; do
40865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40866    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40868    break 2
40869  fi
40870done
40871  done
40872IFS=$as_save_IFS
40873
40874  ;;
40875esac
40876fi
40877NM=$ac_cv_path_NM
40878if test -n "$NM"; then
40879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40880$as_echo "$NM" >&6; }
40881else
40882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40883$as_echo "no" >&6; }
40884fi
40885
40886
40887  test -n "$NM" && break
40888done
40889
40890  else
40891    # The variable is set, but is it from the command line or the environment?
40892
40893    # Try to remove the string !NM! from our list.
40894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40896      # If it failed, the variable was not from the command line. Ignore it,
40897      # but warn the user (except for BASH, which is always set by the calling BASH).
40898      if test "xNM" != xBASH; then
40899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40900$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40901      fi
40902      # Try to locate tool using the code snippet
40903      for ac_prog in nm
40904do
40905  # Extract the first word of "$ac_prog", so it can be a program name with args.
40906set dummy $ac_prog; ac_word=$2
40907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40908$as_echo_n "checking for $ac_word... " >&6; }
40909if ${ac_cv_path_NM+:} false; then :
40910  $as_echo_n "(cached) " >&6
40911else
40912  case $NM in
40913  [\\/]* | ?:[\\/]*)
40914  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40915  ;;
40916  *)
40917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40918for as_dir in $PATH
40919do
40920  IFS=$as_save_IFS
40921  test -z "$as_dir" && as_dir=.
40922    for ac_exec_ext in '' $ac_executable_extensions; do
40923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40924    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40926    break 2
40927  fi
40928done
40929  done
40930IFS=$as_save_IFS
40931
40932  ;;
40933esac
40934fi
40935NM=$ac_cv_path_NM
40936if test -n "$NM"; then
40937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40938$as_echo "$NM" >&6; }
40939else
40940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40941$as_echo "no" >&6; }
40942fi
40943
40944
40945  test -n "$NM" && break
40946done
40947
40948    else
40949      # If it succeeded, then it was overridden by the user. We will use it
40950      # for the tool.
40951
40952      # First remove it from the list of overridden variables, so we can test
40953      # for unknown variables in the end.
40954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40955
40956      # Check if we try to supply an empty value
40957      if test "x$NM" = x; then
40958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40959$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40961$as_echo_n "checking for NM... " >&6; }
40962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40963$as_echo "disabled" >&6; }
40964      else
40965        # Check if the provided tool contains a complete path.
40966        tool_specified="$NM"
40967        tool_basename="${tool_specified##*/}"
40968        if test "x$tool_basename" = "x$tool_specified"; then
40969          # A command without a complete path is provided, search $PATH.
40970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40971$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40972          # Extract the first word of "$tool_basename", so it can be a program name with args.
40973set dummy $tool_basename; ac_word=$2
40974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40975$as_echo_n "checking for $ac_word... " >&6; }
40976if ${ac_cv_path_NM+:} false; then :
40977  $as_echo_n "(cached) " >&6
40978else
40979  case $NM in
40980  [\\/]* | ?:[\\/]*)
40981  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40982  ;;
40983  *)
40984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40985for as_dir in $PATH
40986do
40987  IFS=$as_save_IFS
40988  test -z "$as_dir" && as_dir=.
40989    for ac_exec_ext in '' $ac_executable_extensions; do
40990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40991    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40993    break 2
40994  fi
40995done
40996  done
40997IFS=$as_save_IFS
40998
40999  ;;
41000esac
41001fi
41002NM=$ac_cv_path_NM
41003if test -n "$NM"; then
41004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41005$as_echo "$NM" >&6; }
41006else
41007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41008$as_echo "no" >&6; }
41009fi
41010
41011
41012          if test "x$NM" = x; then
41013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41014          fi
41015        else
41016          # Otherwise we believe it is a complete path. Use it as it is.
41017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41018$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41020$as_echo_n "checking for NM... " >&6; }
41021          if test ! -x "$tool_specified"; then
41022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41023$as_echo "not found" >&6; }
41024            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41025          fi
41026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41027$as_echo "$tool_specified" >&6; }
41028        fi
41029      fi
41030    fi
41031
41032  fi
41033
41034
41035
41036  # Only process if variable expands to non-empty
41037
41038  if test "x$NM" != x; then
41039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41040
41041  # First separate the path from the arguments. This will split at the first
41042  # space.
41043  complete="$NM"
41044  path="${complete%% *}"
41045  tmp="$complete EOL"
41046  arguments="${tmp#* }"
41047
41048  # Input might be given as Windows format, start by converting to
41049  # unix format.
41050  new_path=`$CYGPATH -u "$path"`
41051
41052  # Now try to locate executable using which
41053  new_path=`$WHICH "$new_path" 2> /dev/null`
41054  # bat and cmd files are not always considered executable in cygwin causing which
41055  # to not find them
41056  if test "x$new_path" = x \
41057      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41058      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41059    new_path=`$CYGPATH -u "$path"`
41060  fi
41061  if test "x$new_path" = x; then
41062    # Oops. Which didn't find the executable.
41063    # The splitting of arguments from the executable at a space might have been incorrect,
41064    # since paths with space are more likely in Windows. Give it another try with the whole
41065    # argument.
41066    path="$complete"
41067    arguments="EOL"
41068    new_path=`$CYGPATH -u "$path"`
41069    new_path=`$WHICH "$new_path" 2> /dev/null`
41070    # bat and cmd files are not always considered executable in cygwin causing which
41071    # to not find them
41072    if test "x$new_path" = x \
41073        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41074        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41075      new_path=`$CYGPATH -u "$path"`
41076    fi
41077    if test "x$new_path" = x; then
41078      # It's still not found. Now this is an unrecoverable error.
41079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41080$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41081      has_space=`$ECHO "$complete" | $GREP " "`
41082      if test "x$has_space" != x; then
41083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41085      fi
41086      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41087    fi
41088  fi
41089
41090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41093  # "foo.exe" is OK but "foo" is an error.
41094  #
41095  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41096  # It is also a way to make sure we got the proper file name for the real test later on.
41097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41098  if test "x$test_shortpath" = x; then
41099    # Short path failed, file does not exist as specified.
41100    # Try adding .exe or .cmd
41101    if test -f "${new_path}.exe"; then
41102      input_to_shortpath="${new_path}.exe"
41103    elif test -f "${new_path}.cmd"; then
41104      input_to_shortpath="${new_path}.cmd"
41105    else
41106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41107$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41110      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41111    fi
41112  else
41113    input_to_shortpath="$new_path"
41114  fi
41115
41116  # Call helper function which possibly converts this using DOS-style short mode.
41117  # If so, the updated path is stored in $new_path.
41118  new_path="$input_to_shortpath"
41119
41120  input_path="$input_to_shortpath"
41121  # Check if we need to convert this using DOS-style short mode. If the path
41122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41123  # take no chances and rewrite it.
41124  # Note: m4 eats our [], so we need to use [ and ] instead.
41125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41126  if test "x$has_forbidden_chars" != x; then
41127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41131      # Going to short mode and back again did indeed matter. Since short mode is
41132      # case insensitive, let's make it lowercase to improve readability.
41133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41134      # Now convert it back to Unix-style (cygpath)
41135      input_path=`$CYGPATH -u "$shortmode_path"`
41136      new_path="$input_path"
41137    fi
41138  fi
41139
41140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41141  if test "x$test_cygdrive_prefix" = x; then
41142    # As a simple fix, exclude /usr/bin since it's not a real path.
41143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41145      # a path prefixed by /cygdrive for fixpath to work.
41146      new_path="$CYGWIN_ROOT_PATH$input_path"
41147    fi
41148  fi
41149
41150  # remove trailing .exe if any
41151  new_path="${new_path/%.exe/}"
41152
41153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41154
41155  # First separate the path from the arguments. This will split at the first
41156  # space.
41157  complete="$NM"
41158  path="${complete%% *}"
41159  tmp="$complete EOL"
41160  arguments="${tmp#* }"
41161
41162  # Input might be given as Windows format, start by converting to
41163  # unix format.
41164  new_path="$path"
41165
41166  windows_path="$new_path"
41167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41168    unix_path=`$CYGPATH -u "$windows_path"`
41169    new_path="$unix_path"
41170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41172    new_path="$unix_path"
41173  fi
41174
41175
41176  # Now try to locate executable using which
41177  new_path=`$WHICH "$new_path" 2> /dev/null`
41178
41179  if test "x$new_path" = x; then
41180    # Oops. Which didn't find the executable.
41181    # The splitting of arguments from the executable at a space might have been incorrect,
41182    # since paths with space are more likely in Windows. Give it another try with the whole
41183    # argument.
41184    path="$complete"
41185    arguments="EOL"
41186    new_path="$path"
41187
41188  windows_path="$new_path"
41189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41190    unix_path=`$CYGPATH -u "$windows_path"`
41191    new_path="$unix_path"
41192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41194    new_path="$unix_path"
41195  fi
41196
41197
41198    new_path=`$WHICH "$new_path" 2> /dev/null`
41199    # bat and cmd files are not always considered executable in MSYS causing which
41200    # to not find them
41201    if test "x$new_path" = x \
41202        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41203        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41204      new_path="$path"
41205
41206  windows_path="$new_path"
41207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41208    unix_path=`$CYGPATH -u "$windows_path"`
41209    new_path="$unix_path"
41210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41212    new_path="$unix_path"
41213  fi
41214
41215    fi
41216
41217    if test "x$new_path" = x; then
41218      # It's still not found. Now this is an unrecoverable error.
41219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41220$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41221      has_space=`$ECHO "$complete" | $GREP " "`
41222      if test "x$has_space" != x; then
41223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41225      fi
41226      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41227    fi
41228  fi
41229
41230  # Now new_path has a complete unix path to the binary
41231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41232    # Keep paths in /bin as-is, but remove trailing .exe if any
41233    new_path="${new_path/%.exe/}"
41234    # Do not save /bin paths to all_fixpath_prefixes!
41235  else
41236    # Not in mixed or Windows style, start by that.
41237    new_path=`cmd //c echo $new_path`
41238
41239  input_path="$new_path"
41240  # Check if we need to convert this using DOS-style short mode. If the path
41241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41242  # take no chances and rewrite it.
41243  # Note: m4 eats our [], so we need to use [ and ] instead.
41244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41245  if test "x$has_forbidden_chars" != x; then
41246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41248  fi
41249
41250    # Output is in $new_path
41251
41252  windows_path="$new_path"
41253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41254    unix_path=`$CYGPATH -u "$windows_path"`
41255    new_path="$unix_path"
41256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41258    new_path="$unix_path"
41259  fi
41260
41261    # remove trailing .exe if any
41262    new_path="${new_path/%.exe/}"
41263
41264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41266  fi
41267
41268    else
41269      # We're on a unix platform. Hooray! :)
41270      # First separate the path from the arguments. This will split at the first
41271      # space.
41272      complete="$NM"
41273      path="${complete%% *}"
41274      tmp="$complete EOL"
41275      arguments="${tmp#* }"
41276
41277      # Cannot rely on the command "which" here since it doesn't always work.
41278      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41279      if test -z "$is_absolute_path"; then
41280        # Path to executable is not absolute. Find it.
41281        IFS_save="$IFS"
41282        IFS=:
41283        for p in $PATH; do
41284          if test -f "$p/$path" && test -x "$p/$path"; then
41285            new_path="$p/$path"
41286            break
41287          fi
41288        done
41289        IFS="$IFS_save"
41290      else
41291        # This is an absolute path, we can use it without further modifications.
41292        new_path="$path"
41293      fi
41294
41295      if test "x$new_path" = x; then
41296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41297$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41298        has_space=`$ECHO "$complete" | $GREP " "`
41299        if test "x$has_space" != x; then
41300          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41301$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41302        fi
41303        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41304      fi
41305    fi
41306
41307    # Now join together the path and the arguments once again
41308    if test "x$arguments" != xEOL; then
41309      new_complete="$new_path ${arguments% *}"
41310    else
41311      new_complete="$new_path"
41312    fi
41313
41314    if test "x$complete" != "x$new_complete"; then
41315      NM="$new_complete"
41316      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41317$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41318    fi
41319  fi
41320
41321
41322
41323  # Publish this variable in the help.
41324
41325
41326  if [ -z "${GNM+x}" ]; then
41327    # The variable is not set by user, try to locate tool using the code snippet
41328    for ac_prog in gnm
41329do
41330  # Extract the first word of "$ac_prog", so it can be a program name with args.
41331set dummy $ac_prog; ac_word=$2
41332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41333$as_echo_n "checking for $ac_word... " >&6; }
41334if ${ac_cv_path_GNM+:} false; then :
41335  $as_echo_n "(cached) " >&6
41336else
41337  case $GNM in
41338  [\\/]* | ?:[\\/]*)
41339  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41340  ;;
41341  *)
41342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41343for as_dir in $PATH
41344do
41345  IFS=$as_save_IFS
41346  test -z "$as_dir" && as_dir=.
41347    for ac_exec_ext in '' $ac_executable_extensions; do
41348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41349    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41351    break 2
41352  fi
41353done
41354  done
41355IFS=$as_save_IFS
41356
41357  ;;
41358esac
41359fi
41360GNM=$ac_cv_path_GNM
41361if test -n "$GNM"; then
41362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41363$as_echo "$GNM" >&6; }
41364else
41365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41366$as_echo "no" >&6; }
41367fi
41368
41369
41370  test -n "$GNM" && break
41371done
41372
41373  else
41374    # The variable is set, but is it from the command line or the environment?
41375
41376    # Try to remove the string !GNM! from our list.
41377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41379      # If it failed, the variable was not from the command line. Ignore it,
41380      # but warn the user (except for BASH, which is always set by the calling BASH).
41381      if test "xGNM" != xBASH; then
41382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41383$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41384      fi
41385      # Try to locate tool using the code snippet
41386      for ac_prog in gnm
41387do
41388  # Extract the first word of "$ac_prog", so it can be a program name with args.
41389set dummy $ac_prog; ac_word=$2
41390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41391$as_echo_n "checking for $ac_word... " >&6; }
41392if ${ac_cv_path_GNM+:} false; then :
41393  $as_echo_n "(cached) " >&6
41394else
41395  case $GNM in
41396  [\\/]* | ?:[\\/]*)
41397  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41398  ;;
41399  *)
41400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41401for as_dir in $PATH
41402do
41403  IFS=$as_save_IFS
41404  test -z "$as_dir" && as_dir=.
41405    for ac_exec_ext in '' $ac_executable_extensions; do
41406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41407    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41409    break 2
41410  fi
41411done
41412  done
41413IFS=$as_save_IFS
41414
41415  ;;
41416esac
41417fi
41418GNM=$ac_cv_path_GNM
41419if test -n "$GNM"; then
41420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41421$as_echo "$GNM" >&6; }
41422else
41423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41424$as_echo "no" >&6; }
41425fi
41426
41427
41428  test -n "$GNM" && break
41429done
41430
41431    else
41432      # If it succeeded, then it was overridden by the user. We will use it
41433      # for the tool.
41434
41435      # First remove it from the list of overridden variables, so we can test
41436      # for unknown variables in the end.
41437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41438
41439      # Check if we try to supply an empty value
41440      if test "x$GNM" = x; then
41441        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41442$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41444$as_echo_n "checking for GNM... " >&6; }
41445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41446$as_echo "disabled" >&6; }
41447      else
41448        # Check if the provided tool contains a complete path.
41449        tool_specified="$GNM"
41450        tool_basename="${tool_specified##*/}"
41451        if test "x$tool_basename" = "x$tool_specified"; then
41452          # A command without a complete path is provided, search $PATH.
41453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41454$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41455          # Extract the first word of "$tool_basename", so it can be a program name with args.
41456set dummy $tool_basename; ac_word=$2
41457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41458$as_echo_n "checking for $ac_word... " >&6; }
41459if ${ac_cv_path_GNM+:} false; then :
41460  $as_echo_n "(cached) " >&6
41461else
41462  case $GNM in
41463  [\\/]* | ?:[\\/]*)
41464  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41465  ;;
41466  *)
41467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41468for as_dir in $PATH
41469do
41470  IFS=$as_save_IFS
41471  test -z "$as_dir" && as_dir=.
41472    for ac_exec_ext in '' $ac_executable_extensions; do
41473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41474    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41476    break 2
41477  fi
41478done
41479  done
41480IFS=$as_save_IFS
41481
41482  ;;
41483esac
41484fi
41485GNM=$ac_cv_path_GNM
41486if test -n "$GNM"; then
41487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41488$as_echo "$GNM" >&6; }
41489else
41490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41491$as_echo "no" >&6; }
41492fi
41493
41494
41495          if test "x$GNM" = x; then
41496            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41497          fi
41498        else
41499          # Otherwise we believe it is a complete path. Use it as it is.
41500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41501$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41502          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41503$as_echo_n "checking for GNM... " >&6; }
41504          if test ! -x "$tool_specified"; then
41505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41506$as_echo "not found" >&6; }
41507            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41508          fi
41509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41510$as_echo "$tool_specified" >&6; }
41511        fi
41512      fi
41513    fi
41514
41515  fi
41516
41517
41518
41519  # Only process if variable expands to non-empty
41520
41521  if test "x$GNM" != x; then
41522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41523
41524  # First separate the path from the arguments. This will split at the first
41525  # space.
41526  complete="$GNM"
41527  path="${complete%% *}"
41528  tmp="$complete EOL"
41529  arguments="${tmp#* }"
41530
41531  # Input might be given as Windows format, start by converting to
41532  # unix format.
41533  new_path=`$CYGPATH -u "$path"`
41534
41535  # Now try to locate executable using which
41536  new_path=`$WHICH "$new_path" 2> /dev/null`
41537  # bat and cmd files are not always considered executable in cygwin causing which
41538  # to not find them
41539  if test "x$new_path" = x \
41540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41542    new_path=`$CYGPATH -u "$path"`
41543  fi
41544  if test "x$new_path" = x; then
41545    # Oops. Which didn't find the executable.
41546    # The splitting of arguments from the executable at a space might have been incorrect,
41547    # since paths with space are more likely in Windows. Give it another try with the whole
41548    # argument.
41549    path="$complete"
41550    arguments="EOL"
41551    new_path=`$CYGPATH -u "$path"`
41552    new_path=`$WHICH "$new_path" 2> /dev/null`
41553    # bat and cmd files are not always considered executable in cygwin causing which
41554    # to not find them
41555    if test "x$new_path" = x \
41556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41558      new_path=`$CYGPATH -u "$path"`
41559    fi
41560    if test "x$new_path" = x; then
41561      # It's still not found. Now this is an unrecoverable error.
41562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41563$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41564      has_space=`$ECHO "$complete" | $GREP " "`
41565      if test "x$has_space" != x; then
41566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41568      fi
41569      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41570    fi
41571  fi
41572
41573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41576  # "foo.exe" is OK but "foo" is an error.
41577  #
41578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41579  # It is also a way to make sure we got the proper file name for the real test later on.
41580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41581  if test "x$test_shortpath" = x; then
41582    # Short path failed, file does not exist as specified.
41583    # Try adding .exe or .cmd
41584    if test -f "${new_path}.exe"; then
41585      input_to_shortpath="${new_path}.exe"
41586    elif test -f "${new_path}.cmd"; then
41587      input_to_shortpath="${new_path}.cmd"
41588    else
41589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41590$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41593      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41594    fi
41595  else
41596    input_to_shortpath="$new_path"
41597  fi
41598
41599  # Call helper function which possibly converts this using DOS-style short mode.
41600  # If so, the updated path is stored in $new_path.
41601  new_path="$input_to_shortpath"
41602
41603  input_path="$input_to_shortpath"
41604  # Check if we need to convert this using DOS-style short mode. If the path
41605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41606  # take no chances and rewrite it.
41607  # Note: m4 eats our [], so we need to use [ and ] instead.
41608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41609  if test "x$has_forbidden_chars" != x; then
41610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41614      # Going to short mode and back again did indeed matter. Since short mode is
41615      # case insensitive, let's make it lowercase to improve readability.
41616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41617      # Now convert it back to Unix-style (cygpath)
41618      input_path=`$CYGPATH -u "$shortmode_path"`
41619      new_path="$input_path"
41620    fi
41621  fi
41622
41623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41624  if test "x$test_cygdrive_prefix" = x; then
41625    # As a simple fix, exclude /usr/bin since it's not a real path.
41626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41628      # a path prefixed by /cygdrive for fixpath to work.
41629      new_path="$CYGWIN_ROOT_PATH$input_path"
41630    fi
41631  fi
41632
41633  # remove trailing .exe if any
41634  new_path="${new_path/%.exe/}"
41635
41636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41637
41638  # First separate the path from the arguments. This will split at the first
41639  # space.
41640  complete="$GNM"
41641  path="${complete%% *}"
41642  tmp="$complete EOL"
41643  arguments="${tmp#* }"
41644
41645  # Input might be given as Windows format, start by converting to
41646  # unix format.
41647  new_path="$path"
41648
41649  windows_path="$new_path"
41650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41651    unix_path=`$CYGPATH -u "$windows_path"`
41652    new_path="$unix_path"
41653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41655    new_path="$unix_path"
41656  fi
41657
41658
41659  # Now try to locate executable using which
41660  new_path=`$WHICH "$new_path" 2> /dev/null`
41661
41662  if test "x$new_path" = x; then
41663    # Oops. Which didn't find the executable.
41664    # The splitting of arguments from the executable at a space might have been incorrect,
41665    # since paths with space are more likely in Windows. Give it another try with the whole
41666    # argument.
41667    path="$complete"
41668    arguments="EOL"
41669    new_path="$path"
41670
41671  windows_path="$new_path"
41672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41673    unix_path=`$CYGPATH -u "$windows_path"`
41674    new_path="$unix_path"
41675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41677    new_path="$unix_path"
41678  fi
41679
41680
41681    new_path=`$WHICH "$new_path" 2> /dev/null`
41682    # bat and cmd files are not always considered executable in MSYS causing which
41683    # to not find them
41684    if test "x$new_path" = x \
41685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41687      new_path="$path"
41688
41689  windows_path="$new_path"
41690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41691    unix_path=`$CYGPATH -u "$windows_path"`
41692    new_path="$unix_path"
41693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41695    new_path="$unix_path"
41696  fi
41697
41698    fi
41699
41700    if test "x$new_path" = x; then
41701      # It's still not found. Now this is an unrecoverable error.
41702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41703$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41704      has_space=`$ECHO "$complete" | $GREP " "`
41705      if test "x$has_space" != x; then
41706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41708      fi
41709      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41710    fi
41711  fi
41712
41713  # Now new_path has a complete unix path to the binary
41714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41715    # Keep paths in /bin as-is, but remove trailing .exe if any
41716    new_path="${new_path/%.exe/}"
41717    # Do not save /bin paths to all_fixpath_prefixes!
41718  else
41719    # Not in mixed or Windows style, start by that.
41720    new_path=`cmd //c echo $new_path`
41721
41722  input_path="$new_path"
41723  # Check if we need to convert this using DOS-style short mode. If the path
41724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41725  # take no chances and rewrite it.
41726  # Note: m4 eats our [], so we need to use [ and ] instead.
41727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41728  if test "x$has_forbidden_chars" != x; then
41729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41731  fi
41732
41733    # Output is in $new_path
41734
41735  windows_path="$new_path"
41736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41737    unix_path=`$CYGPATH -u "$windows_path"`
41738    new_path="$unix_path"
41739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41741    new_path="$unix_path"
41742  fi
41743
41744    # remove trailing .exe if any
41745    new_path="${new_path/%.exe/}"
41746
41747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41749  fi
41750
41751    else
41752      # We're on a unix platform. Hooray! :)
41753      # First separate the path from the arguments. This will split at the first
41754      # space.
41755      complete="$GNM"
41756      path="${complete%% *}"
41757      tmp="$complete EOL"
41758      arguments="${tmp#* }"
41759
41760      # Cannot rely on the command "which" here since it doesn't always work.
41761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41762      if test -z "$is_absolute_path"; then
41763        # Path to executable is not absolute. Find it.
41764        IFS_save="$IFS"
41765        IFS=:
41766        for p in $PATH; do
41767          if test -f "$p/$path" && test -x "$p/$path"; then
41768            new_path="$p/$path"
41769            break
41770          fi
41771        done
41772        IFS="$IFS_save"
41773      else
41774        # This is an absolute path, we can use it without further modifications.
41775        new_path="$path"
41776      fi
41777
41778      if test "x$new_path" = x; then
41779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41780$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41781        has_space=`$ECHO "$complete" | $GREP " "`
41782        if test "x$has_space" != x; then
41783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41785        fi
41786        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41787      fi
41788    fi
41789
41790    # Now join together the path and the arguments once again
41791    if test "x$arguments" != xEOL; then
41792      new_complete="$new_path ${arguments% *}"
41793    else
41794      new_complete="$new_path"
41795    fi
41796
41797    if test "x$complete" != "x$new_complete"; then
41798      GNM="$new_complete"
41799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41800$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41801    fi
41802  fi
41803
41804  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41805    # FIXME: we should unify this with the solaris case above.
41806
41807
41808  # Publish this variable in the help.
41809
41810
41811  if [ -z "${STRIP+x}" ]; then
41812    # The variable is not set by user, try to locate tool using the code snippet
41813    if test -n "$ac_tool_prefix"; then
41814  for ac_prog in strip
41815  do
41816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41819$as_echo_n "checking for $ac_word... " >&6; }
41820if ${ac_cv_prog_STRIP+:} false; then :
41821  $as_echo_n "(cached) " >&6
41822else
41823  if test -n "$STRIP"; then
41824  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41825else
41826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41827for as_dir in $PATH
41828do
41829  IFS=$as_save_IFS
41830  test -z "$as_dir" && as_dir=.
41831    for ac_exec_ext in '' $ac_executable_extensions; do
41832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41833    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41835    break 2
41836  fi
41837done
41838  done
41839IFS=$as_save_IFS
41840
41841fi
41842fi
41843STRIP=$ac_cv_prog_STRIP
41844if test -n "$STRIP"; then
41845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41846$as_echo "$STRIP" >&6; }
41847else
41848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41849$as_echo "no" >&6; }
41850fi
41851
41852
41853    test -n "$STRIP" && break
41854  done
41855fi
41856if test -z "$STRIP"; then
41857  ac_ct_STRIP=$STRIP
41858  for ac_prog in strip
41859do
41860  # Extract the first word of "$ac_prog", so it can be a program name with args.
41861set dummy $ac_prog; ac_word=$2
41862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41863$as_echo_n "checking for $ac_word... " >&6; }
41864if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41865  $as_echo_n "(cached) " >&6
41866else
41867  if test -n "$ac_ct_STRIP"; then
41868  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41869else
41870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41871for as_dir in $PATH
41872do
41873  IFS=$as_save_IFS
41874  test -z "$as_dir" && as_dir=.
41875    for ac_exec_ext in '' $ac_executable_extensions; do
41876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41877    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41879    break 2
41880  fi
41881done
41882  done
41883IFS=$as_save_IFS
41884
41885fi
41886fi
41887ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41888if test -n "$ac_ct_STRIP"; then
41889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41890$as_echo "$ac_ct_STRIP" >&6; }
41891else
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41893$as_echo "no" >&6; }
41894fi
41895
41896
41897  test -n "$ac_ct_STRIP" && break
41898done
41899
41900  if test "x$ac_ct_STRIP" = x; then
41901    STRIP=""
41902  else
41903    case $cross_compiling:$ac_tool_warned in
41904yes:)
41905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41907ac_tool_warned=yes ;;
41908esac
41909    STRIP=$ac_ct_STRIP
41910  fi
41911fi
41912
41913  else
41914    # The variable is set, but is it from the command line or the environment?
41915
41916    # Try to remove the string !STRIP! from our list.
41917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41919      # If it failed, the variable was not from the command line. Ignore it,
41920      # but warn the user (except for BASH, which is always set by the calling BASH).
41921      if test "xSTRIP" != xBASH; then
41922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41923$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41924      fi
41925      # Try to locate tool using the code snippet
41926      if test -n "$ac_tool_prefix"; then
41927  for ac_prog in strip
41928  do
41929    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41932$as_echo_n "checking for $ac_word... " >&6; }
41933if ${ac_cv_prog_STRIP+:} false; then :
41934  $as_echo_n "(cached) " >&6
41935else
41936  if test -n "$STRIP"; then
41937  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41938else
41939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41940for as_dir in $PATH
41941do
41942  IFS=$as_save_IFS
41943  test -z "$as_dir" && as_dir=.
41944    for ac_exec_ext in '' $ac_executable_extensions; do
41945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41946    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41948    break 2
41949  fi
41950done
41951  done
41952IFS=$as_save_IFS
41953
41954fi
41955fi
41956STRIP=$ac_cv_prog_STRIP
41957if test -n "$STRIP"; then
41958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41959$as_echo "$STRIP" >&6; }
41960else
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41962$as_echo "no" >&6; }
41963fi
41964
41965
41966    test -n "$STRIP" && break
41967  done
41968fi
41969if test -z "$STRIP"; then
41970  ac_ct_STRIP=$STRIP
41971  for ac_prog in strip
41972do
41973  # Extract the first word of "$ac_prog", so it can be a program name with args.
41974set dummy $ac_prog; ac_word=$2
41975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41976$as_echo_n "checking for $ac_word... " >&6; }
41977if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41978  $as_echo_n "(cached) " >&6
41979else
41980  if test -n "$ac_ct_STRIP"; then
41981  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41982else
41983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41984for as_dir in $PATH
41985do
41986  IFS=$as_save_IFS
41987  test -z "$as_dir" && as_dir=.
41988    for ac_exec_ext in '' $ac_executable_extensions; do
41989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41990    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41992    break 2
41993  fi
41994done
41995  done
41996IFS=$as_save_IFS
41997
41998fi
41999fi
42000ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42001if test -n "$ac_ct_STRIP"; then
42002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42003$as_echo "$ac_ct_STRIP" >&6; }
42004else
42005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42006$as_echo "no" >&6; }
42007fi
42008
42009
42010  test -n "$ac_ct_STRIP" && break
42011done
42012
42013  if test "x$ac_ct_STRIP" = x; then
42014    STRIP=""
42015  else
42016    case $cross_compiling:$ac_tool_warned in
42017yes:)
42018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42020ac_tool_warned=yes ;;
42021esac
42022    STRIP=$ac_ct_STRIP
42023  fi
42024fi
42025
42026    else
42027      # If it succeeded, then it was overridden by the user. We will use it
42028      # for the tool.
42029
42030      # First remove it from the list of overridden variables, so we can test
42031      # for unknown variables in the end.
42032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42033
42034      # Check if we try to supply an empty value
42035      if test "x$STRIP" = x; then
42036        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42037$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42039$as_echo_n "checking for STRIP... " >&6; }
42040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42041$as_echo "disabled" >&6; }
42042      else
42043        # Check if the provided tool contains a complete path.
42044        tool_specified="$STRIP"
42045        tool_basename="${tool_specified##*/}"
42046        if test "x$tool_basename" = "x$tool_specified"; then
42047          # A command without a complete path is provided, search $PATH.
42048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42049$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42050          # Extract the first word of "$tool_basename", so it can be a program name with args.
42051set dummy $tool_basename; ac_word=$2
42052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42053$as_echo_n "checking for $ac_word... " >&6; }
42054if ${ac_cv_path_STRIP+:} false; then :
42055  $as_echo_n "(cached) " >&6
42056else
42057  case $STRIP in
42058  [\\/]* | ?:[\\/]*)
42059  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42060  ;;
42061  *)
42062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42063for as_dir in $PATH
42064do
42065  IFS=$as_save_IFS
42066  test -z "$as_dir" && as_dir=.
42067    for ac_exec_ext in '' $ac_executable_extensions; do
42068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42069    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42071    break 2
42072  fi
42073done
42074  done
42075IFS=$as_save_IFS
42076
42077  ;;
42078esac
42079fi
42080STRIP=$ac_cv_path_STRIP
42081if test -n "$STRIP"; then
42082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42083$as_echo "$STRIP" >&6; }
42084else
42085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086$as_echo "no" >&6; }
42087fi
42088
42089
42090          if test "x$STRIP" = x; then
42091            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42092          fi
42093        else
42094          # Otherwise we believe it is a complete path. Use it as it is.
42095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42096$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42097          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42098$as_echo_n "checking for STRIP... " >&6; }
42099          if test ! -x "$tool_specified"; then
42100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42101$as_echo "not found" >&6; }
42102            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42103          fi
42104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42105$as_echo "$tool_specified" >&6; }
42106        fi
42107      fi
42108    fi
42109
42110  fi
42111
42112
42113
42114  # Only process if variable expands to non-empty
42115
42116  if test "x$STRIP" != x; then
42117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42118
42119  # First separate the path from the arguments. This will split at the first
42120  # space.
42121  complete="$STRIP"
42122  path="${complete%% *}"
42123  tmp="$complete EOL"
42124  arguments="${tmp#* }"
42125
42126  # Input might be given as Windows format, start by converting to
42127  # unix format.
42128  new_path=`$CYGPATH -u "$path"`
42129
42130  # Now try to locate executable using which
42131  new_path=`$WHICH "$new_path" 2> /dev/null`
42132  # bat and cmd files are not always considered executable in cygwin causing which
42133  # to not find them
42134  if test "x$new_path" = x \
42135      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42136      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42137    new_path=`$CYGPATH -u "$path"`
42138  fi
42139  if test "x$new_path" = x; then
42140    # Oops. Which didn't find the executable.
42141    # The splitting of arguments from the executable at a space might have been incorrect,
42142    # since paths with space are more likely in Windows. Give it another try with the whole
42143    # argument.
42144    path="$complete"
42145    arguments="EOL"
42146    new_path=`$CYGPATH -u "$path"`
42147    new_path=`$WHICH "$new_path" 2> /dev/null`
42148    # bat and cmd files are not always considered executable in cygwin causing which
42149    # to not find them
42150    if test "x$new_path" = x \
42151        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42152        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42153      new_path=`$CYGPATH -u "$path"`
42154    fi
42155    if test "x$new_path" = x; then
42156      # It's still not found. Now this is an unrecoverable error.
42157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42158$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42159      has_space=`$ECHO "$complete" | $GREP " "`
42160      if test "x$has_space" != x; then
42161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42163      fi
42164      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42165    fi
42166  fi
42167
42168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42171  # "foo.exe" is OK but "foo" is an error.
42172  #
42173  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42174  # It is also a way to make sure we got the proper file name for the real test later on.
42175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42176  if test "x$test_shortpath" = x; then
42177    # Short path failed, file does not exist as specified.
42178    # Try adding .exe or .cmd
42179    if test -f "${new_path}.exe"; then
42180      input_to_shortpath="${new_path}.exe"
42181    elif test -f "${new_path}.cmd"; then
42182      input_to_shortpath="${new_path}.cmd"
42183    else
42184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42185$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42186      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42187$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42188      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42189    fi
42190  else
42191    input_to_shortpath="$new_path"
42192  fi
42193
42194  # Call helper function which possibly converts this using DOS-style short mode.
42195  # If so, the updated path is stored in $new_path.
42196  new_path="$input_to_shortpath"
42197
42198  input_path="$input_to_shortpath"
42199  # Check if we need to convert this using DOS-style short mode. If the path
42200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42201  # take no chances and rewrite it.
42202  # Note: m4 eats our [], so we need to use [ and ] instead.
42203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42204  if test "x$has_forbidden_chars" != x; then
42205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42209      # Going to short mode and back again did indeed matter. Since short mode is
42210      # case insensitive, let's make it lowercase to improve readability.
42211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42212      # Now convert it back to Unix-style (cygpath)
42213      input_path=`$CYGPATH -u "$shortmode_path"`
42214      new_path="$input_path"
42215    fi
42216  fi
42217
42218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42219  if test "x$test_cygdrive_prefix" = x; then
42220    # As a simple fix, exclude /usr/bin since it's not a real path.
42221    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42223      # a path prefixed by /cygdrive for fixpath to work.
42224      new_path="$CYGWIN_ROOT_PATH$input_path"
42225    fi
42226  fi
42227
42228  # remove trailing .exe if any
42229  new_path="${new_path/%.exe/}"
42230
42231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42232
42233  # First separate the path from the arguments. This will split at the first
42234  # space.
42235  complete="$STRIP"
42236  path="${complete%% *}"
42237  tmp="$complete EOL"
42238  arguments="${tmp#* }"
42239
42240  # Input might be given as Windows format, start by converting to
42241  # unix format.
42242  new_path="$path"
42243
42244  windows_path="$new_path"
42245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42246    unix_path=`$CYGPATH -u "$windows_path"`
42247    new_path="$unix_path"
42248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42250    new_path="$unix_path"
42251  fi
42252
42253
42254  # Now try to locate executable using which
42255  new_path=`$WHICH "$new_path" 2> /dev/null`
42256
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="$path"
42265
42266  windows_path="$new_path"
42267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42268    unix_path=`$CYGPATH -u "$windows_path"`
42269    new_path="$unix_path"
42270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42272    new_path="$unix_path"
42273  fi
42274
42275
42276    new_path=`$WHICH "$new_path" 2> /dev/null`
42277    # bat and cmd files are not always considered executable in MSYS causing which
42278    # to not find them
42279    if test "x$new_path" = x \
42280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42282      new_path="$path"
42283
42284  windows_path="$new_path"
42285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42286    unix_path=`$CYGPATH -u "$windows_path"`
42287    new_path="$unix_path"
42288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42290    new_path="$unix_path"
42291  fi
42292
42293    fi
42294
42295    if test "x$new_path" = x; then
42296      # It's still not found. Now this is an unrecoverable error.
42297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42298$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42299      has_space=`$ECHO "$complete" | $GREP " "`
42300      if test "x$has_space" != x; then
42301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42303      fi
42304      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42305    fi
42306  fi
42307
42308  # Now new_path has a complete unix path to the binary
42309  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42310    # Keep paths in /bin as-is, but remove trailing .exe if any
42311    new_path="${new_path/%.exe/}"
42312    # Do not save /bin paths to all_fixpath_prefixes!
42313  else
42314    # Not in mixed or Windows style, start by that.
42315    new_path=`cmd //c echo $new_path`
42316
42317  input_path="$new_path"
42318  # Check if we need to convert this using DOS-style short mode. If the path
42319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42320  # take no chances and rewrite it.
42321  # Note: m4 eats our [], so we need to use [ and ] instead.
42322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42323  if test "x$has_forbidden_chars" != x; then
42324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42326  fi
42327
42328    # Output is in $new_path
42329
42330  windows_path="$new_path"
42331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42332    unix_path=`$CYGPATH -u "$windows_path"`
42333    new_path="$unix_path"
42334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42336    new_path="$unix_path"
42337  fi
42338
42339    # remove trailing .exe if any
42340    new_path="${new_path/%.exe/}"
42341
42342    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42343    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42344  fi
42345
42346    else
42347      # We're on a unix platform. Hooray! :)
42348      # First separate the path from the arguments. This will split at the first
42349      # space.
42350      complete="$STRIP"
42351      path="${complete%% *}"
42352      tmp="$complete EOL"
42353      arguments="${tmp#* }"
42354
42355      # Cannot rely on the command "which" here since it doesn't always work.
42356      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42357      if test -z "$is_absolute_path"; then
42358        # Path to executable is not absolute. Find it.
42359        IFS_save="$IFS"
42360        IFS=:
42361        for p in $PATH; do
42362          if test -f "$p/$path" && test -x "$p/$path"; then
42363            new_path="$p/$path"
42364            break
42365          fi
42366        done
42367        IFS="$IFS_save"
42368      else
42369        # This is an absolute path, we can use it without further modifications.
42370        new_path="$path"
42371      fi
42372
42373      if test "x$new_path" = x; then
42374        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42375$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42376        has_space=`$ECHO "$complete" | $GREP " "`
42377        if test "x$has_space" != x; then
42378          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42379$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42380        fi
42381        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42382      fi
42383    fi
42384
42385    # Now join together the path and the arguments once again
42386    if test "x$arguments" != xEOL; then
42387      new_complete="$new_path ${arguments% *}"
42388    else
42389      new_complete="$new_path"
42390    fi
42391
42392    if test "x$complete" != "x$new_complete"; then
42393      STRIP="$new_complete"
42394      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42395$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42396    fi
42397  fi
42398
42399    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42400
42401
42402  # Publish this variable in the help.
42403
42404
42405  if [ -z "${NM+x}" ]; then
42406    # The variable is not set by user, try to locate tool using the code snippet
42407    if test -n "$ac_tool_prefix"; then
42408  for ac_prog in nm gcc-nm
42409  do
42410    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42411set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42413$as_echo_n "checking for $ac_word... " >&6; }
42414if ${ac_cv_prog_NM+:} false; then :
42415  $as_echo_n "(cached) " >&6
42416else
42417  if test -n "$NM"; then
42418  ac_cv_prog_NM="$NM" # Let the user override the test.
42419else
42420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42421for as_dir in $PATH
42422do
42423  IFS=$as_save_IFS
42424  test -z "$as_dir" && as_dir=.
42425    for ac_exec_ext in '' $ac_executable_extensions; do
42426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42427    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42429    break 2
42430  fi
42431done
42432  done
42433IFS=$as_save_IFS
42434
42435fi
42436fi
42437NM=$ac_cv_prog_NM
42438if test -n "$NM"; then
42439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42440$as_echo "$NM" >&6; }
42441else
42442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42443$as_echo "no" >&6; }
42444fi
42445
42446
42447    test -n "$NM" && break
42448  done
42449fi
42450if test -z "$NM"; then
42451  ac_ct_NM=$NM
42452  for ac_prog in nm gcc-nm
42453do
42454  # Extract the first word of "$ac_prog", so it can be a program name with args.
42455set dummy $ac_prog; ac_word=$2
42456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42457$as_echo_n "checking for $ac_word... " >&6; }
42458if ${ac_cv_prog_ac_ct_NM+:} false; then :
42459  $as_echo_n "(cached) " >&6
42460else
42461  if test -n "$ac_ct_NM"; then
42462  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42463else
42464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42465for as_dir in $PATH
42466do
42467  IFS=$as_save_IFS
42468  test -z "$as_dir" && as_dir=.
42469    for ac_exec_ext in '' $ac_executable_extensions; do
42470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42471    ac_cv_prog_ac_ct_NM="$ac_prog"
42472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42473    break 2
42474  fi
42475done
42476  done
42477IFS=$as_save_IFS
42478
42479fi
42480fi
42481ac_ct_NM=$ac_cv_prog_ac_ct_NM
42482if test -n "$ac_ct_NM"; then
42483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42484$as_echo "$ac_ct_NM" >&6; }
42485else
42486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42487$as_echo "no" >&6; }
42488fi
42489
42490
42491  test -n "$ac_ct_NM" && break
42492done
42493
42494  if test "x$ac_ct_NM" = x; then
42495    NM=""
42496  else
42497    case $cross_compiling:$ac_tool_warned in
42498yes:)
42499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42501ac_tool_warned=yes ;;
42502esac
42503    NM=$ac_ct_NM
42504  fi
42505fi
42506
42507  else
42508    # The variable is set, but is it from the command line or the environment?
42509
42510    # Try to remove the string !NM! from our list.
42511    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42512    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42513      # If it failed, the variable was not from the command line. Ignore it,
42514      # but warn the user (except for BASH, which is always set by the calling BASH).
42515      if test "xNM" != xBASH; then
42516        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42517$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42518      fi
42519      # Try to locate tool using the code snippet
42520      if test -n "$ac_tool_prefix"; then
42521  for ac_prog in nm gcc-nm
42522  do
42523    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42524set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42526$as_echo_n "checking for $ac_word... " >&6; }
42527if ${ac_cv_prog_NM+:} false; then :
42528  $as_echo_n "(cached) " >&6
42529else
42530  if test -n "$NM"; then
42531  ac_cv_prog_NM="$NM" # Let the user override the test.
42532else
42533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42534for as_dir in $PATH
42535do
42536  IFS=$as_save_IFS
42537  test -z "$as_dir" && as_dir=.
42538    for ac_exec_ext in '' $ac_executable_extensions; do
42539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42540    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42542    break 2
42543  fi
42544done
42545  done
42546IFS=$as_save_IFS
42547
42548fi
42549fi
42550NM=$ac_cv_prog_NM
42551if test -n "$NM"; then
42552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42553$as_echo "$NM" >&6; }
42554else
42555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42556$as_echo "no" >&6; }
42557fi
42558
42559
42560    test -n "$NM" && break
42561  done
42562fi
42563if test -z "$NM"; then
42564  ac_ct_NM=$NM
42565  for ac_prog in nm gcc-nm
42566do
42567  # Extract the first word of "$ac_prog", so it can be a program name with args.
42568set dummy $ac_prog; ac_word=$2
42569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42570$as_echo_n "checking for $ac_word... " >&6; }
42571if ${ac_cv_prog_ac_ct_NM+:} false; then :
42572  $as_echo_n "(cached) " >&6
42573else
42574  if test -n "$ac_ct_NM"; then
42575  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42576else
42577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42578for as_dir in $PATH
42579do
42580  IFS=$as_save_IFS
42581  test -z "$as_dir" && as_dir=.
42582    for ac_exec_ext in '' $ac_executable_extensions; do
42583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42584    ac_cv_prog_ac_ct_NM="$ac_prog"
42585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42586    break 2
42587  fi
42588done
42589  done
42590IFS=$as_save_IFS
42591
42592fi
42593fi
42594ac_ct_NM=$ac_cv_prog_ac_ct_NM
42595if test -n "$ac_ct_NM"; then
42596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42597$as_echo "$ac_ct_NM" >&6; }
42598else
42599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42600$as_echo "no" >&6; }
42601fi
42602
42603
42604  test -n "$ac_ct_NM" && break
42605done
42606
42607  if test "x$ac_ct_NM" = x; then
42608    NM=""
42609  else
42610    case $cross_compiling:$ac_tool_warned in
42611yes:)
42612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42614ac_tool_warned=yes ;;
42615esac
42616    NM=$ac_ct_NM
42617  fi
42618fi
42619
42620    else
42621      # If it succeeded, then it was overridden by the user. We will use it
42622      # for the tool.
42623
42624      # First remove it from the list of overridden variables, so we can test
42625      # for unknown variables in the end.
42626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42627
42628      # Check if we try to supply an empty value
42629      if test "x$NM" = x; then
42630        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42631$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42633$as_echo_n "checking for NM... " >&6; }
42634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42635$as_echo "disabled" >&6; }
42636      else
42637        # Check if the provided tool contains a complete path.
42638        tool_specified="$NM"
42639        tool_basename="${tool_specified##*/}"
42640        if test "x$tool_basename" = "x$tool_specified"; then
42641          # A command without a complete path is provided, search $PATH.
42642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42643$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42644          # Extract the first word of "$tool_basename", so it can be a program name with args.
42645set dummy $tool_basename; ac_word=$2
42646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42647$as_echo_n "checking for $ac_word... " >&6; }
42648if ${ac_cv_path_NM+:} false; then :
42649  $as_echo_n "(cached) " >&6
42650else
42651  case $NM in
42652  [\\/]* | ?:[\\/]*)
42653  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42654  ;;
42655  *)
42656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42657for as_dir in $PATH
42658do
42659  IFS=$as_save_IFS
42660  test -z "$as_dir" && as_dir=.
42661    for ac_exec_ext in '' $ac_executable_extensions; do
42662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42663    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42665    break 2
42666  fi
42667done
42668  done
42669IFS=$as_save_IFS
42670
42671  ;;
42672esac
42673fi
42674NM=$ac_cv_path_NM
42675if test -n "$NM"; then
42676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42677$as_echo "$NM" >&6; }
42678else
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42680$as_echo "no" >&6; }
42681fi
42682
42683
42684          if test "x$NM" = x; then
42685            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42686          fi
42687        else
42688          # Otherwise we believe it is a complete path. Use it as it is.
42689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42690$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42691          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42692$as_echo_n "checking for NM... " >&6; }
42693          if test ! -x "$tool_specified"; then
42694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42695$as_echo "not found" >&6; }
42696            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42697          fi
42698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42699$as_echo "$tool_specified" >&6; }
42700        fi
42701      fi
42702    fi
42703
42704  fi
42705
42706
42707    else
42708
42709
42710  # Publish this variable in the help.
42711
42712
42713  if [ -z "${NM+x}" ]; then
42714    # The variable is not set by user, try to locate tool using the code snippet
42715    if test -n "$ac_tool_prefix"; then
42716  for ac_prog in nm
42717  do
42718    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42719set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42721$as_echo_n "checking for $ac_word... " >&6; }
42722if ${ac_cv_prog_NM+:} false; then :
42723  $as_echo_n "(cached) " >&6
42724else
42725  if test -n "$NM"; then
42726  ac_cv_prog_NM="$NM" # Let the user override the test.
42727else
42728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42729for as_dir in $PATH
42730do
42731  IFS=$as_save_IFS
42732  test -z "$as_dir" && as_dir=.
42733    for ac_exec_ext in '' $ac_executable_extensions; do
42734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42735    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42737    break 2
42738  fi
42739done
42740  done
42741IFS=$as_save_IFS
42742
42743fi
42744fi
42745NM=$ac_cv_prog_NM
42746if test -n "$NM"; then
42747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42748$as_echo "$NM" >&6; }
42749else
42750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42751$as_echo "no" >&6; }
42752fi
42753
42754
42755    test -n "$NM" && break
42756  done
42757fi
42758if test -z "$NM"; then
42759  ac_ct_NM=$NM
42760  for ac_prog in nm
42761do
42762  # Extract the first word of "$ac_prog", so it can be a program name with args.
42763set dummy $ac_prog; ac_word=$2
42764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42765$as_echo_n "checking for $ac_word... " >&6; }
42766if ${ac_cv_prog_ac_ct_NM+:} false; then :
42767  $as_echo_n "(cached) " >&6
42768else
42769  if test -n "$ac_ct_NM"; then
42770  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42771else
42772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42773for as_dir in $PATH
42774do
42775  IFS=$as_save_IFS
42776  test -z "$as_dir" && as_dir=.
42777    for ac_exec_ext in '' $ac_executable_extensions; do
42778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42779    ac_cv_prog_ac_ct_NM="$ac_prog"
42780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42781    break 2
42782  fi
42783done
42784  done
42785IFS=$as_save_IFS
42786
42787fi
42788fi
42789ac_ct_NM=$ac_cv_prog_ac_ct_NM
42790if test -n "$ac_ct_NM"; then
42791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42792$as_echo "$ac_ct_NM" >&6; }
42793else
42794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42795$as_echo "no" >&6; }
42796fi
42797
42798
42799  test -n "$ac_ct_NM" && break
42800done
42801
42802  if test "x$ac_ct_NM" = x; then
42803    NM=""
42804  else
42805    case $cross_compiling:$ac_tool_warned in
42806yes:)
42807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42809ac_tool_warned=yes ;;
42810esac
42811    NM=$ac_ct_NM
42812  fi
42813fi
42814
42815  else
42816    # The variable is set, but is it from the command line or the environment?
42817
42818    # Try to remove the string !NM! from our list.
42819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42821      # If it failed, the variable was not from the command line. Ignore it,
42822      # but warn the user (except for BASH, which is always set by the calling BASH).
42823      if test "xNM" != xBASH; then
42824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42825$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42826      fi
42827      # Try to locate tool using the code snippet
42828      if test -n "$ac_tool_prefix"; then
42829  for ac_prog in nm
42830  do
42831    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42832set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42834$as_echo_n "checking for $ac_word... " >&6; }
42835if ${ac_cv_prog_NM+:} false; then :
42836  $as_echo_n "(cached) " >&6
42837else
42838  if test -n "$NM"; then
42839  ac_cv_prog_NM="$NM" # Let the user override the test.
42840else
42841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42842for as_dir in $PATH
42843do
42844  IFS=$as_save_IFS
42845  test -z "$as_dir" && as_dir=.
42846    for ac_exec_ext in '' $ac_executable_extensions; do
42847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42848    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42850    break 2
42851  fi
42852done
42853  done
42854IFS=$as_save_IFS
42855
42856fi
42857fi
42858NM=$ac_cv_prog_NM
42859if test -n "$NM"; then
42860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42861$as_echo "$NM" >&6; }
42862else
42863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42864$as_echo "no" >&6; }
42865fi
42866
42867
42868    test -n "$NM" && break
42869  done
42870fi
42871if test -z "$NM"; then
42872  ac_ct_NM=$NM
42873  for ac_prog in nm
42874do
42875  # Extract the first word of "$ac_prog", so it can be a program name with args.
42876set dummy $ac_prog; ac_word=$2
42877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42878$as_echo_n "checking for $ac_word... " >&6; }
42879if ${ac_cv_prog_ac_ct_NM+:} false; then :
42880  $as_echo_n "(cached) " >&6
42881else
42882  if test -n "$ac_ct_NM"; then
42883  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42884else
42885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42886for as_dir in $PATH
42887do
42888  IFS=$as_save_IFS
42889  test -z "$as_dir" && as_dir=.
42890    for ac_exec_ext in '' $ac_executable_extensions; do
42891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42892    ac_cv_prog_ac_ct_NM="$ac_prog"
42893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42894    break 2
42895  fi
42896done
42897  done
42898IFS=$as_save_IFS
42899
42900fi
42901fi
42902ac_ct_NM=$ac_cv_prog_ac_ct_NM
42903if test -n "$ac_ct_NM"; then
42904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42905$as_echo "$ac_ct_NM" >&6; }
42906else
42907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42908$as_echo "no" >&6; }
42909fi
42910
42911
42912  test -n "$ac_ct_NM" && break
42913done
42914
42915  if test "x$ac_ct_NM" = x; then
42916    NM=""
42917  else
42918    case $cross_compiling:$ac_tool_warned in
42919yes:)
42920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42922ac_tool_warned=yes ;;
42923esac
42924    NM=$ac_ct_NM
42925  fi
42926fi
42927
42928    else
42929      # If it succeeded, then it was overridden by the user. We will use it
42930      # for the tool.
42931
42932      # First remove it from the list of overridden variables, so we can test
42933      # for unknown variables in the end.
42934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42935
42936      # Check if we try to supply an empty value
42937      if test "x$NM" = x; then
42938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42939$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42941$as_echo_n "checking for NM... " >&6; }
42942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42943$as_echo "disabled" >&6; }
42944      else
42945        # Check if the provided tool contains a complete path.
42946        tool_specified="$NM"
42947        tool_basename="${tool_specified##*/}"
42948        if test "x$tool_basename" = "x$tool_specified"; then
42949          # A command without a complete path is provided, search $PATH.
42950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42951$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42952          # Extract the first word of "$tool_basename", so it can be a program name with args.
42953set dummy $tool_basename; ac_word=$2
42954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42955$as_echo_n "checking for $ac_word... " >&6; }
42956if ${ac_cv_path_NM+:} false; then :
42957  $as_echo_n "(cached) " >&6
42958else
42959  case $NM in
42960  [\\/]* | ?:[\\/]*)
42961  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42962  ;;
42963  *)
42964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42965for as_dir in $PATH
42966do
42967  IFS=$as_save_IFS
42968  test -z "$as_dir" && as_dir=.
42969    for ac_exec_ext in '' $ac_executable_extensions; do
42970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42971    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42973    break 2
42974  fi
42975done
42976  done
42977IFS=$as_save_IFS
42978
42979  ;;
42980esac
42981fi
42982NM=$ac_cv_path_NM
42983if test -n "$NM"; then
42984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42985$as_echo "$NM" >&6; }
42986else
42987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42988$as_echo "no" >&6; }
42989fi
42990
42991
42992          if test "x$NM" = x; then
42993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42994          fi
42995        else
42996          # Otherwise we believe it is a complete path. Use it as it is.
42997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42998$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43000$as_echo_n "checking for NM... " >&6; }
43001          if test ! -x "$tool_specified"; then
43002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43003$as_echo "not found" >&6; }
43004            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43005          fi
43006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43007$as_echo "$tool_specified" >&6; }
43008        fi
43009      fi
43010    fi
43011
43012  fi
43013
43014
43015    fi
43016
43017  # Only process if variable expands to non-empty
43018
43019  if test "x$NM" != x; then
43020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43021
43022  # First separate the path from the arguments. This will split at the first
43023  # space.
43024  complete="$NM"
43025  path="${complete%% *}"
43026  tmp="$complete EOL"
43027  arguments="${tmp#* }"
43028
43029  # Input might be given as Windows format, start by converting to
43030  # unix format.
43031  new_path=`$CYGPATH -u "$path"`
43032
43033  # Now try to locate executable using which
43034  new_path=`$WHICH "$new_path" 2> /dev/null`
43035  # bat and cmd files are not always considered executable in cygwin causing which
43036  # to not find them
43037  if test "x$new_path" = x \
43038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43040    new_path=`$CYGPATH -u "$path"`
43041  fi
43042  if test "x$new_path" = x; then
43043    # Oops. Which didn't find the executable.
43044    # The splitting of arguments from the executable at a space might have been incorrect,
43045    # since paths with space are more likely in Windows. Give it another try with the whole
43046    # argument.
43047    path="$complete"
43048    arguments="EOL"
43049    new_path=`$CYGPATH -u "$path"`
43050    new_path=`$WHICH "$new_path" 2> /dev/null`
43051    # bat and cmd files are not always considered executable in cygwin causing which
43052    # to not find them
43053    if test "x$new_path" = x \
43054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43056      new_path=`$CYGPATH -u "$path"`
43057    fi
43058    if test "x$new_path" = x; then
43059      # It's still not found. Now this is an unrecoverable error.
43060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43061$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43062      has_space=`$ECHO "$complete" | $GREP " "`
43063      if test "x$has_space" != x; then
43064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43066      fi
43067      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43068    fi
43069  fi
43070
43071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43074  # "foo.exe" is OK but "foo" is an error.
43075  #
43076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43077  # It is also a way to make sure we got the proper file name for the real test later on.
43078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43079  if test "x$test_shortpath" = x; then
43080    # Short path failed, file does not exist as specified.
43081    # Try adding .exe or .cmd
43082    if test -f "${new_path}.exe"; then
43083      input_to_shortpath="${new_path}.exe"
43084    elif test -f "${new_path}.cmd"; then
43085      input_to_shortpath="${new_path}.cmd"
43086    else
43087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43088$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43091      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43092    fi
43093  else
43094    input_to_shortpath="$new_path"
43095  fi
43096
43097  # Call helper function which possibly converts this using DOS-style short mode.
43098  # If so, the updated path is stored in $new_path.
43099  new_path="$input_to_shortpath"
43100
43101  input_path="$input_to_shortpath"
43102  # Check if we need to convert this using DOS-style short mode. If the path
43103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43104  # take no chances and rewrite it.
43105  # Note: m4 eats our [], so we need to use [ and ] instead.
43106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43107  if test "x$has_forbidden_chars" != x; then
43108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43112      # Going to short mode and back again did indeed matter. Since short mode is
43113      # case insensitive, let's make it lowercase to improve readability.
43114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43115      # Now convert it back to Unix-style (cygpath)
43116      input_path=`$CYGPATH -u "$shortmode_path"`
43117      new_path="$input_path"
43118    fi
43119  fi
43120
43121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43122  if test "x$test_cygdrive_prefix" = x; then
43123    # As a simple fix, exclude /usr/bin since it's not a real path.
43124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43126      # a path prefixed by /cygdrive for fixpath to work.
43127      new_path="$CYGWIN_ROOT_PATH$input_path"
43128    fi
43129  fi
43130
43131  # remove trailing .exe if any
43132  new_path="${new_path/%.exe/}"
43133
43134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43135
43136  # First separate the path from the arguments. This will split at the first
43137  # space.
43138  complete="$NM"
43139  path="${complete%% *}"
43140  tmp="$complete EOL"
43141  arguments="${tmp#* }"
43142
43143  # Input might be given as Windows format, start by converting to
43144  # unix format.
43145  new_path="$path"
43146
43147  windows_path="$new_path"
43148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43149    unix_path=`$CYGPATH -u "$windows_path"`
43150    new_path="$unix_path"
43151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43153    new_path="$unix_path"
43154  fi
43155
43156
43157  # Now try to locate executable using which
43158  new_path=`$WHICH "$new_path" 2> /dev/null`
43159
43160  if test "x$new_path" = x; then
43161    # Oops. Which didn't find the executable.
43162    # The splitting of arguments from the executable at a space might have been incorrect,
43163    # since paths with space are more likely in Windows. Give it another try with the whole
43164    # argument.
43165    path="$complete"
43166    arguments="EOL"
43167    new_path="$path"
43168
43169  windows_path="$new_path"
43170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43171    unix_path=`$CYGPATH -u "$windows_path"`
43172    new_path="$unix_path"
43173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43175    new_path="$unix_path"
43176  fi
43177
43178
43179    new_path=`$WHICH "$new_path" 2> /dev/null`
43180    # bat and cmd files are not always considered executable in MSYS causing which
43181    # to not find them
43182    if test "x$new_path" = x \
43183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43185      new_path="$path"
43186
43187  windows_path="$new_path"
43188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43189    unix_path=`$CYGPATH -u "$windows_path"`
43190    new_path="$unix_path"
43191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43193    new_path="$unix_path"
43194  fi
43195
43196    fi
43197
43198    if test "x$new_path" = x; then
43199      # It's still not found. Now this is an unrecoverable error.
43200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43201$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43202      has_space=`$ECHO "$complete" | $GREP " "`
43203      if test "x$has_space" != x; then
43204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43206      fi
43207      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43208    fi
43209  fi
43210
43211  # Now new_path has a complete unix path to the binary
43212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43213    # Keep paths in /bin as-is, but remove trailing .exe if any
43214    new_path="${new_path/%.exe/}"
43215    # Do not save /bin paths to all_fixpath_prefixes!
43216  else
43217    # Not in mixed or Windows style, start by that.
43218    new_path=`cmd //c echo $new_path`
43219
43220  input_path="$new_path"
43221  # Check if we need to convert this using DOS-style short mode. If the path
43222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43223  # take no chances and rewrite it.
43224  # Note: m4 eats our [], so we need to use [ and ] instead.
43225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43226  if test "x$has_forbidden_chars" != x; then
43227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43229  fi
43230
43231    # Output is in $new_path
43232
43233  windows_path="$new_path"
43234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43235    unix_path=`$CYGPATH -u "$windows_path"`
43236    new_path="$unix_path"
43237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43239    new_path="$unix_path"
43240  fi
43241
43242    # remove trailing .exe if any
43243    new_path="${new_path/%.exe/}"
43244
43245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43247  fi
43248
43249    else
43250      # We're on a unix platform. Hooray! :)
43251      # First separate the path from the arguments. This will split at the first
43252      # space.
43253      complete="$NM"
43254      path="${complete%% *}"
43255      tmp="$complete EOL"
43256      arguments="${tmp#* }"
43257
43258      # Cannot rely on the command "which" here since it doesn't always work.
43259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43260      if test -z "$is_absolute_path"; then
43261        # Path to executable is not absolute. Find it.
43262        IFS_save="$IFS"
43263        IFS=:
43264        for p in $PATH; do
43265          if test -f "$p/$path" && test -x "$p/$path"; then
43266            new_path="$p/$path"
43267            break
43268          fi
43269        done
43270        IFS="$IFS_save"
43271      else
43272        # This is an absolute path, we can use it without further modifications.
43273        new_path="$path"
43274      fi
43275
43276      if test "x$new_path" = x; then
43277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43278$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43279        has_space=`$ECHO "$complete" | $GREP " "`
43280        if test "x$has_space" != x; then
43281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43283        fi
43284        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43285      fi
43286    fi
43287
43288    # Now join together the path and the arguments once again
43289    if test "x$arguments" != xEOL; then
43290      new_complete="$new_path ${arguments% *}"
43291    else
43292      new_complete="$new_path"
43293    fi
43294
43295    if test "x$complete" != "x$new_complete"; then
43296      NM="$new_complete"
43297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43298$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43299    fi
43300  fi
43301
43302    GNM="$NM"
43303
43304  fi
43305
43306  # objcopy is used for moving debug symbols to separate files when
43307  # full debug symbols are enabled.
43308  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43309
43310
43311  # Publish this variable in the help.
43312
43313
43314  if [ -z "${OBJCOPY+x}" ]; then
43315    # The variable is not set by user, try to locate tool using the code snippet
43316    if test -n "$ac_tool_prefix"; then
43317  for ac_prog in gobjcopy objcopy
43318  do
43319    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43320set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43322$as_echo_n "checking for $ac_word... " >&6; }
43323if ${ac_cv_prog_OBJCOPY+:} false; then :
43324  $as_echo_n "(cached) " >&6
43325else
43326  if test -n "$OBJCOPY"; then
43327  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43328else
43329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43330for as_dir in $PATH
43331do
43332  IFS=$as_save_IFS
43333  test -z "$as_dir" && as_dir=.
43334    for ac_exec_ext in '' $ac_executable_extensions; do
43335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43336    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43338    break 2
43339  fi
43340done
43341  done
43342IFS=$as_save_IFS
43343
43344fi
43345fi
43346OBJCOPY=$ac_cv_prog_OBJCOPY
43347if test -n "$OBJCOPY"; then
43348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43349$as_echo "$OBJCOPY" >&6; }
43350else
43351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43352$as_echo "no" >&6; }
43353fi
43354
43355
43356    test -n "$OBJCOPY" && break
43357  done
43358fi
43359if test -z "$OBJCOPY"; then
43360  ac_ct_OBJCOPY=$OBJCOPY
43361  for ac_prog in gobjcopy objcopy
43362do
43363  # Extract the first word of "$ac_prog", so it can be a program name with args.
43364set dummy $ac_prog; ac_word=$2
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43366$as_echo_n "checking for $ac_word... " >&6; }
43367if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43368  $as_echo_n "(cached) " >&6
43369else
43370  if test -n "$ac_ct_OBJCOPY"; then
43371  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43372else
43373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43374for as_dir in $PATH
43375do
43376  IFS=$as_save_IFS
43377  test -z "$as_dir" && as_dir=.
43378    for ac_exec_ext in '' $ac_executable_extensions; do
43379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43380    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43382    break 2
43383  fi
43384done
43385  done
43386IFS=$as_save_IFS
43387
43388fi
43389fi
43390ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43391if test -n "$ac_ct_OBJCOPY"; then
43392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43393$as_echo "$ac_ct_OBJCOPY" >&6; }
43394else
43395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43396$as_echo "no" >&6; }
43397fi
43398
43399
43400  test -n "$ac_ct_OBJCOPY" && break
43401done
43402
43403  if test "x$ac_ct_OBJCOPY" = x; then
43404    OBJCOPY=""
43405  else
43406    case $cross_compiling:$ac_tool_warned in
43407yes:)
43408{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43409$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43410ac_tool_warned=yes ;;
43411esac
43412    OBJCOPY=$ac_ct_OBJCOPY
43413  fi
43414fi
43415
43416  else
43417    # The variable is set, but is it from the command line or the environment?
43418
43419    # Try to remove the string !OBJCOPY! from our list.
43420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43422      # If it failed, the variable was not from the command line. Ignore it,
43423      # but warn the user (except for BASH, which is always set by the calling BASH).
43424      if test "xOBJCOPY" != xBASH; then
43425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43426$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43427      fi
43428      # Try to locate tool using the code snippet
43429      if test -n "$ac_tool_prefix"; then
43430  for ac_prog in gobjcopy objcopy
43431  do
43432    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43435$as_echo_n "checking for $ac_word... " >&6; }
43436if ${ac_cv_prog_OBJCOPY+:} false; then :
43437  $as_echo_n "(cached) " >&6
43438else
43439  if test -n "$OBJCOPY"; then
43440  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43441else
43442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43443for as_dir in $PATH
43444do
43445  IFS=$as_save_IFS
43446  test -z "$as_dir" && as_dir=.
43447    for ac_exec_ext in '' $ac_executable_extensions; do
43448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43449    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43451    break 2
43452  fi
43453done
43454  done
43455IFS=$as_save_IFS
43456
43457fi
43458fi
43459OBJCOPY=$ac_cv_prog_OBJCOPY
43460if test -n "$OBJCOPY"; then
43461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43462$as_echo "$OBJCOPY" >&6; }
43463else
43464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43465$as_echo "no" >&6; }
43466fi
43467
43468
43469    test -n "$OBJCOPY" && break
43470  done
43471fi
43472if test -z "$OBJCOPY"; then
43473  ac_ct_OBJCOPY=$OBJCOPY
43474  for ac_prog in gobjcopy objcopy
43475do
43476  # Extract the first word of "$ac_prog", so it can be a program name with args.
43477set dummy $ac_prog; ac_word=$2
43478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43479$as_echo_n "checking for $ac_word... " >&6; }
43480if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43481  $as_echo_n "(cached) " >&6
43482else
43483  if test -n "$ac_ct_OBJCOPY"; then
43484  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43485else
43486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43487for as_dir in $PATH
43488do
43489  IFS=$as_save_IFS
43490  test -z "$as_dir" && as_dir=.
43491    for ac_exec_ext in '' $ac_executable_extensions; do
43492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43493    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43495    break 2
43496  fi
43497done
43498  done
43499IFS=$as_save_IFS
43500
43501fi
43502fi
43503ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43504if test -n "$ac_ct_OBJCOPY"; then
43505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43506$as_echo "$ac_ct_OBJCOPY" >&6; }
43507else
43508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43509$as_echo "no" >&6; }
43510fi
43511
43512
43513  test -n "$ac_ct_OBJCOPY" && break
43514done
43515
43516  if test "x$ac_ct_OBJCOPY" = x; then
43517    OBJCOPY=""
43518  else
43519    case $cross_compiling:$ac_tool_warned in
43520yes:)
43521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43523ac_tool_warned=yes ;;
43524esac
43525    OBJCOPY=$ac_ct_OBJCOPY
43526  fi
43527fi
43528
43529    else
43530      # If it succeeded, then it was overridden by the user. We will use it
43531      # for the tool.
43532
43533      # First remove it from the list of overridden variables, so we can test
43534      # for unknown variables in the end.
43535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43536
43537      # Check if we try to supply an empty value
43538      if test "x$OBJCOPY" = x; then
43539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43540$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43542$as_echo_n "checking for OBJCOPY... " >&6; }
43543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43544$as_echo "disabled" >&6; }
43545      else
43546        # Check if the provided tool contains a complete path.
43547        tool_specified="$OBJCOPY"
43548        tool_basename="${tool_specified##*/}"
43549        if test "x$tool_basename" = "x$tool_specified"; then
43550          # A command without a complete path is provided, search $PATH.
43551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43552$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43553          # Extract the first word of "$tool_basename", so it can be a program name with args.
43554set dummy $tool_basename; ac_word=$2
43555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43556$as_echo_n "checking for $ac_word... " >&6; }
43557if ${ac_cv_path_OBJCOPY+:} false; then :
43558  $as_echo_n "(cached) " >&6
43559else
43560  case $OBJCOPY in
43561  [\\/]* | ?:[\\/]*)
43562  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43563  ;;
43564  *)
43565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43566for as_dir in $PATH
43567do
43568  IFS=$as_save_IFS
43569  test -z "$as_dir" && as_dir=.
43570    for ac_exec_ext in '' $ac_executable_extensions; do
43571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43572    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43574    break 2
43575  fi
43576done
43577  done
43578IFS=$as_save_IFS
43579
43580  ;;
43581esac
43582fi
43583OBJCOPY=$ac_cv_path_OBJCOPY
43584if test -n "$OBJCOPY"; then
43585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43586$as_echo "$OBJCOPY" >&6; }
43587else
43588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43589$as_echo "no" >&6; }
43590fi
43591
43592
43593          if test "x$OBJCOPY" = x; then
43594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43595          fi
43596        else
43597          # Otherwise we believe it is a complete path. Use it as it is.
43598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43599$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43601$as_echo_n "checking for OBJCOPY... " >&6; }
43602          if test ! -x "$tool_specified"; then
43603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43604$as_echo "not found" >&6; }
43605            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43606          fi
43607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43608$as_echo "$tool_specified" >&6; }
43609        fi
43610      fi
43611    fi
43612
43613  fi
43614
43615
43616    # Only call fixup if objcopy was found.
43617    if test -n "$OBJCOPY"; then
43618
43619  # Only process if variable expands to non-empty
43620
43621  if test "x$OBJCOPY" != x; then
43622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43623
43624  # First separate the path from the arguments. This will split at the first
43625  # space.
43626  complete="$OBJCOPY"
43627  path="${complete%% *}"
43628  tmp="$complete EOL"
43629  arguments="${tmp#* }"
43630
43631  # Input might be given as Windows format, start by converting to
43632  # unix format.
43633  new_path=`$CYGPATH -u "$path"`
43634
43635  # Now try to locate executable using which
43636  new_path=`$WHICH "$new_path" 2> /dev/null`
43637  # bat and cmd files are not always considered executable in cygwin causing which
43638  # to not find them
43639  if test "x$new_path" = x \
43640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43642    new_path=`$CYGPATH -u "$path"`
43643  fi
43644  if test "x$new_path" = x; then
43645    # Oops. Which didn't find the executable.
43646    # The splitting of arguments from the executable at a space might have been incorrect,
43647    # since paths with space are more likely in Windows. Give it another try with the whole
43648    # argument.
43649    path="$complete"
43650    arguments="EOL"
43651    new_path=`$CYGPATH -u "$path"`
43652    new_path=`$WHICH "$new_path" 2> /dev/null`
43653    # bat and cmd files are not always considered executable in cygwin causing which
43654    # to not find them
43655    if test "x$new_path" = x \
43656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43658      new_path=`$CYGPATH -u "$path"`
43659    fi
43660    if test "x$new_path" = x; then
43661      # It's still not found. Now this is an unrecoverable error.
43662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43663$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43664      has_space=`$ECHO "$complete" | $GREP " "`
43665      if test "x$has_space" != x; then
43666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43668      fi
43669      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43670    fi
43671  fi
43672
43673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43676  # "foo.exe" is OK but "foo" is an error.
43677  #
43678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43679  # It is also a way to make sure we got the proper file name for the real test later on.
43680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43681  if test "x$test_shortpath" = x; then
43682    # Short path failed, file does not exist as specified.
43683    # Try adding .exe or .cmd
43684    if test -f "${new_path}.exe"; then
43685      input_to_shortpath="${new_path}.exe"
43686    elif test -f "${new_path}.cmd"; then
43687      input_to_shortpath="${new_path}.cmd"
43688    else
43689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43690$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43693      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43694    fi
43695  else
43696    input_to_shortpath="$new_path"
43697  fi
43698
43699  # Call helper function which possibly converts this using DOS-style short mode.
43700  # If so, the updated path is stored in $new_path.
43701  new_path="$input_to_shortpath"
43702
43703  input_path="$input_to_shortpath"
43704  # Check if we need to convert this using DOS-style short mode. If the path
43705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43706  # take no chances and rewrite it.
43707  # Note: m4 eats our [], so we need to use [ and ] instead.
43708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43709  if test "x$has_forbidden_chars" != x; then
43710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43714      # Going to short mode and back again did indeed matter. Since short mode is
43715      # case insensitive, let's make it lowercase to improve readability.
43716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43717      # Now convert it back to Unix-style (cygpath)
43718      input_path=`$CYGPATH -u "$shortmode_path"`
43719      new_path="$input_path"
43720    fi
43721  fi
43722
43723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43724  if test "x$test_cygdrive_prefix" = x; then
43725    # As a simple fix, exclude /usr/bin since it's not a real path.
43726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43728      # a path prefixed by /cygdrive for fixpath to work.
43729      new_path="$CYGWIN_ROOT_PATH$input_path"
43730    fi
43731  fi
43732
43733  # remove trailing .exe if any
43734  new_path="${new_path/%.exe/}"
43735
43736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43737
43738  # First separate the path from the arguments. This will split at the first
43739  # space.
43740  complete="$OBJCOPY"
43741  path="${complete%% *}"
43742  tmp="$complete EOL"
43743  arguments="${tmp#* }"
43744
43745  # Input might be given as Windows format, start by converting to
43746  # unix format.
43747  new_path="$path"
43748
43749  windows_path="$new_path"
43750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43751    unix_path=`$CYGPATH -u "$windows_path"`
43752    new_path="$unix_path"
43753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43755    new_path="$unix_path"
43756  fi
43757
43758
43759  # Now try to locate executable using which
43760  new_path=`$WHICH "$new_path" 2> /dev/null`
43761
43762  if test "x$new_path" = x; then
43763    # Oops. Which didn't find the executable.
43764    # The splitting of arguments from the executable at a space might have been incorrect,
43765    # since paths with space are more likely in Windows. Give it another try with the whole
43766    # argument.
43767    path="$complete"
43768    arguments="EOL"
43769    new_path="$path"
43770
43771  windows_path="$new_path"
43772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43773    unix_path=`$CYGPATH -u "$windows_path"`
43774    new_path="$unix_path"
43775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43777    new_path="$unix_path"
43778  fi
43779
43780
43781    new_path=`$WHICH "$new_path" 2> /dev/null`
43782    # bat and cmd files are not always considered executable in MSYS causing which
43783    # to not find them
43784    if test "x$new_path" = x \
43785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43787      new_path="$path"
43788
43789  windows_path="$new_path"
43790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43791    unix_path=`$CYGPATH -u "$windows_path"`
43792    new_path="$unix_path"
43793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43795    new_path="$unix_path"
43796  fi
43797
43798    fi
43799
43800    if test "x$new_path" = x; then
43801      # It's still not found. Now this is an unrecoverable error.
43802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43803$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43804      has_space=`$ECHO "$complete" | $GREP " "`
43805      if test "x$has_space" != x; then
43806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43808      fi
43809      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43810    fi
43811  fi
43812
43813  # Now new_path has a complete unix path to the binary
43814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43815    # Keep paths in /bin as-is, but remove trailing .exe if any
43816    new_path="${new_path/%.exe/}"
43817    # Do not save /bin paths to all_fixpath_prefixes!
43818  else
43819    # Not in mixed or Windows style, start by that.
43820    new_path=`cmd //c echo $new_path`
43821
43822  input_path="$new_path"
43823  # Check if we need to convert this using DOS-style short mode. If the path
43824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43825  # take no chances and rewrite it.
43826  # Note: m4 eats our [], so we need to use [ and ] instead.
43827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43828  if test "x$has_forbidden_chars" != x; then
43829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43831  fi
43832
43833    # Output is in $new_path
43834
43835  windows_path="$new_path"
43836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43837    unix_path=`$CYGPATH -u "$windows_path"`
43838    new_path="$unix_path"
43839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43841    new_path="$unix_path"
43842  fi
43843
43844    # remove trailing .exe if any
43845    new_path="${new_path/%.exe/}"
43846
43847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43849  fi
43850
43851    else
43852      # We're on a unix platform. Hooray! :)
43853      # First separate the path from the arguments. This will split at the first
43854      # space.
43855      complete="$OBJCOPY"
43856      path="${complete%% *}"
43857      tmp="$complete EOL"
43858      arguments="${tmp#* }"
43859
43860      # Cannot rely on the command "which" here since it doesn't always work.
43861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43862      if test -z "$is_absolute_path"; then
43863        # Path to executable is not absolute. Find it.
43864        IFS_save="$IFS"
43865        IFS=:
43866        for p in $PATH; do
43867          if test -f "$p/$path" && test -x "$p/$path"; then
43868            new_path="$p/$path"
43869            break
43870          fi
43871        done
43872        IFS="$IFS_save"
43873      else
43874        # This is an absolute path, we can use it without further modifications.
43875        new_path="$path"
43876      fi
43877
43878      if test "x$new_path" = x; then
43879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43880$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43881        has_space=`$ECHO "$complete" | $GREP " "`
43882        if test "x$has_space" != x; then
43883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43885        fi
43886        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43887      fi
43888    fi
43889
43890    # Now join together the path and the arguments once again
43891    if test "x$arguments" != xEOL; then
43892      new_complete="$new_path ${arguments% *}"
43893    else
43894      new_complete="$new_path"
43895    fi
43896
43897    if test "x$complete" != "x$new_complete"; then
43898      OBJCOPY="$new_complete"
43899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43900$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43901    fi
43902  fi
43903
43904      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43905        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43906        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43907        # - version number is last blank separate word on first line
43908        # - version number formats that have been seen:
43909        #   - <major>.<minor>
43910        #   - <major>.<minor>.<micro>
43911        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43912        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43913         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43914              -e 's/.* //' \
43915              -e '/^[01]\./b bad' \
43916              -e '/^2\./{' \
43917              -e '  s/^2\.//' \
43918              -e '  /^[0-9]$/b bad' \
43919              -e '  /^[0-9]\./b bad' \
43920              -e '  /^1[0-9]$/b bad' \
43921              -e '  /^1[0-9]\./b bad' \
43922              -e '  /^20\./b bad' \
43923              -e '  /^21\.0$/b bad' \
43924              -e '  /^21\.0\./b bad' \
43925              -e '}' \
43926              -e ':good' \
43927              -e 's/.*/VALID_VERSION/p' \
43928              -e 'q' \
43929              -e ':bad' \
43930              -e 's/.*/BAD_VERSION/p' \
43931              -e 'q'`
43932        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43933          OBJCOPY=
43934          { $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
43935$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43936          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43937$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43938          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43939$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43940          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43941$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43942          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43943$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43944        fi
43945      fi
43946    fi
43947  fi
43948
43949
43950
43951  # Publish this variable in the help.
43952
43953
43954  if [ -z "${OBJDUMP+x}" ]; then
43955    # The variable is not set by user, try to locate tool using the code snippet
43956    if test -n "$ac_tool_prefix"; then
43957  for ac_prog in gobjdump objdump
43958  do
43959    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43962$as_echo_n "checking for $ac_word... " >&6; }
43963if ${ac_cv_prog_OBJDUMP+:} false; then :
43964  $as_echo_n "(cached) " >&6
43965else
43966  if test -n "$OBJDUMP"; then
43967  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43968else
43969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43970for as_dir in $PATH
43971do
43972  IFS=$as_save_IFS
43973  test -z "$as_dir" && as_dir=.
43974    for ac_exec_ext in '' $ac_executable_extensions; do
43975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43976    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43978    break 2
43979  fi
43980done
43981  done
43982IFS=$as_save_IFS
43983
43984fi
43985fi
43986OBJDUMP=$ac_cv_prog_OBJDUMP
43987if test -n "$OBJDUMP"; then
43988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43989$as_echo "$OBJDUMP" >&6; }
43990else
43991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43992$as_echo "no" >&6; }
43993fi
43994
43995
43996    test -n "$OBJDUMP" && break
43997  done
43998fi
43999if test -z "$OBJDUMP"; then
44000  ac_ct_OBJDUMP=$OBJDUMP
44001  for ac_prog in gobjdump objdump
44002do
44003  # Extract the first word of "$ac_prog", so it can be a program name with args.
44004set dummy $ac_prog; ac_word=$2
44005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44006$as_echo_n "checking for $ac_word... " >&6; }
44007if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44008  $as_echo_n "(cached) " >&6
44009else
44010  if test -n "$ac_ct_OBJDUMP"; then
44011  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44012else
44013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44014for as_dir in $PATH
44015do
44016  IFS=$as_save_IFS
44017  test -z "$as_dir" && as_dir=.
44018    for ac_exec_ext in '' $ac_executable_extensions; do
44019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44020    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44022    break 2
44023  fi
44024done
44025  done
44026IFS=$as_save_IFS
44027
44028fi
44029fi
44030ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44031if test -n "$ac_ct_OBJDUMP"; then
44032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44033$as_echo "$ac_ct_OBJDUMP" >&6; }
44034else
44035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44036$as_echo "no" >&6; }
44037fi
44038
44039
44040  test -n "$ac_ct_OBJDUMP" && break
44041done
44042
44043  if test "x$ac_ct_OBJDUMP" = x; then
44044    OBJDUMP=""
44045  else
44046    case $cross_compiling:$ac_tool_warned in
44047yes:)
44048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44050ac_tool_warned=yes ;;
44051esac
44052    OBJDUMP=$ac_ct_OBJDUMP
44053  fi
44054fi
44055
44056  else
44057    # The variable is set, but is it from the command line or the environment?
44058
44059    # Try to remove the string !OBJDUMP! from our list.
44060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44062      # If it failed, the variable was not from the command line. Ignore it,
44063      # but warn the user (except for BASH, which is always set by the calling BASH).
44064      if test "xOBJDUMP" != xBASH; then
44065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44066$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44067      fi
44068      # Try to locate tool using the code snippet
44069      if test -n "$ac_tool_prefix"; then
44070  for ac_prog in gobjdump objdump
44071  do
44072    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44075$as_echo_n "checking for $ac_word... " >&6; }
44076if ${ac_cv_prog_OBJDUMP+:} false; then :
44077  $as_echo_n "(cached) " >&6
44078else
44079  if test -n "$OBJDUMP"; then
44080  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44081else
44082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44083for as_dir in $PATH
44084do
44085  IFS=$as_save_IFS
44086  test -z "$as_dir" && as_dir=.
44087    for ac_exec_ext in '' $ac_executable_extensions; do
44088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44089    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44091    break 2
44092  fi
44093done
44094  done
44095IFS=$as_save_IFS
44096
44097fi
44098fi
44099OBJDUMP=$ac_cv_prog_OBJDUMP
44100if test -n "$OBJDUMP"; then
44101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44102$as_echo "$OBJDUMP" >&6; }
44103else
44104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44105$as_echo "no" >&6; }
44106fi
44107
44108
44109    test -n "$OBJDUMP" && break
44110  done
44111fi
44112if test -z "$OBJDUMP"; then
44113  ac_ct_OBJDUMP=$OBJDUMP
44114  for ac_prog in gobjdump objdump
44115do
44116  # Extract the first word of "$ac_prog", so it can be a program name with args.
44117set dummy $ac_prog; ac_word=$2
44118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44119$as_echo_n "checking for $ac_word... " >&6; }
44120if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44121  $as_echo_n "(cached) " >&6
44122else
44123  if test -n "$ac_ct_OBJDUMP"; then
44124  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44125else
44126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44127for as_dir in $PATH
44128do
44129  IFS=$as_save_IFS
44130  test -z "$as_dir" && as_dir=.
44131    for ac_exec_ext in '' $ac_executable_extensions; do
44132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44133    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44135    break 2
44136  fi
44137done
44138  done
44139IFS=$as_save_IFS
44140
44141fi
44142fi
44143ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44144if test -n "$ac_ct_OBJDUMP"; then
44145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44146$as_echo "$ac_ct_OBJDUMP" >&6; }
44147else
44148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44149$as_echo "no" >&6; }
44150fi
44151
44152
44153  test -n "$ac_ct_OBJDUMP" && break
44154done
44155
44156  if test "x$ac_ct_OBJDUMP" = x; then
44157    OBJDUMP=""
44158  else
44159    case $cross_compiling:$ac_tool_warned in
44160yes:)
44161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44163ac_tool_warned=yes ;;
44164esac
44165    OBJDUMP=$ac_ct_OBJDUMP
44166  fi
44167fi
44168
44169    else
44170      # If it succeeded, then it was overridden by the user. We will use it
44171      # for the tool.
44172
44173      # First remove it from the list of overridden variables, so we can test
44174      # for unknown variables in the end.
44175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44176
44177      # Check if we try to supply an empty value
44178      if test "x$OBJDUMP" = x; then
44179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44180$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44182$as_echo_n "checking for OBJDUMP... " >&6; }
44183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44184$as_echo "disabled" >&6; }
44185      else
44186        # Check if the provided tool contains a complete path.
44187        tool_specified="$OBJDUMP"
44188        tool_basename="${tool_specified##*/}"
44189        if test "x$tool_basename" = "x$tool_specified"; then
44190          # A command without a complete path is provided, search $PATH.
44191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44192$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44193          # Extract the first word of "$tool_basename", so it can be a program name with args.
44194set dummy $tool_basename; ac_word=$2
44195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44196$as_echo_n "checking for $ac_word... " >&6; }
44197if ${ac_cv_path_OBJDUMP+:} false; then :
44198  $as_echo_n "(cached) " >&6
44199else
44200  case $OBJDUMP in
44201  [\\/]* | ?:[\\/]*)
44202  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44203  ;;
44204  *)
44205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44206for as_dir in $PATH
44207do
44208  IFS=$as_save_IFS
44209  test -z "$as_dir" && as_dir=.
44210    for ac_exec_ext in '' $ac_executable_extensions; do
44211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44212    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44214    break 2
44215  fi
44216done
44217  done
44218IFS=$as_save_IFS
44219
44220  ;;
44221esac
44222fi
44223OBJDUMP=$ac_cv_path_OBJDUMP
44224if test -n "$OBJDUMP"; then
44225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44226$as_echo "$OBJDUMP" >&6; }
44227else
44228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44229$as_echo "no" >&6; }
44230fi
44231
44232
44233          if test "x$OBJDUMP" = x; then
44234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44235          fi
44236        else
44237          # Otherwise we believe it is a complete path. Use it as it is.
44238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44239$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44241$as_echo_n "checking for OBJDUMP... " >&6; }
44242          if test ! -x "$tool_specified"; then
44243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44244$as_echo "not found" >&6; }
44245            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44246          fi
44247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44248$as_echo "$tool_specified" >&6; }
44249        fi
44250      fi
44251    fi
44252
44253  fi
44254
44255
44256  if test "x$OBJDUMP" != x; then
44257    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44258    # bails if argument is missing.
44259
44260  # Only process if variable expands to non-empty
44261
44262  if test "x$OBJDUMP" != x; then
44263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44264
44265  # First separate the path from the arguments. This will split at the first
44266  # space.
44267  complete="$OBJDUMP"
44268  path="${complete%% *}"
44269  tmp="$complete EOL"
44270  arguments="${tmp#* }"
44271
44272  # Input might be given as Windows format, start by converting to
44273  # unix format.
44274  new_path=`$CYGPATH -u "$path"`
44275
44276  # Now try to locate executable using which
44277  new_path=`$WHICH "$new_path" 2> /dev/null`
44278  # bat and cmd files are not always considered executable in cygwin causing which
44279  # to not find them
44280  if test "x$new_path" = x \
44281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44283    new_path=`$CYGPATH -u "$path"`
44284  fi
44285  if test "x$new_path" = x; then
44286    # Oops. Which didn't find the executable.
44287    # The splitting of arguments from the executable at a space might have been incorrect,
44288    # since paths with space are more likely in Windows. Give it another try with the whole
44289    # argument.
44290    path="$complete"
44291    arguments="EOL"
44292    new_path=`$CYGPATH -u "$path"`
44293    new_path=`$WHICH "$new_path" 2> /dev/null`
44294    # bat and cmd files are not always considered executable in cygwin causing which
44295    # to not find them
44296    if test "x$new_path" = x \
44297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44299      new_path=`$CYGPATH -u "$path"`
44300    fi
44301    if test "x$new_path" = x; then
44302      # It's still not found. Now this is an unrecoverable error.
44303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44304$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44305      has_space=`$ECHO "$complete" | $GREP " "`
44306      if test "x$has_space" != x; then
44307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44309      fi
44310      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44311    fi
44312  fi
44313
44314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44317  # "foo.exe" is OK but "foo" is an error.
44318  #
44319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44320  # It is also a way to make sure we got the proper file name for the real test later on.
44321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44322  if test "x$test_shortpath" = x; then
44323    # Short path failed, file does not exist as specified.
44324    # Try adding .exe or .cmd
44325    if test -f "${new_path}.exe"; then
44326      input_to_shortpath="${new_path}.exe"
44327    elif test -f "${new_path}.cmd"; then
44328      input_to_shortpath="${new_path}.cmd"
44329    else
44330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44331$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44334      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44335    fi
44336  else
44337    input_to_shortpath="$new_path"
44338  fi
44339
44340  # Call helper function which possibly converts this using DOS-style short mode.
44341  # If so, the updated path is stored in $new_path.
44342  new_path="$input_to_shortpath"
44343
44344  input_path="$input_to_shortpath"
44345  # Check if we need to convert this using DOS-style short mode. If the path
44346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44347  # take no chances and rewrite it.
44348  # Note: m4 eats our [], so we need to use [ and ] instead.
44349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44350  if test "x$has_forbidden_chars" != x; then
44351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44355      # Going to short mode and back again did indeed matter. Since short mode is
44356      # case insensitive, let's make it lowercase to improve readability.
44357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44358      # Now convert it back to Unix-style (cygpath)
44359      input_path=`$CYGPATH -u "$shortmode_path"`
44360      new_path="$input_path"
44361    fi
44362  fi
44363
44364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44365  if test "x$test_cygdrive_prefix" = x; then
44366    # As a simple fix, exclude /usr/bin since it's not a real path.
44367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44369      # a path prefixed by /cygdrive for fixpath to work.
44370      new_path="$CYGWIN_ROOT_PATH$input_path"
44371    fi
44372  fi
44373
44374  # remove trailing .exe if any
44375  new_path="${new_path/%.exe/}"
44376
44377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44378
44379  # First separate the path from the arguments. This will split at the first
44380  # space.
44381  complete="$OBJDUMP"
44382  path="${complete%% *}"
44383  tmp="$complete EOL"
44384  arguments="${tmp#* }"
44385
44386  # Input might be given as Windows format, start by converting to
44387  # unix format.
44388  new_path="$path"
44389
44390  windows_path="$new_path"
44391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44392    unix_path=`$CYGPATH -u "$windows_path"`
44393    new_path="$unix_path"
44394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44396    new_path="$unix_path"
44397  fi
44398
44399
44400  # Now try to locate executable using which
44401  new_path=`$WHICH "$new_path" 2> /dev/null`
44402
44403  if test "x$new_path" = x; then
44404    # Oops. Which didn't find the executable.
44405    # The splitting of arguments from the executable at a space might have been incorrect,
44406    # since paths with space are more likely in Windows. Give it another try with the whole
44407    # argument.
44408    path="$complete"
44409    arguments="EOL"
44410    new_path="$path"
44411
44412  windows_path="$new_path"
44413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44414    unix_path=`$CYGPATH -u "$windows_path"`
44415    new_path="$unix_path"
44416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44418    new_path="$unix_path"
44419  fi
44420
44421
44422    new_path=`$WHICH "$new_path" 2> /dev/null`
44423    # bat and cmd files are not always considered executable in MSYS causing which
44424    # to not find them
44425    if test "x$new_path" = x \
44426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44428      new_path="$path"
44429
44430  windows_path="$new_path"
44431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44432    unix_path=`$CYGPATH -u "$windows_path"`
44433    new_path="$unix_path"
44434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44436    new_path="$unix_path"
44437  fi
44438
44439    fi
44440
44441    if test "x$new_path" = x; then
44442      # It's still not found. Now this is an unrecoverable error.
44443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44444$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44445      has_space=`$ECHO "$complete" | $GREP " "`
44446      if test "x$has_space" != x; then
44447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44449      fi
44450      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44451    fi
44452  fi
44453
44454  # Now new_path has a complete unix path to the binary
44455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44456    # Keep paths in /bin as-is, but remove trailing .exe if any
44457    new_path="${new_path/%.exe/}"
44458    # Do not save /bin paths to all_fixpath_prefixes!
44459  else
44460    # Not in mixed or Windows style, start by that.
44461    new_path=`cmd //c echo $new_path`
44462
44463  input_path="$new_path"
44464  # Check if we need to convert this using DOS-style short mode. If the path
44465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44466  # take no chances and rewrite it.
44467  # Note: m4 eats our [], so we need to use [ and ] instead.
44468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44469  if test "x$has_forbidden_chars" != x; then
44470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44472  fi
44473
44474    # Output is in $new_path
44475
44476  windows_path="$new_path"
44477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44478    unix_path=`$CYGPATH -u "$windows_path"`
44479    new_path="$unix_path"
44480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44482    new_path="$unix_path"
44483  fi
44484
44485    # remove trailing .exe if any
44486    new_path="${new_path/%.exe/}"
44487
44488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44490  fi
44491
44492    else
44493      # We're on a unix platform. Hooray! :)
44494      # First separate the path from the arguments. This will split at the first
44495      # space.
44496      complete="$OBJDUMP"
44497      path="${complete%% *}"
44498      tmp="$complete EOL"
44499      arguments="${tmp#* }"
44500
44501      # Cannot rely on the command "which" here since it doesn't always work.
44502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44503      if test -z "$is_absolute_path"; then
44504        # Path to executable is not absolute. Find it.
44505        IFS_save="$IFS"
44506        IFS=:
44507        for p in $PATH; do
44508          if test -f "$p/$path" && test -x "$p/$path"; then
44509            new_path="$p/$path"
44510            break
44511          fi
44512        done
44513        IFS="$IFS_save"
44514      else
44515        # This is an absolute path, we can use it without further modifications.
44516        new_path="$path"
44517      fi
44518
44519      if test "x$new_path" = x; then
44520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44521$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44522        has_space=`$ECHO "$complete" | $GREP " "`
44523        if test "x$has_space" != x; then
44524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44526        fi
44527        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44528      fi
44529    fi
44530
44531    # Now join together the path and the arguments once again
44532    if test "x$arguments" != xEOL; then
44533      new_complete="$new_path ${arguments% *}"
44534    else
44535      new_complete="$new_path"
44536    fi
44537
44538    if test "x$complete" != "x$new_complete"; then
44539      OBJDUMP="$new_complete"
44540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44541$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44542    fi
44543  fi
44544
44545  fi
44546
44547
44548  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44549  # to remain in place. Otherwise the compiler will not work in some siutations
44550  # in later configure checks.
44551  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44552    PATH="$OLD_PATH"
44553  fi
44554
44555  # Restore the flags to the user specified values.
44556  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44557  CFLAGS="$ORG_CFLAGS"
44558  CXXFLAGS="$ORG_CXXFLAGS"
44559
44560
44561# Finally do some processing after the detection phase
44562
44563  if test "x$COMPILE_TYPE" = "xcross"; then
44564    # Now we need to find a C/C++ compiler that can build executables for the
44565    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44566    # used once. Also, we need to do this without adding a tools dir to the
44567    # path, otherwise we might pick up cross-compilers which don't use standard
44568    # naming.
44569
44570    OLDPATH="$PATH"
44571
44572
44573# Check whether --with-build-devkit was given.
44574if test "${with_build_devkit+set}" = set; then :
44575  withval=$with_build_devkit;
44576fi
44577
44578    if test "x$with_build_devkit" = "xyes"; then
44579      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44580    elif test -n "$with_build_devkit"; then
44581      if test ! -d "$with_build_devkit"; then
44582        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44583      else
44584
44585  # Only process if variable expands to non-empty
44586
44587  if test "x$with_build_devkit" != x; then
44588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44589
44590  # Input might be given as Windows format, start by converting to
44591  # unix format.
44592  path="$with_build_devkit"
44593  new_path=`$CYGPATH -u "$path"`
44594
44595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44598  # "foo.exe" is OK but "foo" is an error.
44599  #
44600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44601  # It is also a way to make sure we got the proper file name for the real test later on.
44602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44603  if test "x$test_shortpath" = x; then
44604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44605$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44606    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44607  fi
44608
44609  # Call helper function which possibly converts this using DOS-style short mode.
44610  # If so, the updated path is stored in $new_path.
44611
44612  input_path="$new_path"
44613  # Check if we need to convert this using DOS-style short mode. If the path
44614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44615  # take no chances and rewrite it.
44616  # Note: m4 eats our [], so we need to use [ and ] instead.
44617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44618  if test "x$has_forbidden_chars" != x; then
44619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44623      # Going to short mode and back again did indeed matter. Since short mode is
44624      # case insensitive, let's make it lowercase to improve readability.
44625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44626      # Now convert it back to Unix-style (cygpath)
44627      input_path=`$CYGPATH -u "$shortmode_path"`
44628      new_path="$input_path"
44629    fi
44630  fi
44631
44632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44633  if test "x$test_cygdrive_prefix" = x; then
44634    # As a simple fix, exclude /usr/bin since it's not a real path.
44635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44637      # a path prefixed by /cygdrive for fixpath to work.
44638      new_path="$CYGWIN_ROOT_PATH$input_path"
44639    fi
44640  fi
44641
44642
44643  if test "x$path" != "x$new_path"; then
44644    with_build_devkit="$new_path"
44645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44646$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44647  fi
44648
44649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44650
44651  path="$with_build_devkit"
44652  has_colon=`$ECHO $path | $GREP ^.:`
44653  new_path="$path"
44654  if test "x$has_colon" = x; then
44655    # Not in mixed or Windows style, start by that.
44656    new_path=`cmd //c echo $path`
44657  fi
44658
44659
44660  input_path="$new_path"
44661  # Check if we need to convert this using DOS-style short mode. If the path
44662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44663  # take no chances and rewrite it.
44664  # Note: m4 eats our [], so we need to use [ and ] instead.
44665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44666  if test "x$has_forbidden_chars" != x; then
44667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44669  fi
44670
44671
44672  windows_path="$new_path"
44673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44674    unix_path=`$CYGPATH -u "$windows_path"`
44675    new_path="$unix_path"
44676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44678    new_path="$unix_path"
44679  fi
44680
44681  if test "x$path" != "x$new_path"; then
44682    with_build_devkit="$new_path"
44683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44684$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44685  fi
44686
44687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44689
44690    else
44691      # We're on a unix platform. Hooray! :)
44692      path="$with_build_devkit"
44693      has_space=`$ECHO "$path" | $GREP " "`
44694      if test "x$has_space" != x; then
44695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44696$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44698      fi
44699
44700      # Use eval to expand a potential ~
44701      eval path="$path"
44702      if test ! -f "$path" && test ! -d "$path"; then
44703        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44704      fi
44705
44706      if test -d "$path"; then
44707        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44708      else
44709        dir="`$DIRNAME "$path"`"
44710        base="`$BASENAME "$path"`"
44711        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44712      fi
44713    fi
44714  fi
44715
44716        BUILD_DEVKIT_ROOT="$with_build_devkit"
44717        # Check for a meta data info file in the root of the devkit
44718        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44719          # Process devkit.info so that existing devkit variables are not
44720          # modified by this
44721          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44722              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44723              -e "s/\$host/\$build/g" \
44724              $BUILD_DEVKIT_ROOT/devkit.info \
44725              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44726          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44727          # This potentially sets the following:
44728          # A descriptive name of the devkit
44729
44730  if test "x$BUILD_DEVKIT_NAME" = x; then
44731    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44732  fi
44733
44734          # Corresponds to --with-extra-path
44735
44736  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44737    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44738  fi
44739
44740          # Corresponds to --with-toolchain-path
44741
44742  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44743    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44744  fi
44745
44746          # Corresponds to --with-sysroot
44747
44748  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44749    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44750  fi
44751
44752          # Skip the Window specific parts
44753        fi
44754
44755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44756$as_echo_n "checking for build platform devkit... " >&6; }
44757        if test "x$BUILD_DEVKIT_NAME" != x; then
44758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44759$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44760        else
44761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44762$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44763        fi
44764
44765        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44766
44767  if test "x$BUILD_SYSROOT" != "x"; then
44768    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44769      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44770        # Solaris Studio does not have a concept of sysroot. Instead we must
44771        # make sure the default include and lib dirs are appended to each
44772        # compile and link command line. Must also add -I-xbuiltin to enable
44773        # inlining of system functions and intrinsics.
44774        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44775        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44776            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44777      fi
44778    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44779      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44780      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44781    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44782      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44783      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44784    fi
44785    # The global CFLAGS and LDFLAGS variables need these for configure to function
44786    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44787    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44788    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44789    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44790  fi
44791
44792  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44793    # We also need -iframework<path>/System/Library/Frameworks
44794    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44795    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44796    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44797    # set this here so it doesn't have to be peppered throughout the forest
44798    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44799    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44800  fi
44801
44802
44803
44804
44805
44806         # Fallback default of just /bin if DEVKIT_PATH is not defined
44807        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44808          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44809        fi
44810        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44811      fi
44812    fi
44813
44814    # FIXME: we should list the discovered compilers as an exclude pattern!
44815    # If we do that, we can do this detection before POST_DETECTION, and still
44816    # find the build compilers in the tools dir, if needed.
44817
44818
44819
44820  # Publish this variable in the help.
44821
44822
44823  if [ -z "${BUILD_CC+x}" ]; then
44824    # The variable is not set by user, try to locate tool using the code snippet
44825    for ac_prog in cl cc gcc
44826do
44827  # Extract the first word of "$ac_prog", so it can be a program name with args.
44828set dummy $ac_prog; ac_word=$2
44829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44830$as_echo_n "checking for $ac_word... " >&6; }
44831if ${ac_cv_path_BUILD_CC+:} false; then :
44832  $as_echo_n "(cached) " >&6
44833else
44834  case $BUILD_CC in
44835  [\\/]* | ?:[\\/]*)
44836  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44837  ;;
44838  *)
44839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44840for as_dir in $PATH
44841do
44842  IFS=$as_save_IFS
44843  test -z "$as_dir" && as_dir=.
44844    for ac_exec_ext in '' $ac_executable_extensions; do
44845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44846    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44848    break 2
44849  fi
44850done
44851  done
44852IFS=$as_save_IFS
44853
44854  ;;
44855esac
44856fi
44857BUILD_CC=$ac_cv_path_BUILD_CC
44858if test -n "$BUILD_CC"; then
44859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44860$as_echo "$BUILD_CC" >&6; }
44861else
44862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44863$as_echo "no" >&6; }
44864fi
44865
44866
44867  test -n "$BUILD_CC" && break
44868done
44869
44870  else
44871    # The variable is set, but is it from the command line or the environment?
44872
44873    # Try to remove the string !BUILD_CC! from our list.
44874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44876      # If it failed, the variable was not from the command line. Ignore it,
44877      # but warn the user (except for BASH, which is always set by the calling BASH).
44878      if test "xBUILD_CC" != xBASH; then
44879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44880$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44881      fi
44882      # Try to locate tool using the code snippet
44883      for ac_prog in cl cc gcc
44884do
44885  # Extract the first word of "$ac_prog", so it can be a program name with args.
44886set dummy $ac_prog; ac_word=$2
44887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44888$as_echo_n "checking for $ac_word... " >&6; }
44889if ${ac_cv_path_BUILD_CC+:} false; then :
44890  $as_echo_n "(cached) " >&6
44891else
44892  case $BUILD_CC in
44893  [\\/]* | ?:[\\/]*)
44894  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44895  ;;
44896  *)
44897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44898for as_dir in $PATH
44899do
44900  IFS=$as_save_IFS
44901  test -z "$as_dir" && as_dir=.
44902    for ac_exec_ext in '' $ac_executable_extensions; do
44903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44904    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44906    break 2
44907  fi
44908done
44909  done
44910IFS=$as_save_IFS
44911
44912  ;;
44913esac
44914fi
44915BUILD_CC=$ac_cv_path_BUILD_CC
44916if test -n "$BUILD_CC"; then
44917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44918$as_echo "$BUILD_CC" >&6; }
44919else
44920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44921$as_echo "no" >&6; }
44922fi
44923
44924
44925  test -n "$BUILD_CC" && break
44926done
44927
44928    else
44929      # If it succeeded, then it was overridden by the user. We will use it
44930      # for the tool.
44931
44932      # First remove it from the list of overridden variables, so we can test
44933      # for unknown variables in the end.
44934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44935
44936      # Check if we try to supply an empty value
44937      if test "x$BUILD_CC" = x; then
44938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44939$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44941$as_echo_n "checking for BUILD_CC... " >&6; }
44942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44943$as_echo "disabled" >&6; }
44944      else
44945        # Check if the provided tool contains a complete path.
44946        tool_specified="$BUILD_CC"
44947        tool_basename="${tool_specified##*/}"
44948        if test "x$tool_basename" = "x$tool_specified"; then
44949          # A command without a complete path is provided, search $PATH.
44950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44951$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44952          # Extract the first word of "$tool_basename", so it can be a program name with args.
44953set dummy $tool_basename; ac_word=$2
44954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44955$as_echo_n "checking for $ac_word... " >&6; }
44956if ${ac_cv_path_BUILD_CC+:} false; then :
44957  $as_echo_n "(cached) " >&6
44958else
44959  case $BUILD_CC in
44960  [\\/]* | ?:[\\/]*)
44961  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44962  ;;
44963  *)
44964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44965for as_dir in $PATH
44966do
44967  IFS=$as_save_IFS
44968  test -z "$as_dir" && as_dir=.
44969    for ac_exec_ext in '' $ac_executable_extensions; do
44970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44971    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44973    break 2
44974  fi
44975done
44976  done
44977IFS=$as_save_IFS
44978
44979  ;;
44980esac
44981fi
44982BUILD_CC=$ac_cv_path_BUILD_CC
44983if test -n "$BUILD_CC"; then
44984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44985$as_echo "$BUILD_CC" >&6; }
44986else
44987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44988$as_echo "no" >&6; }
44989fi
44990
44991
44992          if test "x$BUILD_CC" = x; then
44993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44994          fi
44995        else
44996          # Otherwise we believe it is a complete path. Use it as it is.
44997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44998$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45000$as_echo_n "checking for BUILD_CC... " >&6; }
45001          if test ! -x "$tool_specified"; then
45002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45003$as_echo "not found" >&6; }
45004            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45005          fi
45006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45007$as_echo "$tool_specified" >&6; }
45008        fi
45009      fi
45010    fi
45011
45012  fi
45013
45014
45015
45016  if test "x$BUILD_CC" = x; then
45017    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45018  fi
45019
45020
45021
45022  # Only process if variable expands to non-empty
45023
45024  if test "x$BUILD_CC" != x; then
45025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45026
45027  # First separate the path from the arguments. This will split at the first
45028  # space.
45029  complete="$BUILD_CC"
45030  path="${complete%% *}"
45031  tmp="$complete EOL"
45032  arguments="${tmp#* }"
45033
45034  # Input might be given as Windows format, start by converting to
45035  # unix format.
45036  new_path=`$CYGPATH -u "$path"`
45037
45038  # Now try to locate executable using which
45039  new_path=`$WHICH "$new_path" 2> /dev/null`
45040  # bat and cmd files are not always considered executable in cygwin causing which
45041  # to not find them
45042  if test "x$new_path" = x \
45043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45045    new_path=`$CYGPATH -u "$path"`
45046  fi
45047  if test "x$new_path" = x; then
45048    # Oops. Which didn't find the executable.
45049    # The splitting of arguments from the executable at a space might have been incorrect,
45050    # since paths with space are more likely in Windows. Give it another try with the whole
45051    # argument.
45052    path="$complete"
45053    arguments="EOL"
45054    new_path=`$CYGPATH -u "$path"`
45055    new_path=`$WHICH "$new_path" 2> /dev/null`
45056    # bat and cmd files are not always considered executable in cygwin causing which
45057    # to not find them
45058    if test "x$new_path" = x \
45059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45061      new_path=`$CYGPATH -u "$path"`
45062    fi
45063    if test "x$new_path" = x; then
45064      # It's still not found. Now this is an unrecoverable error.
45065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45066$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45067      has_space=`$ECHO "$complete" | $GREP " "`
45068      if test "x$has_space" != x; then
45069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45071      fi
45072      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45073    fi
45074  fi
45075
45076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45079  # "foo.exe" is OK but "foo" is an error.
45080  #
45081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45082  # It is also a way to make sure we got the proper file name for the real test later on.
45083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45084  if test "x$test_shortpath" = x; then
45085    # Short path failed, file does not exist as specified.
45086    # Try adding .exe or .cmd
45087    if test -f "${new_path}.exe"; then
45088      input_to_shortpath="${new_path}.exe"
45089    elif test -f "${new_path}.cmd"; then
45090      input_to_shortpath="${new_path}.cmd"
45091    else
45092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45093$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45096      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45097    fi
45098  else
45099    input_to_shortpath="$new_path"
45100  fi
45101
45102  # Call helper function which possibly converts this using DOS-style short mode.
45103  # If so, the updated path is stored in $new_path.
45104  new_path="$input_to_shortpath"
45105
45106  input_path="$input_to_shortpath"
45107  # Check if we need to convert this using DOS-style short mode. If the path
45108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45109  # take no chances and rewrite it.
45110  # Note: m4 eats our [], so we need to use [ and ] instead.
45111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45112  if test "x$has_forbidden_chars" != x; then
45113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45117      # Going to short mode and back again did indeed matter. Since short mode is
45118      # case insensitive, let's make it lowercase to improve readability.
45119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45120      # Now convert it back to Unix-style (cygpath)
45121      input_path=`$CYGPATH -u "$shortmode_path"`
45122      new_path="$input_path"
45123    fi
45124  fi
45125
45126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45127  if test "x$test_cygdrive_prefix" = x; then
45128    # As a simple fix, exclude /usr/bin since it's not a real path.
45129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45131      # a path prefixed by /cygdrive for fixpath to work.
45132      new_path="$CYGWIN_ROOT_PATH$input_path"
45133    fi
45134  fi
45135
45136  # remove trailing .exe if any
45137  new_path="${new_path/%.exe/}"
45138
45139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45140
45141  # First separate the path from the arguments. This will split at the first
45142  # space.
45143  complete="$BUILD_CC"
45144  path="${complete%% *}"
45145  tmp="$complete EOL"
45146  arguments="${tmp#* }"
45147
45148  # Input might be given as Windows format, start by converting to
45149  # unix format.
45150  new_path="$path"
45151
45152  windows_path="$new_path"
45153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45154    unix_path=`$CYGPATH -u "$windows_path"`
45155    new_path="$unix_path"
45156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45158    new_path="$unix_path"
45159  fi
45160
45161
45162  # Now try to locate executable using which
45163  new_path=`$WHICH "$new_path" 2> /dev/null`
45164
45165  if test "x$new_path" = x; then
45166    # Oops. Which didn't find the executable.
45167    # The splitting of arguments from the executable at a space might have been incorrect,
45168    # since paths with space are more likely in Windows. Give it another try with the whole
45169    # argument.
45170    path="$complete"
45171    arguments="EOL"
45172    new_path="$path"
45173
45174  windows_path="$new_path"
45175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45176    unix_path=`$CYGPATH -u "$windows_path"`
45177    new_path="$unix_path"
45178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45180    new_path="$unix_path"
45181  fi
45182
45183
45184    new_path=`$WHICH "$new_path" 2> /dev/null`
45185    # bat and cmd files are not always considered executable in MSYS causing which
45186    # to not find them
45187    if test "x$new_path" = x \
45188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45190      new_path="$path"
45191
45192  windows_path="$new_path"
45193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45194    unix_path=`$CYGPATH -u "$windows_path"`
45195    new_path="$unix_path"
45196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45198    new_path="$unix_path"
45199  fi
45200
45201    fi
45202
45203    if test "x$new_path" = x; then
45204      # It's still not found. Now this is an unrecoverable error.
45205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45206$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45207      has_space=`$ECHO "$complete" | $GREP " "`
45208      if test "x$has_space" != x; then
45209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45211      fi
45212      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45213    fi
45214  fi
45215
45216  # Now new_path has a complete unix path to the binary
45217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45218    # Keep paths in /bin as-is, but remove trailing .exe if any
45219    new_path="${new_path/%.exe/}"
45220    # Do not save /bin paths to all_fixpath_prefixes!
45221  else
45222    # Not in mixed or Windows style, start by that.
45223    new_path=`cmd //c echo $new_path`
45224
45225  input_path="$new_path"
45226  # Check if we need to convert this using DOS-style short mode. If the path
45227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45228  # take no chances and rewrite it.
45229  # Note: m4 eats our [], so we need to use [ and ] instead.
45230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45231  if test "x$has_forbidden_chars" != x; then
45232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45234  fi
45235
45236    # Output is in $new_path
45237
45238  windows_path="$new_path"
45239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45240    unix_path=`$CYGPATH -u "$windows_path"`
45241    new_path="$unix_path"
45242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45244    new_path="$unix_path"
45245  fi
45246
45247    # remove trailing .exe if any
45248    new_path="${new_path/%.exe/}"
45249
45250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45252  fi
45253
45254    else
45255      # We're on a unix platform. Hooray! :)
45256      # First separate the path from the arguments. This will split at the first
45257      # space.
45258      complete="$BUILD_CC"
45259      path="${complete%% *}"
45260      tmp="$complete EOL"
45261      arguments="${tmp#* }"
45262
45263      # Cannot rely on the command "which" here since it doesn't always work.
45264      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45265      if test -z "$is_absolute_path"; then
45266        # Path to executable is not absolute. Find it.
45267        IFS_save="$IFS"
45268        IFS=:
45269        for p in $PATH; do
45270          if test -f "$p/$path" && test -x "$p/$path"; then
45271            new_path="$p/$path"
45272            break
45273          fi
45274        done
45275        IFS="$IFS_save"
45276      else
45277        # This is an absolute path, we can use it without further modifications.
45278        new_path="$path"
45279      fi
45280
45281      if test "x$new_path" = x; then
45282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45283$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45284        has_space=`$ECHO "$complete" | $GREP " "`
45285        if test "x$has_space" != x; then
45286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45288        fi
45289        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45290      fi
45291    fi
45292
45293    # Now join together the path and the arguments once again
45294    if test "x$arguments" != xEOL; then
45295      new_complete="$new_path ${arguments% *}"
45296    else
45297      new_complete="$new_path"
45298    fi
45299
45300    if test "x$complete" != "x$new_complete"; then
45301      BUILD_CC="$new_complete"
45302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45303$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45304    fi
45305  fi
45306
45307
45308
45309
45310  # Publish this variable in the help.
45311
45312
45313  if [ -z "${BUILD_CXX+x}" ]; then
45314    # The variable is not set by user, try to locate tool using the code snippet
45315    for ac_prog in cl CC g++
45316do
45317  # Extract the first word of "$ac_prog", so it can be a program name with args.
45318set dummy $ac_prog; ac_word=$2
45319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45320$as_echo_n "checking for $ac_word... " >&6; }
45321if ${ac_cv_path_BUILD_CXX+:} false; then :
45322  $as_echo_n "(cached) " >&6
45323else
45324  case $BUILD_CXX in
45325  [\\/]* | ?:[\\/]*)
45326  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45327  ;;
45328  *)
45329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45330for as_dir in $PATH
45331do
45332  IFS=$as_save_IFS
45333  test -z "$as_dir" && as_dir=.
45334    for ac_exec_ext in '' $ac_executable_extensions; do
45335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45336    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45338    break 2
45339  fi
45340done
45341  done
45342IFS=$as_save_IFS
45343
45344  ;;
45345esac
45346fi
45347BUILD_CXX=$ac_cv_path_BUILD_CXX
45348if test -n "$BUILD_CXX"; then
45349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45350$as_echo "$BUILD_CXX" >&6; }
45351else
45352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45353$as_echo "no" >&6; }
45354fi
45355
45356
45357  test -n "$BUILD_CXX" && break
45358done
45359
45360  else
45361    # The variable is set, but is it from the command line or the environment?
45362
45363    # Try to remove the string !BUILD_CXX! from our list.
45364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45366      # If it failed, the variable was not from the command line. Ignore it,
45367      # but warn the user (except for BASH, which is always set by the calling BASH).
45368      if test "xBUILD_CXX" != xBASH; then
45369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45370$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45371      fi
45372      # Try to locate tool using the code snippet
45373      for ac_prog in cl CC g++
45374do
45375  # Extract the first word of "$ac_prog", so it can be a program name with args.
45376set dummy $ac_prog; ac_word=$2
45377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45378$as_echo_n "checking for $ac_word... " >&6; }
45379if ${ac_cv_path_BUILD_CXX+:} false; then :
45380  $as_echo_n "(cached) " >&6
45381else
45382  case $BUILD_CXX in
45383  [\\/]* | ?:[\\/]*)
45384  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45385  ;;
45386  *)
45387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45388for as_dir in $PATH
45389do
45390  IFS=$as_save_IFS
45391  test -z "$as_dir" && as_dir=.
45392    for ac_exec_ext in '' $ac_executable_extensions; do
45393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45394    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45396    break 2
45397  fi
45398done
45399  done
45400IFS=$as_save_IFS
45401
45402  ;;
45403esac
45404fi
45405BUILD_CXX=$ac_cv_path_BUILD_CXX
45406if test -n "$BUILD_CXX"; then
45407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45408$as_echo "$BUILD_CXX" >&6; }
45409else
45410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45411$as_echo "no" >&6; }
45412fi
45413
45414
45415  test -n "$BUILD_CXX" && break
45416done
45417
45418    else
45419      # If it succeeded, then it was overridden by the user. We will use it
45420      # for the tool.
45421
45422      # First remove it from the list of overridden variables, so we can test
45423      # for unknown variables in the end.
45424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45425
45426      # Check if we try to supply an empty value
45427      if test "x$BUILD_CXX" = x; then
45428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45429$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45431$as_echo_n "checking for BUILD_CXX... " >&6; }
45432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45433$as_echo "disabled" >&6; }
45434      else
45435        # Check if the provided tool contains a complete path.
45436        tool_specified="$BUILD_CXX"
45437        tool_basename="${tool_specified##*/}"
45438        if test "x$tool_basename" = "x$tool_specified"; then
45439          # A command without a complete path is provided, search $PATH.
45440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45441$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45442          # Extract the first word of "$tool_basename", so it can be a program name with args.
45443set dummy $tool_basename; ac_word=$2
45444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45445$as_echo_n "checking for $ac_word... " >&6; }
45446if ${ac_cv_path_BUILD_CXX+:} false; then :
45447  $as_echo_n "(cached) " >&6
45448else
45449  case $BUILD_CXX in
45450  [\\/]* | ?:[\\/]*)
45451  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45452  ;;
45453  *)
45454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45455for as_dir in $PATH
45456do
45457  IFS=$as_save_IFS
45458  test -z "$as_dir" && as_dir=.
45459    for ac_exec_ext in '' $ac_executable_extensions; do
45460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45461    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45463    break 2
45464  fi
45465done
45466  done
45467IFS=$as_save_IFS
45468
45469  ;;
45470esac
45471fi
45472BUILD_CXX=$ac_cv_path_BUILD_CXX
45473if test -n "$BUILD_CXX"; then
45474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45475$as_echo "$BUILD_CXX" >&6; }
45476else
45477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45478$as_echo "no" >&6; }
45479fi
45480
45481
45482          if test "x$BUILD_CXX" = x; then
45483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45484          fi
45485        else
45486          # Otherwise we believe it is a complete path. Use it as it is.
45487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45488$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45490$as_echo_n "checking for BUILD_CXX... " >&6; }
45491          if test ! -x "$tool_specified"; then
45492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45493$as_echo "not found" >&6; }
45494            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45495          fi
45496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45497$as_echo "$tool_specified" >&6; }
45498        fi
45499      fi
45500    fi
45501
45502  fi
45503
45504
45505
45506  if test "x$BUILD_CXX" = x; then
45507    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45508  fi
45509
45510
45511
45512  # Only process if variable expands to non-empty
45513
45514  if test "x$BUILD_CXX" != x; then
45515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45516
45517  # First separate the path from the arguments. This will split at the first
45518  # space.
45519  complete="$BUILD_CXX"
45520  path="${complete%% *}"
45521  tmp="$complete EOL"
45522  arguments="${tmp#* }"
45523
45524  # Input might be given as Windows format, start by converting to
45525  # unix format.
45526  new_path=`$CYGPATH -u "$path"`
45527
45528  # Now try to locate executable using which
45529  new_path=`$WHICH "$new_path" 2> /dev/null`
45530  # bat and cmd files are not always considered executable in cygwin causing which
45531  # to not find them
45532  if test "x$new_path" = x \
45533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45535    new_path=`$CYGPATH -u "$path"`
45536  fi
45537  if test "x$new_path" = x; then
45538    # Oops. Which didn't find the executable.
45539    # The splitting of arguments from the executable at a space might have been incorrect,
45540    # since paths with space are more likely in Windows. Give it another try with the whole
45541    # argument.
45542    path="$complete"
45543    arguments="EOL"
45544    new_path=`$CYGPATH -u "$path"`
45545    new_path=`$WHICH "$new_path" 2> /dev/null`
45546    # bat and cmd files are not always considered executable in cygwin causing which
45547    # to not find them
45548    if test "x$new_path" = x \
45549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45551      new_path=`$CYGPATH -u "$path"`
45552    fi
45553    if test "x$new_path" = x; then
45554      # It's still not found. Now this is an unrecoverable error.
45555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45556$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45557      has_space=`$ECHO "$complete" | $GREP " "`
45558      if test "x$has_space" != x; then
45559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45561      fi
45562      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45563    fi
45564  fi
45565
45566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45569  # "foo.exe" is OK but "foo" is an error.
45570  #
45571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45572  # It is also a way to make sure we got the proper file name for the real test later on.
45573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45574  if test "x$test_shortpath" = x; then
45575    # Short path failed, file does not exist as specified.
45576    # Try adding .exe or .cmd
45577    if test -f "${new_path}.exe"; then
45578      input_to_shortpath="${new_path}.exe"
45579    elif test -f "${new_path}.cmd"; then
45580      input_to_shortpath="${new_path}.cmd"
45581    else
45582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45583$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45586      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45587    fi
45588  else
45589    input_to_shortpath="$new_path"
45590  fi
45591
45592  # Call helper function which possibly converts this using DOS-style short mode.
45593  # If so, the updated path is stored in $new_path.
45594  new_path="$input_to_shortpath"
45595
45596  input_path="$input_to_shortpath"
45597  # Check if we need to convert this using DOS-style short mode. If the path
45598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45599  # take no chances and rewrite it.
45600  # Note: m4 eats our [], so we need to use [ and ] instead.
45601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45602  if test "x$has_forbidden_chars" != x; then
45603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45607      # Going to short mode and back again did indeed matter. Since short mode is
45608      # case insensitive, let's make it lowercase to improve readability.
45609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45610      # Now convert it back to Unix-style (cygpath)
45611      input_path=`$CYGPATH -u "$shortmode_path"`
45612      new_path="$input_path"
45613    fi
45614  fi
45615
45616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45617  if test "x$test_cygdrive_prefix" = x; then
45618    # As a simple fix, exclude /usr/bin since it's not a real path.
45619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45621      # a path prefixed by /cygdrive for fixpath to work.
45622      new_path="$CYGWIN_ROOT_PATH$input_path"
45623    fi
45624  fi
45625
45626  # remove trailing .exe if any
45627  new_path="${new_path/%.exe/}"
45628
45629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45630
45631  # First separate the path from the arguments. This will split at the first
45632  # space.
45633  complete="$BUILD_CXX"
45634  path="${complete%% *}"
45635  tmp="$complete EOL"
45636  arguments="${tmp#* }"
45637
45638  # Input might be given as Windows format, start by converting to
45639  # unix format.
45640  new_path="$path"
45641
45642  windows_path="$new_path"
45643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45644    unix_path=`$CYGPATH -u "$windows_path"`
45645    new_path="$unix_path"
45646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45648    new_path="$unix_path"
45649  fi
45650
45651
45652  # Now try to locate executable using which
45653  new_path=`$WHICH "$new_path" 2> /dev/null`
45654
45655  if test "x$new_path" = x; then
45656    # Oops. Which didn't find the executable.
45657    # The splitting of arguments from the executable at a space might have been incorrect,
45658    # since paths with space are more likely in Windows. Give it another try with the whole
45659    # argument.
45660    path="$complete"
45661    arguments="EOL"
45662    new_path="$path"
45663
45664  windows_path="$new_path"
45665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45666    unix_path=`$CYGPATH -u "$windows_path"`
45667    new_path="$unix_path"
45668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45670    new_path="$unix_path"
45671  fi
45672
45673
45674    new_path=`$WHICH "$new_path" 2> /dev/null`
45675    # bat and cmd files are not always considered executable in MSYS causing which
45676    # to not find them
45677    if test "x$new_path" = x \
45678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45680      new_path="$path"
45681
45682  windows_path="$new_path"
45683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45684    unix_path=`$CYGPATH -u "$windows_path"`
45685    new_path="$unix_path"
45686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45688    new_path="$unix_path"
45689  fi
45690
45691    fi
45692
45693    if test "x$new_path" = x; then
45694      # It's still not found. Now this is an unrecoverable error.
45695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45696$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45697      has_space=`$ECHO "$complete" | $GREP " "`
45698      if test "x$has_space" != x; then
45699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45701      fi
45702      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45703    fi
45704  fi
45705
45706  # Now new_path has a complete unix path to the binary
45707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45708    # Keep paths in /bin as-is, but remove trailing .exe if any
45709    new_path="${new_path/%.exe/}"
45710    # Do not save /bin paths to all_fixpath_prefixes!
45711  else
45712    # Not in mixed or Windows style, start by that.
45713    new_path=`cmd //c echo $new_path`
45714
45715  input_path="$new_path"
45716  # Check if we need to convert this using DOS-style short mode. If the path
45717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45718  # take no chances and rewrite it.
45719  # Note: m4 eats our [], so we need to use [ and ] instead.
45720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45721  if test "x$has_forbidden_chars" != x; then
45722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45724  fi
45725
45726    # Output is in $new_path
45727
45728  windows_path="$new_path"
45729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45730    unix_path=`$CYGPATH -u "$windows_path"`
45731    new_path="$unix_path"
45732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45734    new_path="$unix_path"
45735  fi
45736
45737    # remove trailing .exe if any
45738    new_path="${new_path/%.exe/}"
45739
45740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45742  fi
45743
45744    else
45745      # We're on a unix platform. Hooray! :)
45746      # First separate the path from the arguments. This will split at the first
45747      # space.
45748      complete="$BUILD_CXX"
45749      path="${complete%% *}"
45750      tmp="$complete EOL"
45751      arguments="${tmp#* }"
45752
45753      # Cannot rely on the command "which" here since it doesn't always work.
45754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45755      if test -z "$is_absolute_path"; then
45756        # Path to executable is not absolute. Find it.
45757        IFS_save="$IFS"
45758        IFS=:
45759        for p in $PATH; do
45760          if test -f "$p/$path" && test -x "$p/$path"; then
45761            new_path="$p/$path"
45762            break
45763          fi
45764        done
45765        IFS="$IFS_save"
45766      else
45767        # This is an absolute path, we can use it without further modifications.
45768        new_path="$path"
45769      fi
45770
45771      if test "x$new_path" = x; then
45772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45773$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45774        has_space=`$ECHO "$complete" | $GREP " "`
45775        if test "x$has_space" != x; then
45776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45778        fi
45779        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45780      fi
45781    fi
45782
45783    # Now join together the path and the arguments once again
45784    if test "x$arguments" != xEOL; then
45785      new_complete="$new_path ${arguments% *}"
45786    else
45787      new_complete="$new_path"
45788    fi
45789
45790    if test "x$complete" != "x$new_complete"; then
45791      BUILD_CXX="$new_complete"
45792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45793$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45794    fi
45795  fi
45796
45797
45798
45799  # Publish this variable in the help.
45800
45801
45802  if [ -z "${BUILD_NM+x}" ]; then
45803    # The variable is not set by user, try to locate tool using the code snippet
45804    for ac_prog in nm gcc-nm
45805do
45806  # Extract the first word of "$ac_prog", so it can be a program name with args.
45807set dummy $ac_prog; ac_word=$2
45808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45809$as_echo_n "checking for $ac_word... " >&6; }
45810if ${ac_cv_path_BUILD_NM+:} false; then :
45811  $as_echo_n "(cached) " >&6
45812else
45813  case $BUILD_NM in
45814  [\\/]* | ?:[\\/]*)
45815  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45816  ;;
45817  *)
45818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45819for as_dir in $PATH
45820do
45821  IFS=$as_save_IFS
45822  test -z "$as_dir" && as_dir=.
45823    for ac_exec_ext in '' $ac_executable_extensions; do
45824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45825    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45827    break 2
45828  fi
45829done
45830  done
45831IFS=$as_save_IFS
45832
45833  ;;
45834esac
45835fi
45836BUILD_NM=$ac_cv_path_BUILD_NM
45837if test -n "$BUILD_NM"; then
45838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45839$as_echo "$BUILD_NM" >&6; }
45840else
45841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45842$as_echo "no" >&6; }
45843fi
45844
45845
45846  test -n "$BUILD_NM" && break
45847done
45848
45849  else
45850    # The variable is set, but is it from the command line or the environment?
45851
45852    # Try to remove the string !BUILD_NM! from our list.
45853    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45854    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45855      # If it failed, the variable was not from the command line. Ignore it,
45856      # but warn the user (except for BASH, which is always set by the calling BASH).
45857      if test "xBUILD_NM" != xBASH; then
45858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45859$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45860      fi
45861      # Try to locate tool using the code snippet
45862      for ac_prog in nm gcc-nm
45863do
45864  # Extract the first word of "$ac_prog", so it can be a program name with args.
45865set dummy $ac_prog; ac_word=$2
45866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45867$as_echo_n "checking for $ac_word... " >&6; }
45868if ${ac_cv_path_BUILD_NM+:} false; then :
45869  $as_echo_n "(cached) " >&6
45870else
45871  case $BUILD_NM in
45872  [\\/]* | ?:[\\/]*)
45873  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45874  ;;
45875  *)
45876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45877for as_dir in $PATH
45878do
45879  IFS=$as_save_IFS
45880  test -z "$as_dir" && as_dir=.
45881    for ac_exec_ext in '' $ac_executable_extensions; do
45882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45883    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45885    break 2
45886  fi
45887done
45888  done
45889IFS=$as_save_IFS
45890
45891  ;;
45892esac
45893fi
45894BUILD_NM=$ac_cv_path_BUILD_NM
45895if test -n "$BUILD_NM"; then
45896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45897$as_echo "$BUILD_NM" >&6; }
45898else
45899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45900$as_echo "no" >&6; }
45901fi
45902
45903
45904  test -n "$BUILD_NM" && break
45905done
45906
45907    else
45908      # If it succeeded, then it was overridden by the user. We will use it
45909      # for the tool.
45910
45911      # First remove it from the list of overridden variables, so we can test
45912      # for unknown variables in the end.
45913      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45914
45915      # Check if we try to supply an empty value
45916      if test "x$BUILD_NM" = x; then
45917        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45918$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45920$as_echo_n "checking for BUILD_NM... " >&6; }
45921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45922$as_echo "disabled" >&6; }
45923      else
45924        # Check if the provided tool contains a complete path.
45925        tool_specified="$BUILD_NM"
45926        tool_basename="${tool_specified##*/}"
45927        if test "x$tool_basename" = "x$tool_specified"; then
45928          # A command without a complete path is provided, search $PATH.
45929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45930$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45931          # Extract the first word of "$tool_basename", so it can be a program name with args.
45932set dummy $tool_basename; ac_word=$2
45933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45934$as_echo_n "checking for $ac_word... " >&6; }
45935if ${ac_cv_path_BUILD_NM+:} false; then :
45936  $as_echo_n "(cached) " >&6
45937else
45938  case $BUILD_NM in
45939  [\\/]* | ?:[\\/]*)
45940  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45941  ;;
45942  *)
45943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45944for as_dir in $PATH
45945do
45946  IFS=$as_save_IFS
45947  test -z "$as_dir" && as_dir=.
45948    for ac_exec_ext in '' $ac_executable_extensions; do
45949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45950    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45952    break 2
45953  fi
45954done
45955  done
45956IFS=$as_save_IFS
45957
45958  ;;
45959esac
45960fi
45961BUILD_NM=$ac_cv_path_BUILD_NM
45962if test -n "$BUILD_NM"; then
45963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45964$as_echo "$BUILD_NM" >&6; }
45965else
45966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45967$as_echo "no" >&6; }
45968fi
45969
45970
45971          if test "x$BUILD_NM" = x; then
45972            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45973          fi
45974        else
45975          # Otherwise we believe it is a complete path. Use it as it is.
45976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45977$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45978          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45979$as_echo_n "checking for BUILD_NM... " >&6; }
45980          if test ! -x "$tool_specified"; then
45981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45982$as_echo "not found" >&6; }
45983            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45984          fi
45985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45986$as_echo "$tool_specified" >&6; }
45987        fi
45988      fi
45989    fi
45990
45991  fi
45992
45993
45994
45995  # Only process if variable expands to non-empty
45996
45997  if test "x$BUILD_NM" != x; then
45998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45999
46000  # First separate the path from the arguments. This will split at the first
46001  # space.
46002  complete="$BUILD_NM"
46003  path="${complete%% *}"
46004  tmp="$complete EOL"
46005  arguments="${tmp#* }"
46006
46007  # Input might be given as Windows format, start by converting to
46008  # unix format.
46009  new_path=`$CYGPATH -u "$path"`
46010
46011  # Now try to locate executable using which
46012  new_path=`$WHICH "$new_path" 2> /dev/null`
46013  # bat and cmd files are not always considered executable in cygwin causing which
46014  # to not find them
46015  if test "x$new_path" = x \
46016      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46017      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46018    new_path=`$CYGPATH -u "$path"`
46019  fi
46020  if test "x$new_path" = x; then
46021    # Oops. Which didn't find the executable.
46022    # The splitting of arguments from the executable at a space might have been incorrect,
46023    # since paths with space are more likely in Windows. Give it another try with the whole
46024    # argument.
46025    path="$complete"
46026    arguments="EOL"
46027    new_path=`$CYGPATH -u "$path"`
46028    new_path=`$WHICH "$new_path" 2> /dev/null`
46029    # bat and cmd files are not always considered executable in cygwin causing which
46030    # to not find them
46031    if test "x$new_path" = x \
46032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46034      new_path=`$CYGPATH -u "$path"`
46035    fi
46036    if test "x$new_path" = x; then
46037      # It's still not found. Now this is an unrecoverable error.
46038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46039$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46040      has_space=`$ECHO "$complete" | $GREP " "`
46041      if test "x$has_space" != x; then
46042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46044      fi
46045      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46046    fi
46047  fi
46048
46049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46052  # "foo.exe" is OK but "foo" is an error.
46053  #
46054  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46055  # It is also a way to make sure we got the proper file name for the real test later on.
46056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46057  if test "x$test_shortpath" = x; then
46058    # Short path failed, file does not exist as specified.
46059    # Try adding .exe or .cmd
46060    if test -f "${new_path}.exe"; then
46061      input_to_shortpath="${new_path}.exe"
46062    elif test -f "${new_path}.cmd"; then
46063      input_to_shortpath="${new_path}.cmd"
46064    else
46065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46066$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46069      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46070    fi
46071  else
46072    input_to_shortpath="$new_path"
46073  fi
46074
46075  # Call helper function which possibly converts this using DOS-style short mode.
46076  # If so, the updated path is stored in $new_path.
46077  new_path="$input_to_shortpath"
46078
46079  input_path="$input_to_shortpath"
46080  # Check if we need to convert this using DOS-style short mode. If the path
46081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46082  # take no chances and rewrite it.
46083  # Note: m4 eats our [], so we need to use [ and ] instead.
46084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46085  if test "x$has_forbidden_chars" != x; then
46086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46090      # Going to short mode and back again did indeed matter. Since short mode is
46091      # case insensitive, let's make it lowercase to improve readability.
46092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46093      # Now convert it back to Unix-style (cygpath)
46094      input_path=`$CYGPATH -u "$shortmode_path"`
46095      new_path="$input_path"
46096    fi
46097  fi
46098
46099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46100  if test "x$test_cygdrive_prefix" = x; then
46101    # As a simple fix, exclude /usr/bin since it's not a real path.
46102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46104      # a path prefixed by /cygdrive for fixpath to work.
46105      new_path="$CYGWIN_ROOT_PATH$input_path"
46106    fi
46107  fi
46108
46109  # remove trailing .exe if any
46110  new_path="${new_path/%.exe/}"
46111
46112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46113
46114  # First separate the path from the arguments. This will split at the first
46115  # space.
46116  complete="$BUILD_NM"
46117  path="${complete%% *}"
46118  tmp="$complete EOL"
46119  arguments="${tmp#* }"
46120
46121  # Input might be given as Windows format, start by converting to
46122  # unix format.
46123  new_path="$path"
46124
46125  windows_path="$new_path"
46126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46127    unix_path=`$CYGPATH -u "$windows_path"`
46128    new_path="$unix_path"
46129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46131    new_path="$unix_path"
46132  fi
46133
46134
46135  # Now try to locate executable using which
46136  new_path=`$WHICH "$new_path" 2> /dev/null`
46137
46138  if test "x$new_path" = x; then
46139    # Oops. Which didn't find the executable.
46140    # The splitting of arguments from the executable at a space might have been incorrect,
46141    # since paths with space are more likely in Windows. Give it another try with the whole
46142    # argument.
46143    path="$complete"
46144    arguments="EOL"
46145    new_path="$path"
46146
46147  windows_path="$new_path"
46148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46149    unix_path=`$CYGPATH -u "$windows_path"`
46150    new_path="$unix_path"
46151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46153    new_path="$unix_path"
46154  fi
46155
46156
46157    new_path=`$WHICH "$new_path" 2> /dev/null`
46158    # bat and cmd files are not always considered executable in MSYS causing which
46159    # to not find them
46160    if test "x$new_path" = x \
46161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46163      new_path="$path"
46164
46165  windows_path="$new_path"
46166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46167    unix_path=`$CYGPATH -u "$windows_path"`
46168    new_path="$unix_path"
46169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46171    new_path="$unix_path"
46172  fi
46173
46174    fi
46175
46176    if test "x$new_path" = x; then
46177      # It's still not found. Now this is an unrecoverable error.
46178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46179$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46180      has_space=`$ECHO "$complete" | $GREP " "`
46181      if test "x$has_space" != x; then
46182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46184      fi
46185      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46186    fi
46187  fi
46188
46189  # Now new_path has a complete unix path to the binary
46190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46191    # Keep paths in /bin as-is, but remove trailing .exe if any
46192    new_path="${new_path/%.exe/}"
46193    # Do not save /bin paths to all_fixpath_prefixes!
46194  else
46195    # Not in mixed or Windows style, start by that.
46196    new_path=`cmd //c echo $new_path`
46197
46198  input_path="$new_path"
46199  # Check if we need to convert this using DOS-style short mode. If the path
46200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46201  # take no chances and rewrite it.
46202  # Note: m4 eats our [], so we need to use [ and ] instead.
46203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46204  if test "x$has_forbidden_chars" != x; then
46205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46207  fi
46208
46209    # Output is in $new_path
46210
46211  windows_path="$new_path"
46212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46213    unix_path=`$CYGPATH -u "$windows_path"`
46214    new_path="$unix_path"
46215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46217    new_path="$unix_path"
46218  fi
46219
46220    # remove trailing .exe if any
46221    new_path="${new_path/%.exe/}"
46222
46223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46225  fi
46226
46227    else
46228      # We're on a unix platform. Hooray! :)
46229      # First separate the path from the arguments. This will split at the first
46230      # space.
46231      complete="$BUILD_NM"
46232      path="${complete%% *}"
46233      tmp="$complete EOL"
46234      arguments="${tmp#* }"
46235
46236      # Cannot rely on the command "which" here since it doesn't always work.
46237      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46238      if test -z "$is_absolute_path"; then
46239        # Path to executable is not absolute. Find it.
46240        IFS_save="$IFS"
46241        IFS=:
46242        for p in $PATH; do
46243          if test -f "$p/$path" && test -x "$p/$path"; then
46244            new_path="$p/$path"
46245            break
46246          fi
46247        done
46248        IFS="$IFS_save"
46249      else
46250        # This is an absolute path, we can use it without further modifications.
46251        new_path="$path"
46252      fi
46253
46254      if test "x$new_path" = x; then
46255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46256$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46257        has_space=`$ECHO "$complete" | $GREP " "`
46258        if test "x$has_space" != x; then
46259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46261        fi
46262        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46263      fi
46264    fi
46265
46266    # Now join together the path and the arguments once again
46267    if test "x$arguments" != xEOL; then
46268      new_complete="$new_path ${arguments% *}"
46269    else
46270      new_complete="$new_path"
46271    fi
46272
46273    if test "x$complete" != "x$new_complete"; then
46274      BUILD_NM="$new_complete"
46275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46276$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46277    fi
46278  fi
46279
46280
46281
46282  # Publish this variable in the help.
46283
46284
46285  if [ -z "${BUILD_AR+x}" ]; then
46286    # The variable is not set by user, try to locate tool using the code snippet
46287    for ac_prog in ar gcc-ar
46288do
46289  # Extract the first word of "$ac_prog", so it can be a program name with args.
46290set dummy $ac_prog; ac_word=$2
46291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46292$as_echo_n "checking for $ac_word... " >&6; }
46293if ${ac_cv_path_BUILD_AR+:} false; then :
46294  $as_echo_n "(cached) " >&6
46295else
46296  case $BUILD_AR in
46297  [\\/]* | ?:[\\/]*)
46298  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46299  ;;
46300  *)
46301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46302for as_dir in $PATH
46303do
46304  IFS=$as_save_IFS
46305  test -z "$as_dir" && as_dir=.
46306    for ac_exec_ext in '' $ac_executable_extensions; do
46307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46308    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46310    break 2
46311  fi
46312done
46313  done
46314IFS=$as_save_IFS
46315
46316  ;;
46317esac
46318fi
46319BUILD_AR=$ac_cv_path_BUILD_AR
46320if test -n "$BUILD_AR"; then
46321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46322$as_echo "$BUILD_AR" >&6; }
46323else
46324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46325$as_echo "no" >&6; }
46326fi
46327
46328
46329  test -n "$BUILD_AR" && break
46330done
46331
46332  else
46333    # The variable is set, but is it from the command line or the environment?
46334
46335    # Try to remove the string !BUILD_AR! from our list.
46336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46338      # If it failed, the variable was not from the command line. Ignore it,
46339      # but warn the user (except for BASH, which is always set by the calling BASH).
46340      if test "xBUILD_AR" != xBASH; then
46341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46342$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46343      fi
46344      # Try to locate tool using the code snippet
46345      for ac_prog in ar gcc-ar
46346do
46347  # Extract the first word of "$ac_prog", so it can be a program name with args.
46348set dummy $ac_prog; ac_word=$2
46349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46350$as_echo_n "checking for $ac_word... " >&6; }
46351if ${ac_cv_path_BUILD_AR+:} false; then :
46352  $as_echo_n "(cached) " >&6
46353else
46354  case $BUILD_AR in
46355  [\\/]* | ?:[\\/]*)
46356  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46357  ;;
46358  *)
46359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46360for as_dir in $PATH
46361do
46362  IFS=$as_save_IFS
46363  test -z "$as_dir" && as_dir=.
46364    for ac_exec_ext in '' $ac_executable_extensions; do
46365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46366    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46368    break 2
46369  fi
46370done
46371  done
46372IFS=$as_save_IFS
46373
46374  ;;
46375esac
46376fi
46377BUILD_AR=$ac_cv_path_BUILD_AR
46378if test -n "$BUILD_AR"; then
46379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46380$as_echo "$BUILD_AR" >&6; }
46381else
46382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46383$as_echo "no" >&6; }
46384fi
46385
46386
46387  test -n "$BUILD_AR" && break
46388done
46389
46390    else
46391      # If it succeeded, then it was overridden by the user. We will use it
46392      # for the tool.
46393
46394      # First remove it from the list of overridden variables, so we can test
46395      # for unknown variables in the end.
46396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46397
46398      # Check if we try to supply an empty value
46399      if test "x$BUILD_AR" = x; then
46400        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46401$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46403$as_echo_n "checking for BUILD_AR... " >&6; }
46404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46405$as_echo "disabled" >&6; }
46406      else
46407        # Check if the provided tool contains a complete path.
46408        tool_specified="$BUILD_AR"
46409        tool_basename="${tool_specified##*/}"
46410        if test "x$tool_basename" = "x$tool_specified"; then
46411          # A command without a complete path is provided, search $PATH.
46412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46413$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46414          # Extract the first word of "$tool_basename", so it can be a program name with args.
46415set dummy $tool_basename; ac_word=$2
46416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46417$as_echo_n "checking for $ac_word... " >&6; }
46418if ${ac_cv_path_BUILD_AR+:} false; then :
46419  $as_echo_n "(cached) " >&6
46420else
46421  case $BUILD_AR in
46422  [\\/]* | ?:[\\/]*)
46423  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46424  ;;
46425  *)
46426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46427for as_dir in $PATH
46428do
46429  IFS=$as_save_IFS
46430  test -z "$as_dir" && as_dir=.
46431    for ac_exec_ext in '' $ac_executable_extensions; do
46432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46433    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46435    break 2
46436  fi
46437done
46438  done
46439IFS=$as_save_IFS
46440
46441  ;;
46442esac
46443fi
46444BUILD_AR=$ac_cv_path_BUILD_AR
46445if test -n "$BUILD_AR"; then
46446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46447$as_echo "$BUILD_AR" >&6; }
46448else
46449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46450$as_echo "no" >&6; }
46451fi
46452
46453
46454          if test "x$BUILD_AR" = x; then
46455            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46456          fi
46457        else
46458          # Otherwise we believe it is a complete path. Use it as it is.
46459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46460$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46461          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46462$as_echo_n "checking for BUILD_AR... " >&6; }
46463          if test ! -x "$tool_specified"; then
46464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46465$as_echo "not found" >&6; }
46466            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46467          fi
46468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46469$as_echo "$tool_specified" >&6; }
46470        fi
46471      fi
46472    fi
46473
46474  fi
46475
46476
46477
46478  # Only process if variable expands to non-empty
46479
46480  if test "x$BUILD_AR" != x; then
46481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46482
46483  # First separate the path from the arguments. This will split at the first
46484  # space.
46485  complete="$BUILD_AR"
46486  path="${complete%% *}"
46487  tmp="$complete EOL"
46488  arguments="${tmp#* }"
46489
46490  # Input might be given as Windows format, start by converting to
46491  # unix format.
46492  new_path=`$CYGPATH -u "$path"`
46493
46494  # Now try to locate executable using which
46495  new_path=`$WHICH "$new_path" 2> /dev/null`
46496  # bat and cmd files are not always considered executable in cygwin causing which
46497  # to not find them
46498  if test "x$new_path" = x \
46499      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46500      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46501    new_path=`$CYGPATH -u "$path"`
46502  fi
46503  if test "x$new_path" = x; then
46504    # Oops. Which didn't find the executable.
46505    # The splitting of arguments from the executable at a space might have been incorrect,
46506    # since paths with space are more likely in Windows. Give it another try with the whole
46507    # argument.
46508    path="$complete"
46509    arguments="EOL"
46510    new_path=`$CYGPATH -u "$path"`
46511    new_path=`$WHICH "$new_path" 2> /dev/null`
46512    # bat and cmd files are not always considered executable in cygwin causing which
46513    # to not find them
46514    if test "x$new_path" = x \
46515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46517      new_path=`$CYGPATH -u "$path"`
46518    fi
46519    if test "x$new_path" = x; then
46520      # It's still not found. Now this is an unrecoverable error.
46521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46522$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46523      has_space=`$ECHO "$complete" | $GREP " "`
46524      if test "x$has_space" != x; then
46525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46527      fi
46528      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46529    fi
46530  fi
46531
46532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46535  # "foo.exe" is OK but "foo" is an error.
46536  #
46537  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46538  # It is also a way to make sure we got the proper file name for the real test later on.
46539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46540  if test "x$test_shortpath" = x; then
46541    # Short path failed, file does not exist as specified.
46542    # Try adding .exe or .cmd
46543    if test -f "${new_path}.exe"; then
46544      input_to_shortpath="${new_path}.exe"
46545    elif test -f "${new_path}.cmd"; then
46546      input_to_shortpath="${new_path}.cmd"
46547    else
46548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46549$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46550      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46551$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46552      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46553    fi
46554  else
46555    input_to_shortpath="$new_path"
46556  fi
46557
46558  # Call helper function which possibly converts this using DOS-style short mode.
46559  # If so, the updated path is stored in $new_path.
46560  new_path="$input_to_shortpath"
46561
46562  input_path="$input_to_shortpath"
46563  # Check if we need to convert this using DOS-style short mode. If the path
46564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46565  # take no chances and rewrite it.
46566  # Note: m4 eats our [], so we need to use [ and ] instead.
46567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46568  if test "x$has_forbidden_chars" != x; then
46569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46573      # Going to short mode and back again did indeed matter. Since short mode is
46574      # case insensitive, let's make it lowercase to improve readability.
46575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46576      # Now convert it back to Unix-style (cygpath)
46577      input_path=`$CYGPATH -u "$shortmode_path"`
46578      new_path="$input_path"
46579    fi
46580  fi
46581
46582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46583  if test "x$test_cygdrive_prefix" = x; then
46584    # As a simple fix, exclude /usr/bin since it's not a real path.
46585    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46587      # a path prefixed by /cygdrive for fixpath to work.
46588      new_path="$CYGWIN_ROOT_PATH$input_path"
46589    fi
46590  fi
46591
46592  # remove trailing .exe if any
46593  new_path="${new_path/%.exe/}"
46594
46595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46596
46597  # First separate the path from the arguments. This will split at the first
46598  # space.
46599  complete="$BUILD_AR"
46600  path="${complete%% *}"
46601  tmp="$complete EOL"
46602  arguments="${tmp#* }"
46603
46604  # Input might be given as Windows format, start by converting to
46605  # unix format.
46606  new_path="$path"
46607
46608  windows_path="$new_path"
46609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46610    unix_path=`$CYGPATH -u "$windows_path"`
46611    new_path="$unix_path"
46612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46614    new_path="$unix_path"
46615  fi
46616
46617
46618  # Now try to locate executable using which
46619  new_path=`$WHICH "$new_path" 2> /dev/null`
46620
46621  if test "x$new_path" = x; then
46622    # Oops. Which didn't find the executable.
46623    # The splitting of arguments from the executable at a space might have been incorrect,
46624    # since paths with space are more likely in Windows. Give it another try with the whole
46625    # argument.
46626    path="$complete"
46627    arguments="EOL"
46628    new_path="$path"
46629
46630  windows_path="$new_path"
46631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46632    unix_path=`$CYGPATH -u "$windows_path"`
46633    new_path="$unix_path"
46634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46636    new_path="$unix_path"
46637  fi
46638
46639
46640    new_path=`$WHICH "$new_path" 2> /dev/null`
46641    # bat and cmd files are not always considered executable in MSYS causing which
46642    # to not find them
46643    if test "x$new_path" = x \
46644        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46645        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46646      new_path="$path"
46647
46648  windows_path="$new_path"
46649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46650    unix_path=`$CYGPATH -u "$windows_path"`
46651    new_path="$unix_path"
46652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46654    new_path="$unix_path"
46655  fi
46656
46657    fi
46658
46659    if test "x$new_path" = x; then
46660      # It's still not found. Now this is an unrecoverable error.
46661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46662$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46663      has_space=`$ECHO "$complete" | $GREP " "`
46664      if test "x$has_space" != x; then
46665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46667      fi
46668      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46669    fi
46670  fi
46671
46672  # Now new_path has a complete unix path to the binary
46673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46674    # Keep paths in /bin as-is, but remove trailing .exe if any
46675    new_path="${new_path/%.exe/}"
46676    # Do not save /bin paths to all_fixpath_prefixes!
46677  else
46678    # Not in mixed or Windows style, start by that.
46679    new_path=`cmd //c echo $new_path`
46680
46681  input_path="$new_path"
46682  # Check if we need to convert this using DOS-style short mode. If the path
46683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46684  # take no chances and rewrite it.
46685  # Note: m4 eats our [], so we need to use [ and ] instead.
46686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46687  if test "x$has_forbidden_chars" != x; then
46688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46690  fi
46691
46692    # Output is in $new_path
46693
46694  windows_path="$new_path"
46695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46696    unix_path=`$CYGPATH -u "$windows_path"`
46697    new_path="$unix_path"
46698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46700    new_path="$unix_path"
46701  fi
46702
46703    # remove trailing .exe if any
46704    new_path="${new_path/%.exe/}"
46705
46706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46708  fi
46709
46710    else
46711      # We're on a unix platform. Hooray! :)
46712      # First separate the path from the arguments. This will split at the first
46713      # space.
46714      complete="$BUILD_AR"
46715      path="${complete%% *}"
46716      tmp="$complete EOL"
46717      arguments="${tmp#* }"
46718
46719      # Cannot rely on the command "which" here since it doesn't always work.
46720      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46721      if test -z "$is_absolute_path"; then
46722        # Path to executable is not absolute. Find it.
46723        IFS_save="$IFS"
46724        IFS=:
46725        for p in $PATH; do
46726          if test -f "$p/$path" && test -x "$p/$path"; then
46727            new_path="$p/$path"
46728            break
46729          fi
46730        done
46731        IFS="$IFS_save"
46732      else
46733        # This is an absolute path, we can use it without further modifications.
46734        new_path="$path"
46735      fi
46736
46737      if test "x$new_path" = x; then
46738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46739$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46740        has_space=`$ECHO "$complete" | $GREP " "`
46741        if test "x$has_space" != x; then
46742          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46743$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46744        fi
46745        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46746      fi
46747    fi
46748
46749    # Now join together the path and the arguments once again
46750    if test "x$arguments" != xEOL; then
46751      new_complete="$new_path ${arguments% *}"
46752    else
46753      new_complete="$new_path"
46754    fi
46755
46756    if test "x$complete" != "x$new_complete"; then
46757      BUILD_AR="$new_complete"
46758      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46759$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46760    fi
46761  fi
46762
46763
46764
46765  # Publish this variable in the help.
46766
46767
46768  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46769    # The variable is not set by user, try to locate tool using the code snippet
46770    for ac_prog in objcopy
46771do
46772  # Extract the first word of "$ac_prog", so it can be a program name with args.
46773set dummy $ac_prog; ac_word=$2
46774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46775$as_echo_n "checking for $ac_word... " >&6; }
46776if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46777  $as_echo_n "(cached) " >&6
46778else
46779  case $BUILD_OBJCOPY in
46780  [\\/]* | ?:[\\/]*)
46781  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46782  ;;
46783  *)
46784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46785for as_dir in $PATH
46786do
46787  IFS=$as_save_IFS
46788  test -z "$as_dir" && as_dir=.
46789    for ac_exec_ext in '' $ac_executable_extensions; do
46790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46791    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46793    break 2
46794  fi
46795done
46796  done
46797IFS=$as_save_IFS
46798
46799  ;;
46800esac
46801fi
46802BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46803if test -n "$BUILD_OBJCOPY"; then
46804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46805$as_echo "$BUILD_OBJCOPY" >&6; }
46806else
46807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46808$as_echo "no" >&6; }
46809fi
46810
46811
46812  test -n "$BUILD_OBJCOPY" && break
46813done
46814
46815  else
46816    # The variable is set, but is it from the command line or the environment?
46817
46818    # Try to remove the string !BUILD_OBJCOPY! from our list.
46819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46821      # If it failed, the variable was not from the command line. Ignore it,
46822      # but warn the user (except for BASH, which is always set by the calling BASH).
46823      if test "xBUILD_OBJCOPY" != xBASH; then
46824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46825$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46826      fi
46827      # Try to locate tool using the code snippet
46828      for ac_prog in objcopy
46829do
46830  # Extract the first word of "$ac_prog", so it can be a program name with args.
46831set dummy $ac_prog; ac_word=$2
46832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46833$as_echo_n "checking for $ac_word... " >&6; }
46834if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46835  $as_echo_n "(cached) " >&6
46836else
46837  case $BUILD_OBJCOPY in
46838  [\\/]* | ?:[\\/]*)
46839  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46840  ;;
46841  *)
46842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46843for as_dir in $PATH
46844do
46845  IFS=$as_save_IFS
46846  test -z "$as_dir" && as_dir=.
46847    for ac_exec_ext in '' $ac_executable_extensions; do
46848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46849    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46851    break 2
46852  fi
46853done
46854  done
46855IFS=$as_save_IFS
46856
46857  ;;
46858esac
46859fi
46860BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46861if test -n "$BUILD_OBJCOPY"; then
46862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46863$as_echo "$BUILD_OBJCOPY" >&6; }
46864else
46865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46866$as_echo "no" >&6; }
46867fi
46868
46869
46870  test -n "$BUILD_OBJCOPY" && break
46871done
46872
46873    else
46874      # If it succeeded, then it was overridden by the user. We will use it
46875      # for the tool.
46876
46877      # First remove it from the list of overridden variables, so we can test
46878      # for unknown variables in the end.
46879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46880
46881      # Check if we try to supply an empty value
46882      if test "x$BUILD_OBJCOPY" = x; then
46883        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46884$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46886$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46888$as_echo "disabled" >&6; }
46889      else
46890        # Check if the provided tool contains a complete path.
46891        tool_specified="$BUILD_OBJCOPY"
46892        tool_basename="${tool_specified##*/}"
46893        if test "x$tool_basename" = "x$tool_specified"; then
46894          # A command without a complete path is provided, search $PATH.
46895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46896$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46897          # Extract the first word of "$tool_basename", so it can be a program name with args.
46898set dummy $tool_basename; ac_word=$2
46899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46900$as_echo_n "checking for $ac_word... " >&6; }
46901if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46902  $as_echo_n "(cached) " >&6
46903else
46904  case $BUILD_OBJCOPY in
46905  [\\/]* | ?:[\\/]*)
46906  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46907  ;;
46908  *)
46909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46910for as_dir in $PATH
46911do
46912  IFS=$as_save_IFS
46913  test -z "$as_dir" && as_dir=.
46914    for ac_exec_ext in '' $ac_executable_extensions; do
46915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46916    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46918    break 2
46919  fi
46920done
46921  done
46922IFS=$as_save_IFS
46923
46924  ;;
46925esac
46926fi
46927BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46928if test -n "$BUILD_OBJCOPY"; then
46929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46930$as_echo "$BUILD_OBJCOPY" >&6; }
46931else
46932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46933$as_echo "no" >&6; }
46934fi
46935
46936
46937          if test "x$BUILD_OBJCOPY" = x; then
46938            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46939          fi
46940        else
46941          # Otherwise we believe it is a complete path. Use it as it is.
46942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46943$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46944          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46945$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46946          if test ! -x "$tool_specified"; then
46947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46948$as_echo "not found" >&6; }
46949            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46950          fi
46951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46952$as_echo "$tool_specified" >&6; }
46953        fi
46954      fi
46955    fi
46956
46957  fi
46958
46959
46960
46961  # Only process if variable expands to non-empty
46962
46963  if test "x$BUILD_OBJCOPY" != x; then
46964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46965
46966  # First separate the path from the arguments. This will split at the first
46967  # space.
46968  complete="$BUILD_OBJCOPY"
46969  path="${complete%% *}"
46970  tmp="$complete EOL"
46971  arguments="${tmp#* }"
46972
46973  # Input might be given as Windows format, start by converting to
46974  # unix format.
46975  new_path=`$CYGPATH -u "$path"`
46976
46977  # Now try to locate executable using which
46978  new_path=`$WHICH "$new_path" 2> /dev/null`
46979  # bat and cmd files are not always considered executable in cygwin causing which
46980  # to not find them
46981  if test "x$new_path" = x \
46982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46984    new_path=`$CYGPATH -u "$path"`
46985  fi
46986  if test "x$new_path" = x; then
46987    # Oops. Which didn't find the executable.
46988    # The splitting of arguments from the executable at a space might have been incorrect,
46989    # since paths with space are more likely in Windows. Give it another try with the whole
46990    # argument.
46991    path="$complete"
46992    arguments="EOL"
46993    new_path=`$CYGPATH -u "$path"`
46994    new_path=`$WHICH "$new_path" 2> /dev/null`
46995    # bat and cmd files are not always considered executable in cygwin causing which
46996    # to not find them
46997    if test "x$new_path" = x \
46998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47000      new_path=`$CYGPATH -u "$path"`
47001    fi
47002    if test "x$new_path" = x; then
47003      # It's still not found. Now this is an unrecoverable error.
47004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47005$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47006      has_space=`$ECHO "$complete" | $GREP " "`
47007      if test "x$has_space" != x; then
47008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47010      fi
47011      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47012    fi
47013  fi
47014
47015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47018  # "foo.exe" is OK but "foo" is an error.
47019  #
47020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47021  # It is also a way to make sure we got the proper file name for the real test later on.
47022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47023  if test "x$test_shortpath" = x; then
47024    # Short path failed, file does not exist as specified.
47025    # Try adding .exe or .cmd
47026    if test -f "${new_path}.exe"; then
47027      input_to_shortpath="${new_path}.exe"
47028    elif test -f "${new_path}.cmd"; then
47029      input_to_shortpath="${new_path}.cmd"
47030    else
47031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47032$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47035      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47036    fi
47037  else
47038    input_to_shortpath="$new_path"
47039  fi
47040
47041  # Call helper function which possibly converts this using DOS-style short mode.
47042  # If so, the updated path is stored in $new_path.
47043  new_path="$input_to_shortpath"
47044
47045  input_path="$input_to_shortpath"
47046  # Check if we need to convert this using DOS-style short mode. If the path
47047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47048  # take no chances and rewrite it.
47049  # Note: m4 eats our [], so we need to use [ and ] instead.
47050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47051  if test "x$has_forbidden_chars" != x; then
47052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47056      # Going to short mode and back again did indeed matter. Since short mode is
47057      # case insensitive, let's make it lowercase to improve readability.
47058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47059      # Now convert it back to Unix-style (cygpath)
47060      input_path=`$CYGPATH -u "$shortmode_path"`
47061      new_path="$input_path"
47062    fi
47063  fi
47064
47065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47066  if test "x$test_cygdrive_prefix" = x; then
47067    # As a simple fix, exclude /usr/bin since it's not a real path.
47068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47070      # a path prefixed by /cygdrive for fixpath to work.
47071      new_path="$CYGWIN_ROOT_PATH$input_path"
47072    fi
47073  fi
47074
47075  # remove trailing .exe if any
47076  new_path="${new_path/%.exe/}"
47077
47078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47079
47080  # First separate the path from the arguments. This will split at the first
47081  # space.
47082  complete="$BUILD_OBJCOPY"
47083  path="${complete%% *}"
47084  tmp="$complete EOL"
47085  arguments="${tmp#* }"
47086
47087  # Input might be given as Windows format, start by converting to
47088  # unix format.
47089  new_path="$path"
47090
47091  windows_path="$new_path"
47092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47093    unix_path=`$CYGPATH -u "$windows_path"`
47094    new_path="$unix_path"
47095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47097    new_path="$unix_path"
47098  fi
47099
47100
47101  # Now try to locate executable using which
47102  new_path=`$WHICH "$new_path" 2> /dev/null`
47103
47104  if test "x$new_path" = x; then
47105    # Oops. Which didn't find the executable.
47106    # The splitting of arguments from the executable at a space might have been incorrect,
47107    # since paths with space are more likely in Windows. Give it another try with the whole
47108    # argument.
47109    path="$complete"
47110    arguments="EOL"
47111    new_path="$path"
47112
47113  windows_path="$new_path"
47114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47115    unix_path=`$CYGPATH -u "$windows_path"`
47116    new_path="$unix_path"
47117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47119    new_path="$unix_path"
47120  fi
47121
47122
47123    new_path=`$WHICH "$new_path" 2> /dev/null`
47124    # bat and cmd files are not always considered executable in MSYS causing which
47125    # to not find them
47126    if test "x$new_path" = x \
47127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47129      new_path="$path"
47130
47131  windows_path="$new_path"
47132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47133    unix_path=`$CYGPATH -u "$windows_path"`
47134    new_path="$unix_path"
47135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47137    new_path="$unix_path"
47138  fi
47139
47140    fi
47141
47142    if test "x$new_path" = x; then
47143      # It's still not found. Now this is an unrecoverable error.
47144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47145$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47146      has_space=`$ECHO "$complete" | $GREP " "`
47147      if test "x$has_space" != x; then
47148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47150      fi
47151      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47152    fi
47153  fi
47154
47155  # Now new_path has a complete unix path to the binary
47156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47157    # Keep paths in /bin as-is, but remove trailing .exe if any
47158    new_path="${new_path/%.exe/}"
47159    # Do not save /bin paths to all_fixpath_prefixes!
47160  else
47161    # Not in mixed or Windows style, start by that.
47162    new_path=`cmd //c echo $new_path`
47163
47164  input_path="$new_path"
47165  # Check if we need to convert this using DOS-style short mode. If the path
47166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47167  # take no chances and rewrite it.
47168  # Note: m4 eats our [], so we need to use [ and ] instead.
47169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47170  if test "x$has_forbidden_chars" != x; then
47171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47173  fi
47174
47175    # Output is in $new_path
47176
47177  windows_path="$new_path"
47178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47179    unix_path=`$CYGPATH -u "$windows_path"`
47180    new_path="$unix_path"
47181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47183    new_path="$unix_path"
47184  fi
47185
47186    # remove trailing .exe if any
47187    new_path="${new_path/%.exe/}"
47188
47189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47191  fi
47192
47193    else
47194      # We're on a unix platform. Hooray! :)
47195      # First separate the path from the arguments. This will split at the first
47196      # space.
47197      complete="$BUILD_OBJCOPY"
47198      path="${complete%% *}"
47199      tmp="$complete EOL"
47200      arguments="${tmp#* }"
47201
47202      # Cannot rely on the command "which" here since it doesn't always work.
47203      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47204      if test -z "$is_absolute_path"; then
47205        # Path to executable is not absolute. Find it.
47206        IFS_save="$IFS"
47207        IFS=:
47208        for p in $PATH; do
47209          if test -f "$p/$path" && test -x "$p/$path"; then
47210            new_path="$p/$path"
47211            break
47212          fi
47213        done
47214        IFS="$IFS_save"
47215      else
47216        # This is an absolute path, we can use it without further modifications.
47217        new_path="$path"
47218      fi
47219
47220      if test "x$new_path" = x; then
47221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47222$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47223        has_space=`$ECHO "$complete" | $GREP " "`
47224        if test "x$has_space" != x; then
47225          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47227        fi
47228        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47229      fi
47230    fi
47231
47232    # Now join together the path and the arguments once again
47233    if test "x$arguments" != xEOL; then
47234      new_complete="$new_path ${arguments% *}"
47235    else
47236      new_complete="$new_path"
47237    fi
47238
47239    if test "x$complete" != "x$new_complete"; then
47240      BUILD_OBJCOPY="$new_complete"
47241      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47242$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47243    fi
47244  fi
47245
47246
47247
47248  # Publish this variable in the help.
47249
47250
47251  if [ -z "${BUILD_STRIP+x}" ]; then
47252    # The variable is not set by user, try to locate tool using the code snippet
47253    for ac_prog in strip
47254do
47255  # Extract the first word of "$ac_prog", so it can be a program name with args.
47256set dummy $ac_prog; ac_word=$2
47257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47258$as_echo_n "checking for $ac_word... " >&6; }
47259if ${ac_cv_path_BUILD_STRIP+:} false; then :
47260  $as_echo_n "(cached) " >&6
47261else
47262  case $BUILD_STRIP in
47263  [\\/]* | ?:[\\/]*)
47264  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47265  ;;
47266  *)
47267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47268for as_dir in $PATH
47269do
47270  IFS=$as_save_IFS
47271  test -z "$as_dir" && as_dir=.
47272    for ac_exec_ext in '' $ac_executable_extensions; do
47273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47274    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47276    break 2
47277  fi
47278done
47279  done
47280IFS=$as_save_IFS
47281
47282  ;;
47283esac
47284fi
47285BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47286if test -n "$BUILD_STRIP"; then
47287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47288$as_echo "$BUILD_STRIP" >&6; }
47289else
47290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47291$as_echo "no" >&6; }
47292fi
47293
47294
47295  test -n "$BUILD_STRIP" && break
47296done
47297
47298  else
47299    # The variable is set, but is it from the command line or the environment?
47300
47301    # Try to remove the string !BUILD_STRIP! from our list.
47302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47304      # If it failed, the variable was not from the command line. Ignore it,
47305      # but warn the user (except for BASH, which is always set by the calling BASH).
47306      if test "xBUILD_STRIP" != xBASH; then
47307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47308$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47309      fi
47310      # Try to locate tool using the code snippet
47311      for ac_prog in strip
47312do
47313  # Extract the first word of "$ac_prog", so it can be a program name with args.
47314set dummy $ac_prog; ac_word=$2
47315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47316$as_echo_n "checking for $ac_word... " >&6; }
47317if ${ac_cv_path_BUILD_STRIP+:} false; then :
47318  $as_echo_n "(cached) " >&6
47319else
47320  case $BUILD_STRIP in
47321  [\\/]* | ?:[\\/]*)
47322  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47323  ;;
47324  *)
47325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47326for as_dir in $PATH
47327do
47328  IFS=$as_save_IFS
47329  test -z "$as_dir" && as_dir=.
47330    for ac_exec_ext in '' $ac_executable_extensions; do
47331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47332    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47334    break 2
47335  fi
47336done
47337  done
47338IFS=$as_save_IFS
47339
47340  ;;
47341esac
47342fi
47343BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47344if test -n "$BUILD_STRIP"; then
47345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47346$as_echo "$BUILD_STRIP" >&6; }
47347else
47348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47349$as_echo "no" >&6; }
47350fi
47351
47352
47353  test -n "$BUILD_STRIP" && break
47354done
47355
47356    else
47357      # If it succeeded, then it was overridden by the user. We will use it
47358      # for the tool.
47359
47360      # First remove it from the list of overridden variables, so we can test
47361      # for unknown variables in the end.
47362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47363
47364      # Check if we try to supply an empty value
47365      if test "x$BUILD_STRIP" = x; then
47366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47367$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47369$as_echo_n "checking for BUILD_STRIP... " >&6; }
47370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47371$as_echo "disabled" >&6; }
47372      else
47373        # Check if the provided tool contains a complete path.
47374        tool_specified="$BUILD_STRIP"
47375        tool_basename="${tool_specified##*/}"
47376        if test "x$tool_basename" = "x$tool_specified"; then
47377          # A command without a complete path is provided, search $PATH.
47378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47379$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47380          # Extract the first word of "$tool_basename", so it can be a program name with args.
47381set dummy $tool_basename; ac_word=$2
47382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47383$as_echo_n "checking for $ac_word... " >&6; }
47384if ${ac_cv_path_BUILD_STRIP+:} false; then :
47385  $as_echo_n "(cached) " >&6
47386else
47387  case $BUILD_STRIP in
47388  [\\/]* | ?:[\\/]*)
47389  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47390  ;;
47391  *)
47392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47393for as_dir in $PATH
47394do
47395  IFS=$as_save_IFS
47396  test -z "$as_dir" && as_dir=.
47397    for ac_exec_ext in '' $ac_executable_extensions; do
47398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47399    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47401    break 2
47402  fi
47403done
47404  done
47405IFS=$as_save_IFS
47406
47407  ;;
47408esac
47409fi
47410BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47411if test -n "$BUILD_STRIP"; then
47412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47413$as_echo "$BUILD_STRIP" >&6; }
47414else
47415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47416$as_echo "no" >&6; }
47417fi
47418
47419
47420          if test "x$BUILD_STRIP" = x; then
47421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47422          fi
47423        else
47424          # Otherwise we believe it is a complete path. Use it as it is.
47425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47426$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47428$as_echo_n "checking for BUILD_STRIP... " >&6; }
47429          if test ! -x "$tool_specified"; then
47430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47431$as_echo "not found" >&6; }
47432            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47433          fi
47434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47435$as_echo "$tool_specified" >&6; }
47436        fi
47437      fi
47438    fi
47439
47440  fi
47441
47442
47443
47444  # Only process if variable expands to non-empty
47445
47446  if test "x$BUILD_STRIP" != x; then
47447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47448
47449  # First separate the path from the arguments. This will split at the first
47450  # space.
47451  complete="$BUILD_STRIP"
47452  path="${complete%% *}"
47453  tmp="$complete EOL"
47454  arguments="${tmp#* }"
47455
47456  # Input might be given as Windows format, start by converting to
47457  # unix format.
47458  new_path=`$CYGPATH -u "$path"`
47459
47460  # Now try to locate executable using which
47461  new_path=`$WHICH "$new_path" 2> /dev/null`
47462  # bat and cmd files are not always considered executable in cygwin causing which
47463  # to not find them
47464  if test "x$new_path" = x \
47465      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47466      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47467    new_path=`$CYGPATH -u "$path"`
47468  fi
47469  if test "x$new_path" = x; then
47470    # Oops. Which didn't find the executable.
47471    # The splitting of arguments from the executable at a space might have been incorrect,
47472    # since paths with space are more likely in Windows. Give it another try with the whole
47473    # argument.
47474    path="$complete"
47475    arguments="EOL"
47476    new_path=`$CYGPATH -u "$path"`
47477    new_path=`$WHICH "$new_path" 2> /dev/null`
47478    # bat and cmd files are not always considered executable in cygwin causing which
47479    # to not find them
47480    if test "x$new_path" = x \
47481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47483      new_path=`$CYGPATH -u "$path"`
47484    fi
47485    if test "x$new_path" = x; then
47486      # It's still not found. Now this is an unrecoverable error.
47487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47488$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47489      has_space=`$ECHO "$complete" | $GREP " "`
47490      if test "x$has_space" != x; then
47491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47493      fi
47494      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47495    fi
47496  fi
47497
47498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47501  # "foo.exe" is OK but "foo" is an error.
47502  #
47503  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47504  # It is also a way to make sure we got the proper file name for the real test later on.
47505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47506  if test "x$test_shortpath" = x; then
47507    # Short path failed, file does not exist as specified.
47508    # Try adding .exe or .cmd
47509    if test -f "${new_path}.exe"; then
47510      input_to_shortpath="${new_path}.exe"
47511    elif test -f "${new_path}.cmd"; then
47512      input_to_shortpath="${new_path}.cmd"
47513    else
47514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47515$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47516      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47517$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47518      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47519    fi
47520  else
47521    input_to_shortpath="$new_path"
47522  fi
47523
47524  # Call helper function which possibly converts this using DOS-style short mode.
47525  # If so, the updated path is stored in $new_path.
47526  new_path="$input_to_shortpath"
47527
47528  input_path="$input_to_shortpath"
47529  # Check if we need to convert this using DOS-style short mode. If the path
47530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47531  # take no chances and rewrite it.
47532  # Note: m4 eats our [], so we need to use [ and ] instead.
47533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47534  if test "x$has_forbidden_chars" != x; then
47535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47539      # Going to short mode and back again did indeed matter. Since short mode is
47540      # case insensitive, let's make it lowercase to improve readability.
47541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47542      # Now convert it back to Unix-style (cygpath)
47543      input_path=`$CYGPATH -u "$shortmode_path"`
47544      new_path="$input_path"
47545    fi
47546  fi
47547
47548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47549  if test "x$test_cygdrive_prefix" = x; then
47550    # As a simple fix, exclude /usr/bin since it's not a real path.
47551    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47553      # a path prefixed by /cygdrive for fixpath to work.
47554      new_path="$CYGWIN_ROOT_PATH$input_path"
47555    fi
47556  fi
47557
47558  # remove trailing .exe if any
47559  new_path="${new_path/%.exe/}"
47560
47561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47562
47563  # First separate the path from the arguments. This will split at the first
47564  # space.
47565  complete="$BUILD_STRIP"
47566  path="${complete%% *}"
47567  tmp="$complete EOL"
47568  arguments="${tmp#* }"
47569
47570  # Input might be given as Windows format, start by converting to
47571  # unix format.
47572  new_path="$path"
47573
47574  windows_path="$new_path"
47575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47576    unix_path=`$CYGPATH -u "$windows_path"`
47577    new_path="$unix_path"
47578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47580    new_path="$unix_path"
47581  fi
47582
47583
47584  # Now try to locate executable using which
47585  new_path=`$WHICH "$new_path" 2> /dev/null`
47586
47587  if test "x$new_path" = x; then
47588    # Oops. Which didn't find the executable.
47589    # The splitting of arguments from the executable at a space might have been incorrect,
47590    # since paths with space are more likely in Windows. Give it another try with the whole
47591    # argument.
47592    path="$complete"
47593    arguments="EOL"
47594    new_path="$path"
47595
47596  windows_path="$new_path"
47597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47598    unix_path=`$CYGPATH -u "$windows_path"`
47599    new_path="$unix_path"
47600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47602    new_path="$unix_path"
47603  fi
47604
47605
47606    new_path=`$WHICH "$new_path" 2> /dev/null`
47607    # bat and cmd files are not always considered executable in MSYS causing which
47608    # to not find them
47609    if test "x$new_path" = x \
47610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47612      new_path="$path"
47613
47614  windows_path="$new_path"
47615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47616    unix_path=`$CYGPATH -u "$windows_path"`
47617    new_path="$unix_path"
47618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47620    new_path="$unix_path"
47621  fi
47622
47623    fi
47624
47625    if test "x$new_path" = x; then
47626      # It's still not found. Now this is an unrecoverable error.
47627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47628$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47629      has_space=`$ECHO "$complete" | $GREP " "`
47630      if test "x$has_space" != x; then
47631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47633      fi
47634      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47635    fi
47636  fi
47637
47638  # Now new_path has a complete unix path to the binary
47639  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47640    # Keep paths in /bin as-is, but remove trailing .exe if any
47641    new_path="${new_path/%.exe/}"
47642    # Do not save /bin paths to all_fixpath_prefixes!
47643  else
47644    # Not in mixed or Windows style, start by that.
47645    new_path=`cmd //c echo $new_path`
47646
47647  input_path="$new_path"
47648  # Check if we need to convert this using DOS-style short mode. If the path
47649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47650  # take no chances and rewrite it.
47651  # Note: m4 eats our [], so we need to use [ and ] instead.
47652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47653  if test "x$has_forbidden_chars" != x; then
47654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47656  fi
47657
47658    # Output is in $new_path
47659
47660  windows_path="$new_path"
47661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47662    unix_path=`$CYGPATH -u "$windows_path"`
47663    new_path="$unix_path"
47664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47666    new_path="$unix_path"
47667  fi
47668
47669    # remove trailing .exe if any
47670    new_path="${new_path/%.exe/}"
47671
47672    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47673    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47674  fi
47675
47676    else
47677      # We're on a unix platform. Hooray! :)
47678      # First separate the path from the arguments. This will split at the first
47679      # space.
47680      complete="$BUILD_STRIP"
47681      path="${complete%% *}"
47682      tmp="$complete EOL"
47683      arguments="${tmp#* }"
47684
47685      # Cannot rely on the command "which" here since it doesn't always work.
47686      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47687      if test -z "$is_absolute_path"; then
47688        # Path to executable is not absolute. Find it.
47689        IFS_save="$IFS"
47690        IFS=:
47691        for p in $PATH; do
47692          if test -f "$p/$path" && test -x "$p/$path"; then
47693            new_path="$p/$path"
47694            break
47695          fi
47696        done
47697        IFS="$IFS_save"
47698      else
47699        # This is an absolute path, we can use it without further modifications.
47700        new_path="$path"
47701      fi
47702
47703      if test "x$new_path" = x; then
47704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47705$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47706        has_space=`$ECHO "$complete" | $GREP " "`
47707        if test "x$has_space" != x; then
47708          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47709$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47710        fi
47711        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47712      fi
47713    fi
47714
47715    # Now join together the path and the arguments once again
47716    if test "x$arguments" != xEOL; then
47717      new_complete="$new_path ${arguments% *}"
47718    else
47719      new_complete="$new_path"
47720    fi
47721
47722    if test "x$complete" != "x$new_complete"; then
47723      BUILD_STRIP="$new_complete"
47724      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47725$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47726    fi
47727  fi
47728
47729    # Assume the C compiler is the assembler
47730    BUILD_AS="$BUILD_CC -c"
47731    # Just like for the target compiler, use the compiler as linker
47732    BUILD_LD="$BUILD_CC"
47733    BUILD_LDCXX="$BUILD_CXX"
47734
47735    PATH="$OLDPATH"
47736
47737
47738  COMPILER=$BUILD_CC
47739  COMPILER_NAME=BuildC
47740
47741  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47742    # cc -V output typically looks like
47743    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47744    # or
47745    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47746    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47747    # Check that this is likely to be the Solaris Studio cc.
47748    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47749    if test $? -ne 0; then
47750      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47751      { $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
47752$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47753      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47754$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47755      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47756$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47757      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47758    fi
47759    # Remove usage instructions (if present), and
47760    # collapse compiler output into a single line
47761    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47762        $SED -e 's/ *[Uu]sage:.*//'`
47763    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47764        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47765  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47766    # xlc -qversion output typically looks like
47767    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47768    #     Version: 11.01.0000.0015
47769    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47770    # Check that this is likely to be the IBM XL C compiler.
47771    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47772    if test $? -ne 0; then
47773      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47774      { $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
47775$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47776      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47777$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47778      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47779$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47780      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47781    fi
47782    # Collapse compiler output into a single line
47783    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47784    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47785        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47786  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47787    # There is no specific version flag, but all output starts with a version string.
47788    # First line typically looks something like:
47789    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47790    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47791    # Check that this is likely to be Microsoft CL.EXE.
47792    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47793    if test $? -ne 0; then
47794      { $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
47795$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47796      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47797$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47798      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47799    fi
47800    # Collapse compiler output into a single line
47801    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47802    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47803        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47804  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47805    # gcc --version output typically looks like
47806    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47807    #     Copyright (C) 2013 Free Software Foundation, Inc.
47808    #     This is free software; see the source for copying conditions.  There is NO
47809    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47810    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47811    # Check that this is likely to be GCC.
47812    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47813    if test $? -ne 0; then
47814      { $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
47815$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47816      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47817$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47818      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47819    fi
47820    # Remove Copyright and legalese from version string, and
47821    # collapse into a single line
47822    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47823        $SED -e 's/ *Copyright .*//'`
47824    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47825        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47826  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47827    # clang --version output typically looks like
47828    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47829    #    clang version 3.3 (tags/RELEASE_33/final)
47830    # or
47831    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47832    #    Target: x86_64-pc-linux-gnu
47833    #    Thread model: posix
47834    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47835    # Check that this is likely to be clang
47836    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47837    if test $? -ne 0; then
47838      { $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
47839$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47840      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47841$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47842      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47843    fi
47844    # Collapse compiler output into a single line
47845    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47846    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47847        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47848  else
47849      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47850  fi
47851  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47852  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47853  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47854  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47855
47856  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47857$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47858
47859
47860  COMPILER=$BUILD_CXX
47861  COMPILER_NAME=BuildC++
47862
47863  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47864    # cc -V output typically looks like
47865    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47866    # or
47867    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47868    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47869    # Check that this is likely to be the Solaris Studio cc.
47870    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47871    if test $? -ne 0; then
47872      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47873      { $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
47874$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47875      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47876$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47877      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47878$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47879      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47880    fi
47881    # Remove usage instructions (if present), and
47882    # collapse compiler output into a single line
47883    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47884        $SED -e 's/ *[Uu]sage:.*//'`
47885    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47886        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47887  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47888    # xlc -qversion output typically looks like
47889    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47890    #     Version: 11.01.0000.0015
47891    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47892    # Check that this is likely to be the IBM XL C compiler.
47893    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47894    if test $? -ne 0; then
47895      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47896      { $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
47897$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47898      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47899$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47900      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47901$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47902      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47903    fi
47904    # Collapse compiler output into a single line
47905    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47906    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47907        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47908  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47909    # There is no specific version flag, but all output starts with a version string.
47910    # First line typically looks something like:
47911    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47912    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47913    # Check that this is likely to be Microsoft CL.EXE.
47914    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47915    if test $? -ne 0; then
47916      { $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
47917$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47918      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47919$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47920      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47921    fi
47922    # Collapse compiler output into a single line
47923    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47924    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47925        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47926  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47927    # gcc --version output typically looks like
47928    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47929    #     Copyright (C) 2013 Free Software Foundation, Inc.
47930    #     This is free software; see the source for copying conditions.  There is NO
47931    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47932    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47933    # Check that this is likely to be GCC.
47934    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47935    if test $? -ne 0; then
47936      { $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
47937$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47938      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47939$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47940      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47941    fi
47942    # Remove Copyright and legalese from version string, and
47943    # collapse into a single line
47944    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47945        $SED -e 's/ *Copyright .*//'`
47946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47947        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47948  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47949    # clang --version output typically looks like
47950    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47951    #    clang version 3.3 (tags/RELEASE_33/final)
47952    # or
47953    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47954    #    Target: x86_64-pc-linux-gnu
47955    #    Thread model: posix
47956    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47957    # Check that this is likely to be clang
47958    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47959    if test $? -ne 0; then
47960      { $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
47961$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47962      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47963$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47964      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47965    fi
47966    # Collapse compiler output into a single line
47967    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47968    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47969        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47970  else
47971      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47972  fi
47973  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47974  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47975  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47976  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47977
47978  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47979$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47980
47981
47982  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47983    { $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
47984$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47985    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47986$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47987  fi
47988
47989  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47990  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47991    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47992$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47993  fi
47994
47995  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47996    { $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
47997$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47998  fi
47999
48000  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48001
48002  else
48003    # If we are not cross compiling, use the normal target compilers for
48004    # building the build platform executables.
48005    BUILD_CC="$CC"
48006    BUILD_CXX="$CXX"
48007    BUILD_LD="$LD"
48008    BUILD_LDCXX="$LDCXX"
48009    BUILD_NM="$NM"
48010    BUILD_AS="$AS"
48011    BUILD_OBJCOPY="$OBJCOPY"
48012    BUILD_STRIP="$STRIP"
48013    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48014    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48015    BUILD_AR="$AR"
48016
48017
48018  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48019    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48020$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48021    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48022$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48023  fi
48024
48025  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48026  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48027    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48028$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48029  fi
48030
48031  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48032    { $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
48033$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48034  fi
48035
48036  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48037
48038  fi
48039
48040
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053  # The package path is used only on macosx?
48054  # FIXME: clean this up, and/or move it elsewhere.
48055  PACKAGE_PATH=/opt/local
48056
48057
48058  # Check for extra potential brokenness.
48059  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48060    # On Windows, double-check that we got the right compiler.
48061    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48062    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48063    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48064      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48065        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
48066      fi
48067    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48068      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48069        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48070      fi
48071    fi
48072  fi
48073
48074  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48075    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48076    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48077    # This is later checked when setting flags.
48078
48079    # "-Og" suppported for GCC 4.8 and later
48080    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128    # Execute function body
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164
48165
48166
48167
48168
48169
48170
48171
48172
48173
48174
48175
48176
48177    # Execute function body
48178
48179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48180$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48181  supports=yes
48182
48183  saved_cflags="$CFLAGS"
48184  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48185  ac_ext=c
48186ac_cpp='$CPP $CPPFLAGS'
48187ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48188ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48189ac_compiler_gnu=$ac_cv_c_compiler_gnu
48190
48191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48192/* end confdefs.h.  */
48193int i;
48194_ACEOF
48195if ac_fn_c_try_compile "$LINENO"; then :
48196
48197else
48198  supports=no
48199fi
48200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48201  ac_ext=cpp
48202ac_cpp='$CXXCPP $CPPFLAGS'
48203ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48204ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48205ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48206
48207  CFLAGS="$saved_cflags"
48208
48209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48210$as_echo "$supports" >&6; }
48211  if test "x$supports" = "xyes" ; then
48212    :
48213    C_COMP_SUPPORTS="yes"
48214  else
48215    :
48216    C_COMP_SUPPORTS="no"
48217  fi
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277    # Execute function body
48278
48279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48280$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48281  supports=yes
48282
48283  saved_cxxflags="$CXXFLAGS"
48284  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48285  ac_ext=cpp
48286ac_cpp='$CXXCPP $CPPFLAGS'
48287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48290
48291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48292/* end confdefs.h.  */
48293int i;
48294_ACEOF
48295if ac_fn_cxx_try_compile "$LINENO"; then :
48296
48297else
48298  supports=no
48299fi
48300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48301  ac_ext=cpp
48302ac_cpp='$CXXCPP $CPPFLAGS'
48303ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48304ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48305ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48306
48307  CXXFLAGS="$saved_cxxflags"
48308
48309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48310$as_echo "$supports" >&6; }
48311  if test "x$supports" = "xyes" ; then
48312    :
48313    CXX_COMP_SUPPORTS="yes"
48314  else
48315    :
48316    CXX_COMP_SUPPORTS="no"
48317  fi
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48332$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48333  supports=no
48334  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48335
48336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48337$as_echo "$supports" >&6; }
48338  if test "x$supports" = "xyes" ; then
48339    :
48340    HAS_CFLAG_OPTIMIZE_DEBUG=true
48341  else
48342    :
48343    HAS_CFLAG_OPTIMIZE_DEBUG=false
48344  fi
48345
48346
48347
48348
48349
48350
48351
48352    # "-z relro" supported in GNU binutils 2.17 and later
48353    LINKER_RELRO_FLAG="-Wl,-z,relro"
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401    # Execute function body
48402
48403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48404$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48405  supports=yes
48406
48407  saved_ldflags="$LDFLAGS"
48408  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48409  ac_ext=c
48410ac_cpp='$CPP $CPPFLAGS'
48411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48413ac_compiler_gnu=$ac_cv_c_compiler_gnu
48414
48415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48416/* end confdefs.h.  */
48417
48418int
48419main ()
48420{
48421
48422  ;
48423  return 0;
48424}
48425_ACEOF
48426if ac_fn_c_try_link "$LINENO"; then :
48427
48428else
48429  supports=no
48430fi
48431rm -f core conftest.err conftest.$ac_objext \
48432    conftest$ac_exeext conftest.$ac_ext
48433  ac_ext=cpp
48434ac_cpp='$CXXCPP $CPPFLAGS'
48435ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48436ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48437ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48438
48439  LDFLAGS="$saved_ldflags"
48440
48441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48442$as_echo "$supports" >&6; }
48443  if test "x$supports" = "xyes" ; then
48444    :
48445    HAS_LINKER_RELRO=true
48446  else
48447    :
48448    HAS_LINKER_RELRO=false
48449  fi
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463    # "-z now" supported in GNU binutils 2.11 and later
48464    LINKER_NOW_FLAG="-Wl,-z,now"
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512    # Execute function body
48513
48514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48515$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48516  supports=yes
48517
48518  saved_ldflags="$LDFLAGS"
48519  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48520  ac_ext=c
48521ac_cpp='$CPP $CPPFLAGS'
48522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48524ac_compiler_gnu=$ac_cv_c_compiler_gnu
48525
48526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48527/* end confdefs.h.  */
48528
48529int
48530main ()
48531{
48532
48533  ;
48534  return 0;
48535}
48536_ACEOF
48537if ac_fn_c_try_link "$LINENO"; then :
48538
48539else
48540  supports=no
48541fi
48542rm -f core conftest.err conftest.$ac_objext \
48543    conftest$ac_exeext conftest.$ac_ext
48544  ac_ext=cpp
48545ac_cpp='$CXXCPP $CPPFLAGS'
48546ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48547ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48548ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48549
48550  LDFLAGS="$saved_ldflags"
48551
48552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48553$as_echo "$supports" >&6; }
48554  if test "x$supports" = "xyes" ; then
48555    :
48556    HAS_LINKER_NOW=true
48557  else
48558    :
48559    HAS_LINKER_NOW=false
48560  fi
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573  fi
48574
48575  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48576  # in executable.'
48577  USING_BROKEN_SUSE_LD=no
48578  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48580$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48581    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48582    $ECHO "int main() { }" > main.c
48583    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48585$as_echo "no" >&6; }
48586      USING_BROKEN_SUSE_LD=no
48587    else
48588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48589$as_echo "yes" >&6; }
48590      USING_BROKEN_SUSE_LD=yes
48591    fi
48592    $RM version-script.map main.c a.out
48593  fi
48594
48595
48596  # Setup hotspot lecagy names for toolchains
48597  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48598  if test "x$TOOLCHAIN_TYPE" = xclang; then
48599    HOTSPOT_TOOLCHAIN_TYPE=gcc
48600  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48601    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48602  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48603    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48604  fi
48605
48606
48607
48608# Setup the JTReg Regression Test Harness.
48609
48610
48611# Check whether --with-jtreg was given.
48612if test "${with_jtreg+set}" = set; then :
48613  withval=$with_jtreg;
48614fi
48615
48616
48617  if test "x$with_jtreg" = xno; then
48618    # jtreg disabled
48619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48620$as_echo_n "checking for jtreg test harness... " >&6; }
48621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48622$as_echo "no, disabled" >&6; }
48623  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48624    # An explicit path is specified, use it.
48625    JT_HOME="$with_jtreg"
48626    if test ! -d "$JT_HOME"; then
48627      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48628    fi
48629
48630    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48631      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48632    fi
48633
48634    JTREGEXE="$JT_HOME/bin/jtreg"
48635    if test ! -x "$JTREGEXE"; then
48636      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48637    fi
48638
48639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48640$as_echo_n "checking for jtreg test harness... " >&6; }
48641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48642$as_echo "$JT_HOME" >&6; }
48643  else
48644    # Try to locate jtreg
48645    if test "x$JT_HOME" != x; then
48646      # JT_HOME set in environment, use it
48647      if test ! -d "$JT_HOME"; then
48648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48649$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48650        JT_HOME=
48651      else
48652        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48653          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48654$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48655          JT_HOME=
48656        elif test ! -x "$JT_HOME/bin/jtreg"; then
48657          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48658$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48659          JT_HOME=
48660        else
48661          JTREGEXE="$JT_HOME/bin/jtreg"
48662          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48663$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48664        fi
48665      fi
48666    fi
48667
48668    if test "x$JT_HOME" = x; then
48669      # JT_HOME is not set in environment, or was deemed invalid.
48670      # Try to find jtreg on path
48671
48672
48673  # Publish this variable in the help.
48674
48675
48676  if [ -z "${JTREGEXE+x}" ]; then
48677    # The variable is not set by user, try to locate tool using the code snippet
48678    for ac_prog in jtreg
48679do
48680  # Extract the first word of "$ac_prog", so it can be a program name with args.
48681set dummy $ac_prog; ac_word=$2
48682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48683$as_echo_n "checking for $ac_word... " >&6; }
48684if ${ac_cv_path_JTREGEXE+:} false; then :
48685  $as_echo_n "(cached) " >&6
48686else
48687  case $JTREGEXE in
48688  [\\/]* | ?:[\\/]*)
48689  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48690  ;;
48691  *)
48692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48693for as_dir in $PATH
48694do
48695  IFS=$as_save_IFS
48696  test -z "$as_dir" && as_dir=.
48697    for ac_exec_ext in '' $ac_executable_extensions; do
48698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48699    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48701    break 2
48702  fi
48703done
48704  done
48705IFS=$as_save_IFS
48706
48707  ;;
48708esac
48709fi
48710JTREGEXE=$ac_cv_path_JTREGEXE
48711if test -n "$JTREGEXE"; then
48712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48713$as_echo "$JTREGEXE" >&6; }
48714else
48715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48716$as_echo "no" >&6; }
48717fi
48718
48719
48720  test -n "$JTREGEXE" && break
48721done
48722
48723  else
48724    # The variable is set, but is it from the command line or the environment?
48725
48726    # Try to remove the string !JTREGEXE! from our list.
48727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48729      # If it failed, the variable was not from the command line. Ignore it,
48730      # but warn the user (except for BASH, which is always set by the calling BASH).
48731      if test "xJTREGEXE" != xBASH; then
48732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48733$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48734      fi
48735      # Try to locate tool using the code snippet
48736      for ac_prog in jtreg
48737do
48738  # Extract the first word of "$ac_prog", so it can be a program name with args.
48739set dummy $ac_prog; ac_word=$2
48740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48741$as_echo_n "checking for $ac_word... " >&6; }
48742if ${ac_cv_path_JTREGEXE+:} false; then :
48743  $as_echo_n "(cached) " >&6
48744else
48745  case $JTREGEXE in
48746  [\\/]* | ?:[\\/]*)
48747  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48748  ;;
48749  *)
48750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48751for as_dir in $PATH
48752do
48753  IFS=$as_save_IFS
48754  test -z "$as_dir" && as_dir=.
48755    for ac_exec_ext in '' $ac_executable_extensions; do
48756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48757    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48759    break 2
48760  fi
48761done
48762  done
48763IFS=$as_save_IFS
48764
48765  ;;
48766esac
48767fi
48768JTREGEXE=$ac_cv_path_JTREGEXE
48769if test -n "$JTREGEXE"; then
48770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48771$as_echo "$JTREGEXE" >&6; }
48772else
48773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48774$as_echo "no" >&6; }
48775fi
48776
48777
48778  test -n "$JTREGEXE" && break
48779done
48780
48781    else
48782      # If it succeeded, then it was overridden by the user. We will use it
48783      # for the tool.
48784
48785      # First remove it from the list of overridden variables, so we can test
48786      # for unknown variables in the end.
48787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48788
48789      # Check if we try to supply an empty value
48790      if test "x$JTREGEXE" = x; then
48791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48792$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48794$as_echo_n "checking for JTREGEXE... " >&6; }
48795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48796$as_echo "disabled" >&6; }
48797      else
48798        # Check if the provided tool contains a complete path.
48799        tool_specified="$JTREGEXE"
48800        tool_basename="${tool_specified##*/}"
48801        if test "x$tool_basename" = "x$tool_specified"; then
48802          # A command without a complete path is provided, search $PATH.
48803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48804$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48805          # Extract the first word of "$tool_basename", so it can be a program name with args.
48806set dummy $tool_basename; ac_word=$2
48807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48808$as_echo_n "checking for $ac_word... " >&6; }
48809if ${ac_cv_path_JTREGEXE+:} false; then :
48810  $as_echo_n "(cached) " >&6
48811else
48812  case $JTREGEXE in
48813  [\\/]* | ?:[\\/]*)
48814  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48815  ;;
48816  *)
48817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48818for as_dir in $PATH
48819do
48820  IFS=$as_save_IFS
48821  test -z "$as_dir" && as_dir=.
48822    for ac_exec_ext in '' $ac_executable_extensions; do
48823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48824    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48826    break 2
48827  fi
48828done
48829  done
48830IFS=$as_save_IFS
48831
48832  ;;
48833esac
48834fi
48835JTREGEXE=$ac_cv_path_JTREGEXE
48836if test -n "$JTREGEXE"; then
48837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48838$as_echo "$JTREGEXE" >&6; }
48839else
48840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48841$as_echo "no" >&6; }
48842fi
48843
48844
48845          if test "x$JTREGEXE" = x; then
48846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48847          fi
48848        else
48849          # Otherwise we believe it is a complete path. Use it as it is.
48850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48851$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48853$as_echo_n "checking for JTREGEXE... " >&6; }
48854          if test ! -x "$tool_specified"; then
48855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48856$as_echo "not found" >&6; }
48857            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48858          fi
48859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48860$as_echo "$tool_specified" >&6; }
48861        fi
48862      fi
48863    fi
48864
48865  fi
48866
48867
48868      if test "x$JTREGEXE" != x; then
48869        # That's good, now try to derive JT_HOME
48870        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
48871        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48872          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
48873$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
48874          JT_HOME=
48875          JTREGEXE=
48876        else
48877          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
48878$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
48879        fi
48880      fi
48881    fi
48882
48883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48884$as_echo_n "checking for jtreg test harness... " >&6; }
48885    if test "x$JT_HOME" != x; then
48886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48887$as_echo "$JT_HOME" >&6; }
48888    else
48889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
48890$as_echo "no, not found" >&6; }
48891
48892      if test "x$with_jtreg" = xyes; then
48893        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
48894      fi
48895    fi
48896  fi
48897
48898
48899
48900
48901
48902
48903  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48904  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48905  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48906  #                              commands produced by the link step (currently AIX only)
48907  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48908    COMPILER_TARGET_BITS_FLAG="-q"
48909    COMPILER_COMMAND_FILE_FLAG="-f"
48910    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48911  else
48912    COMPILER_TARGET_BITS_FLAG="-m"
48913    COMPILER_COMMAND_FILE_FLAG="@"
48914    COMPILER_BINDCMD_FILE_FLAG=""
48915
48916    # The solstudio linker does not support @-files.
48917    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48918      COMPILER_COMMAND_FILE_FLAG=
48919    fi
48920
48921    # Check if @file is supported by gcc
48922    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48924$as_echo_n "checking if @file is supported by gcc... " >&6; }
48925      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48926      $ECHO "" "--version" > command.file
48927      if $CXX @command.file 2>&5 >&5; then
48928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48929$as_echo "yes" >&6; }
48930        COMPILER_COMMAND_FILE_FLAG="@"
48931      else
48932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48933$as_echo "no" >&6; }
48934        COMPILER_COMMAND_FILE_FLAG=
48935      fi
48936      $RM command.file
48937    fi
48938  fi
48939
48940
48941
48942
48943  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48944  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48945    ARFLAGS="-r"
48946  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48947    ARFLAGS="-X64"
48948  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48949    # lib.exe is used as AR to create static libraries.
48950    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48951  else
48952    ARFLAGS=""
48953  fi
48954
48955
48956  ## Setup strip.
48957  # FIXME: should this really be per platform, or should it be per toolchain type?
48958  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48959  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48960  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48961    STRIPFLAGS="-g"
48962  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48963    STRIPFLAGS="-x"
48964  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48965    STRIPFLAGS="-S"
48966  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48967    STRIPFLAGS="-X32_64"
48968  fi
48969
48970
48971
48972  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48973    CC_OUT_OPTION=-Fo
48974    EXE_OUT_OPTION=-out:
48975    LD_OUT_OPTION=-out:
48976    AR_OUT_OPTION=-out:
48977  else
48978    # The option used to specify the target .o,.a or .so file.
48979    # When compiling, how to specify the to be created object file.
48980    CC_OUT_OPTION='-o$(SPACE)'
48981    # When linking, how to specify the to be created executable.
48982    EXE_OUT_OPTION='-o$(SPACE)'
48983    # When linking, how to specify the to be created dynamically linkable library.
48984    LD_OUT_OPTION='-o$(SPACE)'
48985    # When archiving, how to specify the to be create static archive for object files.
48986    AR_OUT_OPTION='rcs$(SPACE)'
48987  fi
48988
48989
48990
48991
48992
48993  # On Windows, we need to set RC flags.
48994  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48995    RC_FLAGS="-nologo -l0x409"
48996    JVM_RCFLAGS="-nologo"
48997    if test "x$DEBUG_LEVEL" = xrelease; then
48998      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48999      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49000    fi
49001
49002    # The version variables used to create RC_FLAGS may be overridden
49003    # in a custom configure script, or possibly the command line.
49004    # Let those variables be expanded at make time in spec.gmk.
49005    # The \$ are escaped to the shell, and the $(...) variables
49006    # are evaluated by make.
49007    RC_FLAGS="$RC_FLAGS \
49008        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49009        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49010        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49011        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49012        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49013        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49014        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49015
49016    JVM_RCFLAGS="$JVM_RCFLAGS \
49017        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49018        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49019        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49020        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49021        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49022        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49023        -D\"HS_FNAME=jvm.dll\" \
49024        -D\"HS_INTERNAL_NAME=jvm\""
49025  fi
49026
49027
49028
49029  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49030    # silence copyright notice and other headers.
49031    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49032  fi
49033
49034
49035# Now we can test some aspects on the target using configure macros.
49036
49037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49038$as_echo_n "checking for ANSI C header files... " >&6; }
49039if ${ac_cv_header_stdc+:} false; then :
49040  $as_echo_n "(cached) " >&6
49041else
49042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49043/* end confdefs.h.  */
49044#include <stdlib.h>
49045#include <stdarg.h>
49046#include <string.h>
49047#include <float.h>
49048
49049int
49050main ()
49051{
49052
49053  ;
49054  return 0;
49055}
49056_ACEOF
49057if ac_fn_cxx_try_compile "$LINENO"; then :
49058  ac_cv_header_stdc=yes
49059else
49060  ac_cv_header_stdc=no
49061fi
49062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49063
49064if test $ac_cv_header_stdc = yes; then
49065  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49067/* end confdefs.h.  */
49068#include <string.h>
49069
49070_ACEOF
49071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49072  $EGREP "memchr" >/dev/null 2>&1; then :
49073
49074else
49075  ac_cv_header_stdc=no
49076fi
49077rm -f conftest*
49078
49079fi
49080
49081if test $ac_cv_header_stdc = yes; then
49082  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49084/* end confdefs.h.  */
49085#include <stdlib.h>
49086
49087_ACEOF
49088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49089  $EGREP "free" >/dev/null 2>&1; then :
49090
49091else
49092  ac_cv_header_stdc=no
49093fi
49094rm -f conftest*
49095
49096fi
49097
49098if test $ac_cv_header_stdc = yes; then
49099  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49100  if test "$cross_compiling" = yes; then :
49101  :
49102else
49103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49104/* end confdefs.h.  */
49105#include <ctype.h>
49106#include <stdlib.h>
49107#if ((' ' & 0x0FF) == 0x020)
49108# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49109# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49110#else
49111# define ISLOWER(c) \
49112		   (('a' <= (c) && (c) <= 'i') \
49113		     || ('j' <= (c) && (c) <= 'r') \
49114		     || ('s' <= (c) && (c) <= 'z'))
49115# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49116#endif
49117
49118#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49119int
49120main ()
49121{
49122  int i;
49123  for (i = 0; i < 256; i++)
49124    if (XOR (islower (i), ISLOWER (i))
49125	|| toupper (i) != TOUPPER (i))
49126      return 2;
49127  return 0;
49128}
49129_ACEOF
49130if ac_fn_cxx_try_run "$LINENO"; then :
49131
49132else
49133  ac_cv_header_stdc=no
49134fi
49135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49136  conftest.$ac_objext conftest.beam conftest.$ac_ext
49137fi
49138
49139fi
49140fi
49141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49142$as_echo "$ac_cv_header_stdc" >&6; }
49143if test $ac_cv_header_stdc = yes; then
49144
49145$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49146
49147fi
49148
49149# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49150for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49151		  inttypes.h stdint.h unistd.h
49152do :
49153  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49154ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49155"
49156if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49157  cat >>confdefs.h <<_ACEOF
49158#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49159_ACEOF
49160
49161fi
49162
49163done
49164
49165
49166
49167  ###############################################################################
49168  #
49169  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49170  # (The JVM can use 32 or 64 bit Java pointers but that decision
49171  # is made at runtime.)
49172  #
49173
49174  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49175    # Always specify -m flag on Solaris
49176    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49177
49178  # When we add flags to the "official" CFLAGS etc, we need to
49179  # keep track of these additions in ADDED_CFLAGS etc. These
49180  # will later be checked to make sure only controlled additions
49181  # have been made to CFLAGS etc.
49182  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49183  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49184  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49185
49186  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49187  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49188  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49189
49190  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49191  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49192  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49193
49194  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49195  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49196  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49197
49198  elif test "x$COMPILE_TYPE" = xreduced; then
49199    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49200      # Specify -m if running reduced on unix platforms
49201
49202  # When we add flags to the "official" CFLAGS etc, we need to
49203  # keep track of these additions in ADDED_CFLAGS etc. These
49204  # will later be checked to make sure only controlled additions
49205  # have been made to CFLAGS etc.
49206  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49207  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49208  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49209
49210  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49211  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49212  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49213
49214  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49215  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49216  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49217
49218  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49219  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49220  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49221
49222    fi
49223  fi
49224  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49225    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49226    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49227    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49228  fi
49229
49230  # Make compilation sanity check
49231  for ac_header in stdio.h
49232do :
49233  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49234if test "x$ac_cv_header_stdio_h" = xyes; then :
49235  cat >>confdefs.h <<_ACEOF
49236#define HAVE_STDIO_H 1
49237_ACEOF
49238
49239else
49240
49241    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49242$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49243    if test "x$COMPILE_TYPE" = xreduced; then
49244
49245  # Print a helpful message on how to acquire the necessary build dependency.
49246  # reduced is the help tag: freetype, cups, alsa etc
49247  MISSING_DEPENDENCY=reduced
49248
49249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49250    cygwin_help $MISSING_DEPENDENCY
49251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49252    msys_help $MISSING_DEPENDENCY
49253  else
49254    PKGHANDLER_COMMAND=
49255
49256    case $PKGHANDLER in
49257      apt-get)
49258        apt_help     $MISSING_DEPENDENCY ;;
49259      yum)
49260        yum_help     $MISSING_DEPENDENCY ;;
49261      brew)
49262        brew_help    $MISSING_DEPENDENCY ;;
49263      port)
49264        port_help    $MISSING_DEPENDENCY ;;
49265      pkgutil)
49266        pkgutil_help $MISSING_DEPENDENCY ;;
49267      pkgadd)
49268        pkgadd_help  $MISSING_DEPENDENCY ;;
49269    esac
49270
49271    if test "x$PKGHANDLER_COMMAND" != x; then
49272      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49273    fi
49274  fi
49275
49276      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49277$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49278    elif test "x$COMPILE_TYPE" = xcross; then
49279      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49280$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49281    fi
49282    as_fn_error $? "Cannot continue." "$LINENO" 5
49283
49284fi
49285
49286done
49287
49288
49289  # The cast to long int works around a bug in the HP C Compiler
49290# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49291# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49292# This bug is HP SR number 8606223364.
49293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49294$as_echo_n "checking size of int *... " >&6; }
49295if ${ac_cv_sizeof_int_p+:} false; then :
49296  $as_echo_n "(cached) " >&6
49297else
49298  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49299
49300else
49301  if test "$ac_cv_type_int_p" = yes; then
49302     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49304as_fn_error 77 "cannot compute sizeof (int *)
49305See \`config.log' for more details" "$LINENO" 5; }
49306   else
49307     ac_cv_sizeof_int_p=0
49308   fi
49309fi
49310
49311fi
49312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49313$as_echo "$ac_cv_sizeof_int_p" >&6; }
49314
49315
49316
49317cat >>confdefs.h <<_ACEOF
49318#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49319_ACEOF
49320
49321
49322
49323  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49324  if test "x$ac_cv_sizeof_int_p" = x; then
49325    # The test failed, lets stick to the assumed value.
49326    { $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
49327$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49328  else
49329    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49330
49331    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49332      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49333      # Let's try to implicitely set the compilers target architecture and retry the test
49334      { $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
49335$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;}
49336      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49337$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49338
49339  # When we add flags to the "official" CFLAGS etc, we need to
49340  # keep track of these additions in ADDED_CFLAGS etc. These
49341  # will later be checked to make sure only controlled additions
49342  # have been made to CFLAGS etc.
49343  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49344  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49345  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49346
49347  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49348  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49349  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49350
49351  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49352  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49353  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49354
49355  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49356  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49357  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49358
49359
49360      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49361      unset ac_cv_sizeof_int_p
49362      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49363      cat >>confdefs.h <<_ACEOF
49364#undef SIZEOF_INT_P
49365_ACEOF
49366
49367      # The cast to long int works around a bug in the HP C Compiler
49368# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49369# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49370# This bug is HP SR number 8606223364.
49371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49372$as_echo_n "checking size of int *... " >&6; }
49373if ${ac_cv_sizeof_int_p+:} false; then :
49374  $as_echo_n "(cached) " >&6
49375else
49376  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49377
49378else
49379  if test "$ac_cv_type_int_p" = yes; then
49380     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49381$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49382as_fn_error 77 "cannot compute sizeof (int *)
49383See \`config.log' for more details" "$LINENO" 5; }
49384   else
49385     ac_cv_sizeof_int_p=0
49386   fi
49387fi
49388
49389fi
49390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49391$as_echo "$ac_cv_sizeof_int_p" >&6; }
49392
49393
49394
49395cat >>confdefs.h <<_ACEOF
49396#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49397_ACEOF
49398
49399
49400
49401      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49402
49403      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49404        { $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
49405$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;}
49406        if test "x$COMPILE_TYPE" = xreduced; then
49407
49408  # Print a helpful message on how to acquire the necessary build dependency.
49409  # reduced is the help tag: freetype, cups, alsa etc
49410  MISSING_DEPENDENCY=reduced
49411
49412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49413    cygwin_help $MISSING_DEPENDENCY
49414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49415    msys_help $MISSING_DEPENDENCY
49416  else
49417    PKGHANDLER_COMMAND=
49418
49419    case $PKGHANDLER in
49420      apt-get)
49421        apt_help     $MISSING_DEPENDENCY ;;
49422      yum)
49423        yum_help     $MISSING_DEPENDENCY ;;
49424      brew)
49425        brew_help    $MISSING_DEPENDENCY ;;
49426      port)
49427        port_help    $MISSING_DEPENDENCY ;;
49428      pkgutil)
49429        pkgutil_help $MISSING_DEPENDENCY ;;
49430      pkgadd)
49431        pkgadd_help  $MISSING_DEPENDENCY ;;
49432    esac
49433
49434    if test "x$PKGHANDLER_COMMAND" != x; then
49435      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49436    fi
49437  fi
49438
49439          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49440$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49441        elif test "x$COMPILE_TYPE" = xcross; then
49442          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49443$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49444        fi
49445        as_fn_error $? "Cannot continue." "$LINENO" 5
49446      fi
49447    fi
49448  fi
49449
49450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49451$as_echo_n "checking for target address size... " >&6; }
49452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49453$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49454
49455
49456  ###############################################################################
49457  #
49458  # Is the target little of big endian?
49459  #
49460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49461$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49462if ${ac_cv_c_bigendian+:} false; then :
49463  $as_echo_n "(cached) " >&6
49464else
49465  ac_cv_c_bigendian=unknown
49466    # See if we're dealing with a universal compiler.
49467    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49468/* end confdefs.h.  */
49469#ifndef __APPLE_CC__
49470	       not a universal capable compiler
49471	     #endif
49472	     typedef int dummy;
49473
49474_ACEOF
49475if ac_fn_cxx_try_compile "$LINENO"; then :
49476
49477	# Check for potential -arch flags.  It is not universal unless
49478	# there are at least two -arch flags with different values.
49479	ac_arch=
49480	ac_prev=
49481	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49482	 if test -n "$ac_prev"; then
49483	   case $ac_word in
49484	     i?86 | x86_64 | ppc | ppc64)
49485	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49486		 ac_arch=$ac_word
49487	       else
49488		 ac_cv_c_bigendian=universal
49489		 break
49490	       fi
49491	       ;;
49492	   esac
49493	   ac_prev=
49494	 elif test "x$ac_word" = "x-arch"; then
49495	   ac_prev=arch
49496	 fi
49497       done
49498fi
49499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49500    if test $ac_cv_c_bigendian = unknown; then
49501      # See if sys/param.h defines the BYTE_ORDER macro.
49502      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49503/* end confdefs.h.  */
49504#include <sys/types.h>
49505	     #include <sys/param.h>
49506
49507int
49508main ()
49509{
49510#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49511		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49512		     && LITTLE_ENDIAN)
49513	      bogus endian macros
49514	     #endif
49515
49516  ;
49517  return 0;
49518}
49519_ACEOF
49520if ac_fn_cxx_try_compile "$LINENO"; then :
49521  # It does; now see whether it defined to BIG_ENDIAN or not.
49522	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49523/* end confdefs.h.  */
49524#include <sys/types.h>
49525		#include <sys/param.h>
49526
49527int
49528main ()
49529{
49530#if BYTE_ORDER != BIG_ENDIAN
49531		 not big endian
49532		#endif
49533
49534  ;
49535  return 0;
49536}
49537_ACEOF
49538if ac_fn_cxx_try_compile "$LINENO"; then :
49539  ac_cv_c_bigendian=yes
49540else
49541  ac_cv_c_bigendian=no
49542fi
49543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49544fi
49545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49546    fi
49547    if test $ac_cv_c_bigendian = unknown; then
49548      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49549      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49550/* end confdefs.h.  */
49551#include <limits.h>
49552
49553int
49554main ()
49555{
49556#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49557	      bogus endian macros
49558	     #endif
49559
49560  ;
49561  return 0;
49562}
49563_ACEOF
49564if ac_fn_cxx_try_compile "$LINENO"; then :
49565  # It does; now see whether it defined to _BIG_ENDIAN or not.
49566	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49567/* end confdefs.h.  */
49568#include <limits.h>
49569
49570int
49571main ()
49572{
49573#ifndef _BIG_ENDIAN
49574		 not big endian
49575		#endif
49576
49577  ;
49578  return 0;
49579}
49580_ACEOF
49581if ac_fn_cxx_try_compile "$LINENO"; then :
49582  ac_cv_c_bigendian=yes
49583else
49584  ac_cv_c_bigendian=no
49585fi
49586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49587fi
49588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49589    fi
49590    if test $ac_cv_c_bigendian = unknown; then
49591      # Compile a test program.
49592      if test "$cross_compiling" = yes; then :
49593  # Try to guess by grepping values from an object file.
49594	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49595/* end confdefs.h.  */
49596short int ascii_mm[] =
49597		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49598		short int ascii_ii[] =
49599		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49600		int use_ascii (int i) {
49601		  return ascii_mm[i] + ascii_ii[i];
49602		}
49603		short int ebcdic_ii[] =
49604		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49605		short int ebcdic_mm[] =
49606		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49607		int use_ebcdic (int i) {
49608		  return ebcdic_mm[i] + ebcdic_ii[i];
49609		}
49610		extern int foo;
49611
49612int
49613main ()
49614{
49615return use_ascii (foo) == use_ebcdic (foo);
49616  ;
49617  return 0;
49618}
49619_ACEOF
49620if ac_fn_cxx_try_compile "$LINENO"; then :
49621  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49622	      ac_cv_c_bigendian=yes
49623	    fi
49624	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49625	      if test "$ac_cv_c_bigendian" = unknown; then
49626		ac_cv_c_bigendian=no
49627	      else
49628		# finding both strings is unlikely to happen, but who knows?
49629		ac_cv_c_bigendian=unknown
49630	      fi
49631	    fi
49632fi
49633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49634else
49635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49636/* end confdefs.h.  */
49637$ac_includes_default
49638int
49639main ()
49640{
49641
49642	     /* Are we little or big endian?  From Harbison&Steele.  */
49643	     union
49644	     {
49645	       long int l;
49646	       char c[sizeof (long int)];
49647	     } u;
49648	     u.l = 1;
49649	     return u.c[sizeof (long int) - 1] == 1;
49650
49651  ;
49652  return 0;
49653}
49654_ACEOF
49655if ac_fn_cxx_try_run "$LINENO"; then :
49656  ac_cv_c_bigendian=no
49657else
49658  ac_cv_c_bigendian=yes
49659fi
49660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49661  conftest.$ac_objext conftest.beam conftest.$ac_ext
49662fi
49663
49664    fi
49665fi
49666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49667$as_echo "$ac_cv_c_bigendian" >&6; }
49668 case $ac_cv_c_bigendian in #(
49669   yes)
49670     ENDIAN="big";; #(
49671   no)
49672     ENDIAN="little" ;; #(
49673   universal)
49674     ENDIAN="universal_endianness"
49675     ;; #(
49676   *)
49677     ENDIAN="unknown" ;;
49678 esac
49679
49680
49681  if test "x$ENDIAN" = xuniversal_endianness; then
49682    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49683  fi
49684  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49685    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
49686  fi
49687
49688
49689# Configure flags for the tools
49690
49691  ###############################################################################
49692  #
49693  # How to compile shared libraries.
49694  #
49695
49696  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49697    PICFLAG="-fPIC"
49698    C_FLAG_REORDER=''
49699    CXX_FLAG_REORDER=''
49700
49701    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49702      # Linking is different on MacOSX
49703      if test "x$STATIC_BUILD" = xtrue; then
49704        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49705      else
49706        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49707        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49708      fi
49709      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49710      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49711      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49712      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49713    else
49714      # Default works for linux, might work on other platforms as well.
49715      SHARED_LIBRARY_FLAGS='-shared'
49716      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49717      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49718      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49719      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49720    fi
49721  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49722    C_FLAG_REORDER=''
49723    CXX_FLAG_REORDER=''
49724
49725    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49726      # Linking is different on MacOSX
49727      PICFLAG=''
49728      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49729      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49730      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49731      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49732      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49733
49734      if test "x$STATIC_BUILD" = xfalse; then
49735        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49736      fi
49737    else
49738      # Default works for linux, might work on other platforms as well.
49739      PICFLAG='-fPIC'
49740      SHARED_LIBRARY_FLAGS='-shared'
49741      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49742      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49743      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49744
49745      # arm specific settings
49746      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49747        # '-Wl,-z,origin' isn't used on arm.
49748        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49749      else
49750        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49751      fi
49752
49753    fi
49754  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49755    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49756      PICFLAG="-xcode=pic32"
49757    else
49758      PICFLAG="-KPIC"
49759    fi
49760    C_FLAG_REORDER='-xF'
49761    CXX_FLAG_REORDER='-xF'
49762    SHARED_LIBRARY_FLAGS="-G"
49763    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49764    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49765    SET_SHARED_LIBRARY_NAME='-h $1'
49766    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49767  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49768    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49769    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49770    # will have to patch this single instruction with a call to some out-of-order code which
49771    # does the load from the TOC. This is of course slow. But in that case we also would have
49772    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49773    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49774    # can be patched directly by the linker and does not require a jump to out-of-order code.
49775    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49776    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49777    # loads for accessing a global variable). But there are rumors that this may be seen as a
49778    # 'performance feature' because of improved code locality of the symbols used in a
49779    # compilation unit.
49780    PICFLAG="-qpic"
49781    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49782    C_FLAG_REORDER=''
49783    CXX_FLAG_REORDER=''
49784    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49785    SET_EXECUTABLE_ORIGIN=""
49786    SET_SHARED_LIBRARY_ORIGIN=''
49787    SET_SHARED_LIBRARY_NAME=''
49788    SET_SHARED_LIBRARY_MAPFILE=''
49789  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49790    PICFLAG=""
49791    C_FLAG_REORDER=''
49792    CXX_FLAG_REORDER=''
49793    SHARED_LIBRARY_FLAGS="-dll"
49794    SET_EXECUTABLE_ORIGIN=''
49795    SET_SHARED_LIBRARY_ORIGIN=''
49796    SET_SHARED_LIBRARY_NAME=''
49797    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49798  fi
49799
49800
49801
49802
49803
49804
49805
49806
49807
49808  # The (cross) compiler is now configured, we can now test capabilities
49809  # of the target platform.
49810
49811
49812
49813  ###############################################################################
49814  #
49815  # Setup the opt flags for different compilers
49816  # and different operating systems.
49817  #
49818
49819  # FIXME: this was indirectly the old default, but just inherited.
49820  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49821  #   C_FLAG_DEPS="-MMD -MF"
49822  # fi
49823
49824  # Generate make dependency files
49825  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49826    C_FLAG_DEPS="-MMD -MF"
49827  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49828    C_FLAG_DEPS="-MMD -MF"
49829  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49830    C_FLAG_DEPS="-xMMD -xMF"
49831  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49832    C_FLAG_DEPS="-qmakedep=gcc -MF"
49833  fi
49834  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49835
49836
49837
49838  # Debug symbols
49839  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49840    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49841      # reduce from default "-g2" option to save space
49842      CFLAGS_DEBUG_SYMBOLS="-g1"
49843      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49844    else
49845      CFLAGS_DEBUG_SYMBOLS="-g"
49846      CXXFLAGS_DEBUG_SYMBOLS="-g"
49847    fi
49848  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49849    CFLAGS_DEBUG_SYMBOLS="-g"
49850    CXXFLAGS_DEBUG_SYMBOLS="-g"
49851  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49852    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49853    # -g0 enables debug symbols without disabling inlining.
49854    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49855  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49856    CFLAGS_DEBUG_SYMBOLS="-g"
49857    CXXFLAGS_DEBUG_SYMBOLS="-g"
49858  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49859    CFLAGS_DEBUG_SYMBOLS="-Zi"
49860    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49861  fi
49862
49863
49864
49865  # Debug symbols for JVM_CFLAGS
49866  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49867    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49868    if test "x$DEBUG_LEVEL" = xslowdebug; then
49869      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49870    else
49871      # -g0 does not disable inlining, which -g does.
49872      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49873    fi
49874  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49875    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49876  else
49877    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49878  fi
49879
49880
49881  # bounds, memory and behavior checking options
49882  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49883    case $DEBUG_LEVEL in
49884    release )
49885      # no adjustment
49886      ;;
49887    fastdebug )
49888      # no adjustment
49889      ;;
49890    slowdebug )
49891      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49892      # get's added conditionally on whether we produce debug symbols or not.
49893      # This is most likely not really correct.
49894
49895      # Add runtime stack smashing and undefined behavior checks.
49896      # Not all versions of gcc support -fstack-protector
49897      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940    # Execute function body
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989    # Execute function body
49990
49991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49992$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49993  supports=yes
49994
49995  saved_cflags="$CFLAGS"
49996  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49997  ac_ext=c
49998ac_cpp='$CPP $CPPFLAGS'
49999ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50000ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50001ac_compiler_gnu=$ac_cv_c_compiler_gnu
50002
50003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50004/* end confdefs.h.  */
50005int i;
50006_ACEOF
50007if ac_fn_c_try_compile "$LINENO"; then :
50008
50009else
50010  supports=no
50011fi
50012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50013  ac_ext=cpp
50014ac_cpp='$CXXCPP $CPPFLAGS'
50015ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50016ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50017ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50018
50019  CFLAGS="$saved_cflags"
50020
50021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50022$as_echo "$supports" >&6; }
50023  if test "x$supports" = "xyes" ; then
50024    :
50025    C_COMP_SUPPORTS="yes"
50026  else
50027    :
50028    C_COMP_SUPPORTS="no"
50029  fi
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089    # Execute function body
50090
50091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50092$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50093  supports=yes
50094
50095  saved_cxxflags="$CXXFLAGS"
50096  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50097  ac_ext=cpp
50098ac_cpp='$CXXCPP $CPPFLAGS'
50099ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50100ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50101ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50102
50103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50104/* end confdefs.h.  */
50105int i;
50106_ACEOF
50107if ac_fn_cxx_try_compile "$LINENO"; then :
50108
50109else
50110  supports=no
50111fi
50112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50113  ac_ext=cpp
50114ac_cpp='$CXXCPP $CPPFLAGS'
50115ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50116ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50117ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50118
50119  CXXFLAGS="$saved_cxxflags"
50120
50121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50122$as_echo "$supports" >&6; }
50123  if test "x$supports" = "xyes" ; then
50124    :
50125    CXX_COMP_SUPPORTS="yes"
50126  else
50127    :
50128    CXX_COMP_SUPPORTS="no"
50129  fi
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50144$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50145  supports=no
50146  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50147
50148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50149$as_echo "$supports" >&6; }
50150  if test "x$supports" = "xyes" ; then
50151    :
50152
50153  else
50154    :
50155    STACK_PROTECTOR_CFLAG=""
50156  fi
50157
50158
50159
50160
50161
50162
50163
50164      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50165      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50166      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50167        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50168      fi
50169      ;;
50170    esac
50171  fi
50172
50173  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50174    if test "x$DEBUG_LEVEL" != xrelease; then
50175      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50176        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50177      fi
50178    fi
50179  fi
50180
50181  # Optimization levels
50182  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50183    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50184
50185    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50186      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50187      C_O_FLAG_HIGHEST_JVM="-xO4"
50188      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50189      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50190      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50191      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50192      C_O_FLAG_DEBUG_JVM=""
50193      C_O_FLAG_NONE="-xregs=no%frameptr"
50194      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50195      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50196      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50197      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50198      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50199      CXX_O_FLAG_DEBUG_JVM=""
50200      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50201      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50202        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50203        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50204      fi
50205    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50206      C_O_FLAG_HIGHEST_JVM="-xO4"
50207      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50208      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50209      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50210      C_O_FLAG_DEBUG=""
50211      C_O_FLAG_DEBUG_JVM=""
50212      C_O_FLAG_NONE=""
50213      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50214      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50215      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50216      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50217      CXX_O_FLAG_DEBUG=""
50218      CXX_O_FLAG_DEBUG_JVM=""
50219      CXX_O_FLAG_NONE=""
50220    fi
50221  else
50222    # The remaining toolchains share opt flags between CC and CXX;
50223    # setup for C and duplicate afterwards.
50224    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50225      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50226        # On MacOSX we optimize for size, something
50227        # we should do for all platforms?
50228        C_O_FLAG_HIGHEST_JVM="-Os"
50229        C_O_FLAG_HIGHEST="-Os"
50230        C_O_FLAG_HI="-Os"
50231        C_O_FLAG_NORM="-Os"
50232        C_O_FLAG_SIZE="-Os"
50233      else
50234        C_O_FLAG_HIGHEST_JVM="-O3"
50235        C_O_FLAG_HIGHEST="-O3"
50236        C_O_FLAG_HI="-O3"
50237        C_O_FLAG_NORM="-O2"
50238        C_O_FLAG_SIZE="-Os"
50239      fi
50240      C_O_FLAG_DEBUG="-O0"
50241      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50242        C_O_FLAG_DEBUG_JVM=""
50243      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50244        C_O_FLAG_DEBUG_JVM="-O0"
50245      fi
50246      C_O_FLAG_NONE="-O0"
50247    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50248      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50249        # On MacOSX we optimize for size, something
50250        # we should do for all platforms?
50251        C_O_FLAG_HIGHEST_JVM="-Os"
50252        C_O_FLAG_HIGHEST="-Os"
50253        C_O_FLAG_HI="-Os"
50254        C_O_FLAG_NORM="-Os"
50255        C_O_FLAG_SIZE="-Os"
50256      else
50257        C_O_FLAG_HIGHEST_JVM="-O3"
50258        C_O_FLAG_HIGHEST="-O3"
50259        C_O_FLAG_HI="-O3"
50260        C_O_FLAG_NORM="-O2"
50261        C_O_FLAG_SIZE="-Os"
50262      fi
50263      C_O_FLAG_DEBUG="-O0"
50264      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50265        C_O_FLAG_DEBUG_JVM=""
50266      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50267        C_O_FLAG_DEBUG_JVM="-O0"
50268      fi
50269      C_O_FLAG_NONE="-O0"
50270    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50271      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50272      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50273      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50274      C_O_FLAG_NORM="-O2"
50275      C_O_FLAG_DEBUG="-qnoopt"
50276      # FIXME: Value below not verified.
50277      C_O_FLAG_DEBUG_JVM=""
50278      C_O_FLAG_NONE="-qnoopt"
50279    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50280      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50281      C_O_FLAG_HIGHEST="-O2"
50282      C_O_FLAG_HI="-O1"
50283      C_O_FLAG_NORM="-O1"
50284      C_O_FLAG_DEBUG="-Od"
50285      C_O_FLAG_DEBUG_JVM=""
50286      C_O_FLAG_NONE="-Od"
50287      C_O_FLAG_SIZE="-Os"
50288    fi
50289    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50290    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50291    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50292    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50293    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50294    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50295    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50296    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50297  fi
50298
50299  # Adjust optimization flags according to debug level.
50300  case $DEBUG_LEVEL in
50301    release )
50302      # no adjustment
50303      ;;
50304    fastdebug )
50305      # Not quite so much optimization
50306      C_O_FLAG_HI="$C_O_FLAG_NORM"
50307      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50308      ;;
50309    slowdebug )
50310      # Disable optimization
50311      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50312      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50313      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50314      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50315      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50316      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50317      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50318      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50319      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50320      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50321      ;;
50322  esac
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343# Check whether --with-abi-profile was given.
50344if test "${with_abi_profile+set}" = set; then :
50345  withval=$with_abi_profile;
50346fi
50347
50348
50349  if test "x$with_abi_profile" != x; then
50350    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50351        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50352      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50353    fi
50354
50355    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50357$as_echo_n "checking for ABI profle... " >&6; }
50358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50359$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50360
50361    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50362      ARM_FLOAT_TYPE=vfp-sflt
50363      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50364    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50365      ARM_FLOAT_TYPE=vfp-hflt
50366      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50367    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50368      ARM_FLOAT_TYPE=sflt
50369      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50370    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50371      ARM_FLOAT_TYPE=vfp-sflt
50372      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50373    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50374      ARM_FLOAT_TYPE=vfp-hflt
50375      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50376    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50377      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50378      ARM_FLOAT_TYPE=
50379      ARM_ARCH_TYPE_FLAGS=
50380    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50381      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50382      ARM_FLOAT_TYPE=
50383      ARM_ARCH_TYPE_FLAGS=
50384    else
50385      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50386    fi
50387
50388    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50389      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50390    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50391      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50392    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50393      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50394    fi
50395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50396$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50398$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50399
50400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50401$as_echo_n "checking for arch type flags... " >&6; }
50402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50403$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50404
50405    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50406    # autoconf target triplet.
50407     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50408    # Sanity check that it is a known ABI.
50409    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50410        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50411        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50412          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50413$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50414    fi
50415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50416$as_echo_n "checking for ABI property name... " >&6; }
50417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50418$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50419
50420
50421    # Pass these on to the open part of configure as if they were set using
50422    # --with-extra-c[xx]flags.
50423    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50424    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50425    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50426    # FIXME: This should not really be set using extra_cflags.
50427    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50428        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50429        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50430    fi
50431    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50432    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50433    # And pass the architecture flags to the linker as well
50434    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50435  fi
50436
50437  # When building with an abi profile, the name of that profile is appended on the
50438  # bundle platform, which is used in bundle names.
50439  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50440    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50441  fi
50442
50443
50444  # Special extras...
50445  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50446    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50447      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50448      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50449    fi
50450    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50451    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50452  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50453    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50454    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50455  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50456    CXXSTD_CXXFLAG="-std=gnu++98"
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499    # Execute function body
50500
50501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50502$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50503  supports=yes
50504
50505  saved_cxxflags="$CXXFLAGS"
50506  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50507  ac_ext=cpp
50508ac_cpp='$CXXCPP $CPPFLAGS'
50509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50510ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50512
50513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50514/* end confdefs.h.  */
50515int i;
50516_ACEOF
50517if ac_fn_cxx_try_compile "$LINENO"; then :
50518
50519else
50520  supports=no
50521fi
50522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50523  ac_ext=cpp
50524ac_cpp='$CXXCPP $CPPFLAGS'
50525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50528
50529  CXXFLAGS="$saved_cxxflags"
50530
50531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50532$as_echo "$supports" >&6; }
50533  if test "x$supports" = "xyes" ; then
50534    :
50535
50536  else
50537    :
50538    CXXSTD_CXXFLAG=""
50539  fi
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50553    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50554
50555  fi
50556  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50557    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50558    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50559  fi
50560
50561  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50562  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50563  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50564
50565  ###############################################################################
50566  #
50567  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50568  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50569  #
50570
50571  # Setup compiler/platform specific flags into
50572  #    CFLAGS_JDK    - C Compiler flags
50573  #    CXXFLAGS_JDK  - C++ Compiler flags
50574  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50575  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50576    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50577    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50578    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50579    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50580      # Force compatibility with i586 on 32 bit intel platforms.
50581      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50582      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50583    fi
50584    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50585        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50586    case $OPENJDK_TARGET_CPU_ARCH in
50587      arm )
50588        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50589        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50590        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50591        ;;
50592      ppc )
50593        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50594        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50595        ;;
50596      s390 )
50597        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50598        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50599        ;;
50600      * )
50601        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50602        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50603        ;;
50604    esac
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659    # Execute function body
50660
50661  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50662  REFERENCE_VERSION=6
50663
50664  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50665    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50666  fi
50667
50668  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50669    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50670  fi
50671
50672  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50673  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50674
50675  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50676    :
50677
50678  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50679  # runs afoul of the more aggressive versions of these optimisations.
50680  # Notably, value range propagation now assumes that the this pointer of C++
50681  # member functions is non-null.
50682  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50683        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50684        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50685$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50686  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50687  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50688
50689  else
50690    :
50691
50692  fi
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50708    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50709
50710    # Restrict the debug information created by Clang to avoid
50711    # too big object files and speed the build up a little bit
50712    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50713    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50714    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50715      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50716        # Force compatibility with i586 on 32 bit intel platforms.
50717        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50718        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50719      fi
50720      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50721      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50722          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50723      case $OPENJDK_TARGET_CPU_ARCH in
50724        ppc )
50725          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50726          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50727          ;;
50728        * )
50729          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50730          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50731          ;;
50732      esac
50733    fi
50734  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50735    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50736    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50737    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50738      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50739    fi
50740
50741    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50742    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50743  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50744    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50745    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50746    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50747  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50748    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50749        -MD -Zc:wchar_t- -W3 -wd4800 \
50750        -DWIN32_LEAN_AND_MEAN \
50751        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50752        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50753        -DWIN32 -DIAL"
50754    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50755      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50756    else
50757      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50758    fi
50759    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50760    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50761    # studio.
50762    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50763      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50764      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50765      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50766    fi
50767  fi
50768
50769  ###############################################################################
50770
50771  # Adjust flags according to debug level.
50772  case $DEBUG_LEVEL in
50773    fastdebug | slowdebug )
50774      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50775      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50776      ;;
50777    release )
50778      ;;
50779    * )
50780      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50781      ;;
50782  esac
50783
50784  # Set some common defines. These works for all compilers, but assume
50785  # -D is universally accepted.
50786
50787  # Setup endianness
50788  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50789    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50790    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50791    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50792    #   Note: -Dmacro         is the same as    #define macro 1
50793    #         -Dmacro=        is the same as    #define macro
50794    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50795      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50796    else
50797      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50798    fi
50799  else
50800    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50801    # are defined in the system?
50802    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50803      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50804    else
50805      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50806    fi
50807  fi
50808
50809  # Setup target OS define. Use OS target name but in upper case.
50810  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50811  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50812
50813  # Setup target CPU
50814  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50815      $OPENJDK_TARGET_ADD_LP64 \
50816      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50817
50818  # Setup debug/release defines
50819  if test "x$DEBUG_LEVEL" = xrelease; then
50820    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50821    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50822      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50823    fi
50824  else
50825    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50826  fi
50827
50828  # Set some additional per-OS defines.
50829  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50830    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50831    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50832        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50833  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50834    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50835    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50836        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50837  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50838    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50839    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50840    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50841    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50842        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50843        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50844        -fno-omit-frame-pointer"
50845  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50846    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50847    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50848    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50849        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50850        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50851  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50852    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50853  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50854    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50855    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50856  fi
50857
50858  # Set some additional per-CPU defines.
50859  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50860    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50861  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50862    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50863  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50864    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50865      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50866      # fixes `relocation truncated to fit' error for gcc 4.1.
50867      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50868      # Use ppc64 instructions, but schedule for power5
50869      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50870    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50871      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50872    fi
50873  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50874    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50875      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50876      # Little endian machine uses ELFv2 ABI.
50877      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50878      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50879      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50880    fi
50881  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50882    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50883      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50884    fi
50885  fi
50886
50887  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50888    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50889  fi
50890
50891  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50892    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50893      # Solaris does not have _LP64=1 in the old build.
50894      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50895      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50896    fi
50897  fi
50898
50899  # Set JVM_CFLAGS warning handling
50900  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50901    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50902        -Wunused-value -Woverloaded-virtual"
50903
50904    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959    # Execute function body
50960
50961  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50962  REFERENCE_VERSION=4.8
50963
50964  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50965    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50966  fi
50967
50968  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50969    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50970  fi
50971
50972  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50973  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50974
50975  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50976    :
50977
50978            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50979            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50980
50981
50982  else
50983    :
50984
50985  fi
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000    fi
51001    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51002      # Non-zero builds have stricter warnings
51003      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51004    else
51005      if test "x$TOOLCHAIN_TYPE" = xclang; then
51006        # Some versions of llvm do not like -Wundef
51007        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51008      fi
51009    fi
51010  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51011    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51012        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51013  fi
51014
51015  # Additional macosx handling
51016  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51017    # Setting these parameters makes it an error to link to macosx APIs that are
51018    # newer than the given OS version and makes the linked binaries compatible
51019    # even if built on a newer version of the OS.
51020    # The expected format is X.Y.Z
51021    MACOSX_VERSION_MIN=10.7.0
51022
51023
51024    # The macro takes the version with no dots, ex: 1070
51025    # Let the flags variables get resolved in make for easier override on make
51026    # command line.
51027    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51028    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51029  fi
51030
51031  # Setup some hard coded includes
51032  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51033      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51034      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51035      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51036      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51037      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51038      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51039
51040  # The shared libraries are compiled using the picflag.
51041  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51042      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51043  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51044      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51045
51046  # Executable flags
51047  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51048  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51049
51050
51051
51052
51053
51054
51055  # Setup LDFLAGS et al.
51056  #
51057
51058  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51059    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51060    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51061    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51062    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51063      LDFLAGS_SAFESH="-safeseh"
51064      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51065      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51066      # NOTE: Old build added -machine. Probably not needed.
51067      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51068    else
51069      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51070    fi
51071  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51072      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51073      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51074        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51075        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51076    fi
51077  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51078    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51079    # We have previously set HAS_GNU_HASH if this is the case
51080    if test -n "$HAS_GNU_HASH"; then
51081      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51082      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51083      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51084    fi
51085      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51086        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51087    fi
51088    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51089      # And since we now know that the linker is gnu, then add -z defs, to forbid
51090      # undefined symbols in object files.
51091      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51092      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51093      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51094      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51095      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51096      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51097        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51098      fi
51099      case $DEBUG_LEVEL in
51100        release )
51101          # tell linker to optimize libraries.
51102          # Should this be supplied to the OSS linker as well?
51103          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51104          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51105          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51106          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51107            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51108          fi
51109          ;;
51110        slowdebug )
51111          # Hotspot always let the linker optimize
51112          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51113          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51114            # do relocations at load
51115            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51116            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51117            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51118          fi
51119          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51120            # mark relocations read only
51121            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51122            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51123            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51124          fi
51125          ;;
51126        fastdebug )
51127          # Hotspot always let the linker optimize
51128          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51129          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51130            # mark relocations read only
51131            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51132            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51133            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51134          fi
51135          ;;
51136        * )
51137          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51138          ;;
51139        esac
51140    fi
51141  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51142    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51143    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51144    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51145    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51146    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51147    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51148      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51149    fi
51150  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51151    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51152    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51153    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51154  fi
51155
51156  # Customize LDFLAGS for executables
51157
51158  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51159
51160  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51161    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51162      LDFLAGS_STACK_SIZE=1048576
51163    else
51164      LDFLAGS_STACK_SIZE=327680
51165    fi
51166    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51167  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51168    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51169  fi
51170
51171  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51172
51173  # Customize LDFLAGS for libs
51174  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51175
51176  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51177  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51178    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51179        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51180    JDKLIB_LIBS=""
51181  else
51182    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51183        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51184
51185    if test "xTARGET" = "xTARGET"; then
51186      # On some platforms (mac) the linker warns about non existing -L dirs.
51187      # For any of the variants server, client or minimal, the dir matches the
51188      # variant name. The "main" variant should be used for linking. For the
51189      # rest, the dir is just server.
51190      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51191          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51192        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51193            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51194      else
51195        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51196            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51197      fi
51198    elif test "xTARGET" = "xBUILD"; then
51199      # When building a buildjdk, it's always only the server variant
51200      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51201          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51202    fi
51203
51204    JDKLIB_LIBS="-ljava -ljvm"
51205    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51206      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51207    fi
51208
51209  fi
51210
51211LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51212
51213  # Set JVM_LIBS (per os)
51214  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51215    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51216  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51217    # FIXME: This hard-coded path is not really proper.
51218    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51219      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51220    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51221      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51222    fi
51223    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51224        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51225  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51226    JVM_LIBS="$JVM_LIBS -lm"
51227  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51228    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51229  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51230    JVM_LIBS="$JVM_LIBS -lm"
51231  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51232    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51233        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51234        wsock32.lib winmm.lib version.lib psapi.lib"
51235    fi
51236
51237  # Set JVM_ASFLAGS
51238  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51239    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51240      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51241    fi
51242  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51243    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51244  fi
51245
51246  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51247
51248
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262  # Special extras...
51263  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51264    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51265      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51266      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51267    fi
51268    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51269    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51270  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51271    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51272    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51273  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51274    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317    # Execute function body
51318
51319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51320$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51321  supports=yes
51322
51323  saved_cxxflags="$CXXFLAGS"
51324  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51325  ac_ext=cpp
51326ac_cpp='$CXXCPP $CPPFLAGS'
51327ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51328ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51329ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51330
51331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51332/* end confdefs.h.  */
51333int i;
51334_ACEOF
51335if ac_fn_cxx_try_compile "$LINENO"; then :
51336
51337else
51338  supports=no
51339fi
51340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51341  ac_ext=cpp
51342ac_cpp='$CXXCPP $CPPFLAGS'
51343ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51344ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51345ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51346
51347  CXXFLAGS="$saved_cxxflags"
51348
51349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51350$as_echo "$supports" >&6; }
51351  if test "x$supports" = "xyes" ; then
51352    :
51353
51354  else
51355    :
51356    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51357  fi
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51371    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51372
51373  fi
51374  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51375    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51376    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51377  fi
51378
51379  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51380  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51381  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51382
51383  ###############################################################################
51384  #
51385  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51386  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51387  #
51388
51389  # Setup compiler/platform specific flags into
51390  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51391  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51392  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51393  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51394    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51395    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51396    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51397    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51398      # Force compatibility with i586 on 32 bit intel platforms.
51399      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51400      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51401    fi
51402    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51403        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51404    case $OPENJDK_BUILD_CPU_ARCH in
51405      arm )
51406        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51407        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51408        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51409        ;;
51410      ppc )
51411        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51412        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51413        ;;
51414      s390 )
51415        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51416        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51417        ;;
51418      * )
51419        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51420        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51421        ;;
51422    esac
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
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477    # Execute function body
51478
51479  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51480  REFERENCE_VERSION=6
51481
51482  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51483    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51484  fi
51485
51486  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51487    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51488  fi
51489
51490  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51491  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51492
51493  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51494    :
51495
51496  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51497  # runs afoul of the more aggressive versions of these optimisations.
51498  # Notably, value range propagation now assumes that the this pointer of C++
51499  # member functions is non-null.
51500  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51501        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51502        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51503$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51504  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51505  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51506
51507  else
51508    :
51509
51510  fi
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51526    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51527
51528    # Restrict the debug information created by Clang to avoid
51529    # too big object files and speed the build up a little bit
51530    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51531    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51532    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51533      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51534        # Force compatibility with i586 on 32 bit intel platforms.
51535        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51536        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51537      fi
51538      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51539      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51540          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51541      case $OPENJDK_BUILD_CPU_ARCH in
51542        ppc )
51543          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51544          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51545          ;;
51546        * )
51547          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51548          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51549          ;;
51550      esac
51551    fi
51552  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51553    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51554    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51555    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51556      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51557    fi
51558
51559    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51560    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51561  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51562    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51563    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51564    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51565  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51566    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51567        -MD -Zc:wchar_t- -W3 -wd4800 \
51568        -DWIN32_LEAN_AND_MEAN \
51569        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51570        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51571        -DWIN32 -DIAL"
51572    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51573      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51574    else
51575      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51576    fi
51577    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51578    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51579    # studio.
51580    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51581      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51582      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51583      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51584    fi
51585  fi
51586
51587  ###############################################################################
51588
51589  # Adjust flags according to debug level.
51590  case $DEBUG_LEVEL in
51591    fastdebug | slowdebug )
51592      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51593      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51594      ;;
51595    release )
51596      ;;
51597    * )
51598      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51599      ;;
51600  esac
51601
51602  # Set some common defines. These works for all compilers, but assume
51603  # -D is universally accepted.
51604
51605  # Setup endianness
51606  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51607    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51608    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51609    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51610    #   Note: -Dmacro         is the same as    #define macro 1
51611    #         -Dmacro=        is the same as    #define macro
51612    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51613      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51614    else
51615      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51616    fi
51617  else
51618    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51619    # are defined in the system?
51620    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51621      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51622    else
51623      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51624    fi
51625  fi
51626
51627  # Setup target OS define. Use OS target name but in upper case.
51628  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51629  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51630
51631  # Setup target CPU
51632  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51633      $OPENJDK_BUILD_ADD_LP64 \
51634      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51635
51636  # Setup debug/release defines
51637  if test "x$DEBUG_LEVEL" = xrelease; then
51638    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51639    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51640      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51641    fi
51642  else
51643    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51644  fi
51645
51646  # Set some additional per-OS defines.
51647  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51648    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51649    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51650        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51651  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51652    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51653    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51654        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51655  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51656    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51657    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51658    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51659    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51660        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51661        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51662        -fno-omit-frame-pointer"
51663  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51664    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51665    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51666    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51667        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51668        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51669  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51670    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51671  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51672    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51673    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51674  fi
51675
51676  # Set some additional per-CPU defines.
51677  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51678    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51679  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51680    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51681  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51682    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51683      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51684      # fixes `relocation truncated to fit' error for gcc 4.1.
51685      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51686      # Use ppc64 instructions, but schedule for power5
51687      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51688    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51689      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51690    fi
51691  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51692    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51693      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51694      # Little endian machine uses ELFv2 ABI.
51695      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51696      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51697      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51698    fi
51699  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51700    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51701      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51702    fi
51703  fi
51704
51705  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51706    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51707  fi
51708
51709  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51710    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51711      # Solaris does not have _LP64=1 in the old build.
51712      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51713      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51714    fi
51715  fi
51716
51717  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51718  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51719    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51720        -Wunused-value -Woverloaded-virtual"
51721
51722    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777    # Execute function body
51778
51779  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51780  REFERENCE_VERSION=4.8
51781
51782  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51783    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51784  fi
51785
51786  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51787    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51788  fi
51789
51790  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51791  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51792
51793  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51794    :
51795
51796            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51797            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51798
51799
51800  else
51801    :
51802
51803  fi
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818    fi
51819    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51820      # Non-zero builds have stricter warnings
51821      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51822    else
51823      if test "x$TOOLCHAIN_TYPE" = xclang; then
51824        # Some versions of llvm do not like -Wundef
51825        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51826      fi
51827    fi
51828  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51829    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51830        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51831  fi
51832
51833  # Additional macosx handling
51834  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51835    # Setting these parameters makes it an error to link to macosx APIs that are
51836    # newer than the given OS version and makes the linked binaries compatible
51837    # even if built on a newer version of the OS.
51838    # The expected format is X.Y.Z
51839    MACOSX_VERSION_MIN=10.7.0
51840
51841
51842    # The macro takes the version with no dots, ex: 1070
51843    # Let the flags variables get resolved in make for easier override on make
51844    # command line.
51845    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)"
51846    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51847  fi
51848
51849  # Setup some hard coded includes
51850  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51851      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51852      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51853      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51854      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51855      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51856      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51857
51858  # The shared libraries are compiled using the picflag.
51859  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51860      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51861  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51862      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51863
51864  # Executable flags
51865  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51866  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51867
51868
51869
51870
51871
51872
51873  # Setup LDFLAGS et al.
51874  #
51875
51876  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51877    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51878    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51879    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51880    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51881      LDFLAGS_SAFESH="-safeseh"
51882      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51883      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51884      # NOTE: Old build added -machine. Probably not needed.
51885      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51886    else
51887      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51888    fi
51889  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51890      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51891      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51892        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51893        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51894    fi
51895  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51896    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51897    # We have previously set HAS_GNU_HASH if this is the case
51898    if test -n "$HAS_GNU_HASH"; then
51899      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51900      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51901      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51902    fi
51903      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51904        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51905    fi
51906    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51907      # And since we now know that the linker is gnu, then add -z defs, to forbid
51908      # undefined symbols in object files.
51909      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51910      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51911      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51912      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51913      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51914      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51915        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51916      fi
51917      case $DEBUG_LEVEL in
51918        release )
51919          # tell linker to optimize libraries.
51920          # Should this be supplied to the OSS linker as well?
51921          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51922          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51923          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51924          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51925            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51926          fi
51927          ;;
51928        slowdebug )
51929          # Hotspot always let the linker optimize
51930          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51931          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51932            # do relocations at load
51933            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51934            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51935            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51936          fi
51937          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51938            # mark relocations read only
51939            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51940            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51941            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51942          fi
51943          ;;
51944        fastdebug )
51945          # Hotspot always let the linker optimize
51946          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51947          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51948            # mark relocations read only
51949            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51950            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51951            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51952          fi
51953          ;;
51954        * )
51955          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51956          ;;
51957        esac
51958    fi
51959  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51960    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51961    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51962    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51963    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51964    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51965    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51966      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51967    fi
51968  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51969    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51970    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51971    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51972  fi
51973
51974  # Customize LDFLAGS for executables
51975
51976  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51977
51978  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51979    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51980      LDFLAGS_STACK_SIZE=1048576
51981    else
51982      LDFLAGS_STACK_SIZE=327680
51983    fi
51984    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51985  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51986    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51987  fi
51988
51989  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51990
51991  # Customize LDFLAGS for libs
51992  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51993
51994  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51995  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51996    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51997        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51998    OPENJDK_BUILD_JDKLIB_LIBS=""
51999  else
52000    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52001        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52002
52003    if test "xBUILD" = "xTARGET"; then
52004      # On some platforms (mac) the linker warns about non existing -L dirs.
52005      # For any of the variants server, client or minimal, the dir matches the
52006      # variant name. The "main" variant should be used for linking. For the
52007      # rest, the dir is just server.
52008      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52009          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52010        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52011            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52012      else
52013        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52014            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52015      fi
52016    elif test "xBUILD" = "xBUILD"; then
52017      # When building a buildjdk, it's always only the server variant
52018      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52019          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52020    fi
52021
52022    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52023    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52024      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52025    fi
52026
52027  fi
52028
52029OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52030
52031  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52032  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52033    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52034  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52035    # FIXME: This hard-coded path is not really proper.
52036    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52037      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52038    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52039      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52040    fi
52041    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52042        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52043  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52044    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52045  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52046    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52047  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52048    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52049  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52050    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52051        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52052        wsock32.lib winmm.lib version.lib psapi.lib"
52053    fi
52054
52055  # Set OPENJDK_BUILD_JVM_ASFLAGS
52056  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52057    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52058      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52059    fi
52060  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52061    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52062  fi
52063
52064  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080  # Tests are only ever compiled for TARGET
52081  # Flags for compiling test libraries
52082  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52083  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52084
52085  # Flags for compiling test executables
52086  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52087  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52088
52089
52090
52091
52092
52093
52094  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52095  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52096
52097
52098
52099
52100
52101
52102  # Check that the compiler supports -mX (or -qX on AIX) flags
52103  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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    # Execute function body
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200    # Execute function body
52201
52202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52203$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52204  supports=yes
52205
52206  saved_cflags="$CFLAGS"
52207  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52208  ac_ext=c
52209ac_cpp='$CPP $CPPFLAGS'
52210ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52211ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52212ac_compiler_gnu=$ac_cv_c_compiler_gnu
52213
52214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52215/* end confdefs.h.  */
52216int i;
52217_ACEOF
52218if ac_fn_c_try_compile "$LINENO"; then :
52219
52220else
52221  supports=no
52222fi
52223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52224  ac_ext=cpp
52225ac_cpp='$CXXCPP $CPPFLAGS'
52226ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52227ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52228ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52229
52230  CFLAGS="$saved_cflags"
52231
52232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52233$as_echo "$supports" >&6; }
52234  if test "x$supports" = "xyes" ; then
52235    :
52236    C_COMP_SUPPORTS="yes"
52237  else
52238    :
52239    C_COMP_SUPPORTS="no"
52240  fi
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300    # Execute function body
52301
52302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52303$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52304  supports=yes
52305
52306  saved_cxxflags="$CXXFLAGS"
52307  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52308  ac_ext=cpp
52309ac_cpp='$CXXCPP $CPPFLAGS'
52310ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52311ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52312ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52313
52314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52315/* end confdefs.h.  */
52316int i;
52317_ACEOF
52318if ac_fn_cxx_try_compile "$LINENO"; then :
52319
52320else
52321  supports=no
52322fi
52323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52324  ac_ext=cpp
52325ac_cpp='$CXXCPP $CPPFLAGS'
52326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52329
52330  CXXFLAGS="$saved_cxxflags"
52331
52332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52333$as_echo "$supports" >&6; }
52334  if test "x$supports" = "xyes" ; then
52335    :
52336    CXX_COMP_SUPPORTS="yes"
52337  else
52338    :
52339    CXX_COMP_SUPPORTS="no"
52340  fi
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52355$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52356  supports=no
52357  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52358
52359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52360$as_echo "$supports" >&6; }
52361  if test "x$supports" = "xyes" ; then
52362    :
52363    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52364  else
52365    :
52366    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52367  fi
52368
52369
52370
52371
52372
52373
52374
52375
52376  # Check whether --enable-warnings-as-errors was given.
52377if test "${enable_warnings_as_errors+set}" = set; then :
52378  enableval=$enable_warnings_as_errors;
52379fi
52380
52381
52382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52383$as_echo_n "checking if native warnings are errors... " >&6; }
52384  if test "x$enable_warnings_as_errors" = "xyes"; then
52385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52386$as_echo "yes (explicitly set)" >&6; }
52387    WARNINGS_AS_ERRORS=true
52388  elif test "x$enable_warnings_as_errors" = "xno"; then
52389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52390$as_echo "no" >&6; }
52391    WARNINGS_AS_ERRORS=false
52392  elif test "x$enable_warnings_as_errors" = "x"; then
52393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52394$as_echo "yes (default)" >&6; }
52395    WARNINGS_AS_ERRORS=true
52396  else
52397    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52398  fi
52399
52400
52401
52402  case "${TOOLCHAIN_TYPE}" in
52403    microsoft)
52404      DISABLE_WARNING_PREFIX="-wd"
52405      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52406      ;;
52407    solstudio)
52408      DISABLE_WARNING_PREFIX="-erroff="
52409      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52410      ;;
52411    gcc)
52412      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460    # Execute function body
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509    # Execute function body
52510
52511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52512$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52513  supports=yes
52514
52515  saved_cflags="$CFLAGS"
52516  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52517  ac_ext=c
52518ac_cpp='$CPP $CPPFLAGS'
52519ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52520ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52521ac_compiler_gnu=$ac_cv_c_compiler_gnu
52522
52523  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52524/* end confdefs.h.  */
52525int i;
52526_ACEOF
52527if ac_fn_c_try_compile "$LINENO"; then :
52528
52529else
52530  supports=no
52531fi
52532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52533  ac_ext=cpp
52534ac_cpp='$CXXCPP $CPPFLAGS'
52535ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52536ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52537ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52538
52539  CFLAGS="$saved_cflags"
52540
52541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52542$as_echo "$supports" >&6; }
52543  if test "x$supports" = "xyes" ; then
52544    :
52545    C_COMP_SUPPORTS="yes"
52546  else
52547    :
52548    C_COMP_SUPPORTS="no"
52549  fi
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609    # Execute function body
52610
52611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52612$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52613  supports=yes
52614
52615  saved_cxxflags="$CXXFLAGS"
52616  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52617  ac_ext=cpp
52618ac_cpp='$CXXCPP $CPPFLAGS'
52619ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52620ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52621ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52622
52623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52624/* end confdefs.h.  */
52625int i;
52626_ACEOF
52627if ac_fn_cxx_try_compile "$LINENO"; then :
52628
52629else
52630  supports=no
52631fi
52632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52633  ac_ext=cpp
52634ac_cpp='$CXXCPP $CPPFLAGS'
52635ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52636ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52637ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52638
52639  CXXFLAGS="$saved_cxxflags"
52640
52641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52642$as_echo "$supports" >&6; }
52643  if test "x$supports" = "xyes" ; then
52644    :
52645    CXX_COMP_SUPPORTS="yes"
52646  else
52647    :
52648    CXX_COMP_SUPPORTS="no"
52649  fi
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661
52662
52663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52664$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52665  supports=no
52666  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52667
52668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52669$as_echo "$supports" >&6; }
52670  if test "x$supports" = "xyes" ; then
52671    :
52672    GCC_CAN_DISABLE_WARNINGS=true
52673  else
52674    :
52675    GCC_CAN_DISABLE_WARNINGS=false
52676
52677  fi
52678
52679
52680
52681
52682
52683
52684      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52685        DISABLE_WARNING_PREFIX="-Wno-"
52686      else
52687        DISABLE_WARNING_PREFIX=
52688      fi
52689      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52690      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52691      # CFLAGS since any target specific flags will likely not work with the
52692      # build compiler
52693      CC_OLD="$CC"
52694      CXX_OLD="$CXX"
52695      CC="$BUILD_CC"
52696      CXX="$BUILD_CXX"
52697      CFLAGS_OLD="$CFLAGS"
52698      CFLAGS=""
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746    # Execute function body
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795    # Execute function body
52796
52797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52798$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52799  supports=yes
52800
52801  saved_cflags="$CFLAGS"
52802  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52803  ac_ext=c
52804ac_cpp='$CPP $CPPFLAGS'
52805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52807ac_compiler_gnu=$ac_cv_c_compiler_gnu
52808
52809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52810/* end confdefs.h.  */
52811int i;
52812_ACEOF
52813if ac_fn_c_try_compile "$LINENO"; then :
52814
52815else
52816  supports=no
52817fi
52818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52819  ac_ext=cpp
52820ac_cpp='$CXXCPP $CPPFLAGS'
52821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52824
52825  CFLAGS="$saved_cflags"
52826
52827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52828$as_echo "$supports" >&6; }
52829  if test "x$supports" = "xyes" ; then
52830    :
52831    C_COMP_SUPPORTS="yes"
52832  else
52833    :
52834    C_COMP_SUPPORTS="no"
52835  fi
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895    # Execute function body
52896
52897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52898$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52899  supports=yes
52900
52901  saved_cxxflags="$CXXFLAGS"
52902  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52903  ac_ext=cpp
52904ac_cpp='$CXXCPP $CPPFLAGS'
52905ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52906ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52907ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52908
52909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52910/* end confdefs.h.  */
52911int i;
52912_ACEOF
52913if ac_fn_cxx_try_compile "$LINENO"; then :
52914
52915else
52916  supports=no
52917fi
52918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52919  ac_ext=cpp
52920ac_cpp='$CXXCPP $CPPFLAGS'
52921ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52922ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52923ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52924
52925  CXXFLAGS="$saved_cxxflags"
52926
52927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52928$as_echo "$supports" >&6; }
52929  if test "x$supports" = "xyes" ; then
52930    :
52931    CXX_COMP_SUPPORTS="yes"
52932  else
52933    :
52934    CXX_COMP_SUPPORTS="no"
52935  fi
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52950$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52951  supports=no
52952  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52953
52954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52955$as_echo "$supports" >&6; }
52956  if test "x$supports" = "xyes" ; then
52957    :
52958    BUILD_CC_CAN_DISABLE_WARNINGS=true
52959  else
52960    :
52961    BUILD_CC_CAN_DISABLE_WARNINGS=false
52962
52963  fi
52964
52965
52966
52967
52968
52969
52970      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52971        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52972      else
52973        BUILD_CC_DISABLE_WARNING_PREFIX=
52974      fi
52975      CC="$CC_OLD"
52976      CXX="$CXX_OLD"
52977      CFLAGS="$CFLAGS_OLD"
52978      ;;
52979    clang)
52980      DISABLE_WARNING_PREFIX="-Wno-"
52981      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52982      ;;
52983    xlc)
52984      DISABLE_WARNING_PREFIX="-qsuppress="
52985      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52986      ;;
52987  esac
52988
52989
52990
52991
52992
52993# Setup debug symbols (need objcopy from the toolchain for that)
52994
52995  #
52996  # NATIVE_DEBUG_SYMBOLS
52997  # This must be done after the toolchain is setup, since we're looking at objcopy.
52998  #
52999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53000$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53001
53002# Check whether --with-native-debug-symbols was given.
53003if test "${with_native_debug_symbols+set}" = set; then :
53004  withval=$with_native_debug_symbols;
53005        if test "x$OPENJDK_TARGET_OS" = xaix; then
53006          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53007            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53008          fi
53009        fi
53010
53011else
53012
53013        if test "x$OPENJDK_TARGET_OS" = xaix; then
53014          # AIX doesn't support 'zipped' so use 'internal' as default
53015          with_native_debug_symbols="internal"
53016        else
53017          if test "x$STATIC_BUILD" = xtrue; then
53018            with_native_debug_symbols="none"
53019          else
53020            with_native_debug_symbols="zipped"
53021          fi
53022        fi
53023
53024fi
53025
53026  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53028$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53029
53030  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53031
53032    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53033      if test "x$OBJCOPY" = x; then
53034        # enabling of enable-debug-symbols and can't find objcopy
53035        # this is an error
53036        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53037      fi
53038    fi
53039
53040    COMPILE_WITH_DEBUG_SYMBOLS=true
53041    COPY_DEBUG_SYMBOLS=true
53042    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53043  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53044    COMPILE_WITH_DEBUG_SYMBOLS=false
53045    COPY_DEBUG_SYMBOLS=false
53046    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53047  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53048    COMPILE_WITH_DEBUG_SYMBOLS=true
53049    COPY_DEBUG_SYMBOLS=false
53050    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53051  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53052
53053    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53054      if test "x$OBJCOPY" = x; then
53055        # enabling of enable-debug-symbols and can't find objcopy
53056        # this is an error
53057        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53058      fi
53059    fi
53060
53061    COMPILE_WITH_DEBUG_SYMBOLS=true
53062    COPY_DEBUG_SYMBOLS=true
53063    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53064  else
53065    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53066  fi
53067
53068  # --enable-debug-symbols is deprecated.
53069  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53070
53071  # Check whether --enable-debug-symbols was given.
53072if test "${enable_debug_symbols+set}" = set; then :
53073  enableval=$enable_debug_symbols;
53074fi
53075
53076  if test "x$enable_debug_symbols" != x; then
53077    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53078$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53079
53080    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53081      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53082$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53083    fi
53084
53085  fi
53086
53087
53088  # --enable-zip-debug-info is deprecated.
53089  # Please use --with-native-debug-symbols=zipped .
53090
53091  # Check whether --enable-zip-debug-info was given.
53092if test "${enable_zip_debug_info+set}" = set; then :
53093  enableval=$enable_zip_debug_info;
53094fi
53095
53096  if test "x$enable_zip_debug_info" != x; then
53097    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53098$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53099
53100    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53101      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53102$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53103    fi
53104
53105  fi
53106
53107
53108
53109
53110
53111
53112
53113  # Check whether --enable-native-coverage was given.
53114if test "${enable_native_coverage+set}" = set; then :
53115  enableval=$enable_native_coverage;
53116fi
53117
53118  GCOV_ENABLED="false"
53119  if test "x$enable_native_coverage" = "xyes"; then
53120    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53122$as_echo_n "checking if native coverage is enabled... " >&6; }
53123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53124$as_echo "yes" >&6; }
53125      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53126      GCOV_LDFLAGS="-fprofile-arcs"
53127      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53128      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53129      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53130      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53131      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53132      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53133      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53134      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53135      GCOV_ENABLED="true"
53136    else
53137      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53138    fi
53139  elif test "x$enable_native_coverage" = "xno"; then
53140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53141$as_echo_n "checking if native coverage is enabled... " >&6; }
53142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53143$as_echo "no" >&6; }
53144  elif test "x$enable_native_coverage" != "x"; then
53145    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53146  fi
53147
53148
53149
53150
53151# Need toolchain to setup dtrace
53152
53153  # Test for dtrace dependencies
53154  # Check whether --enable-dtrace was given.
53155if test "${enable_dtrace+set}" = set; then :
53156  enableval=$enable_dtrace;
53157fi
53158
53159
53160  DTRACE_DEP_MISSING=false
53161
53162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53163$as_echo_n "checking for dtrace tool... " >&6; }
53164  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53166$as_echo "$DTRACE" >&6; }
53167  else
53168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53169$as_echo "not found, cannot build dtrace" >&6; }
53170    DTRACE_DEP_MISSING=true
53171  fi
53172
53173  for ac_header in sys/sdt.h
53174do :
53175  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53176if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53177  cat >>confdefs.h <<_ACEOF
53178#define HAVE_SYS_SDT_H 1
53179_ACEOF
53180 DTRACE_HEADERS_OK=yes
53181else
53182  DTRACE_HEADERS_OK=no
53183fi
53184
53185done
53186
53187  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53188    DTRACE_DEP_MISSING=true
53189  fi
53190
53191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53192$as_echo_n "checking if dtrace should be built... " >&6; }
53193  if test "x$enable_dtrace" = "xyes"; then
53194    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53196$as_echo "no, missing dependencies" >&6; }
53197
53198  # Print a helpful message on how to acquire the necessary build dependency.
53199  # dtrace is the help tag: freetype, cups, alsa etc
53200  MISSING_DEPENDENCY=dtrace
53201
53202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53203    cygwin_help $MISSING_DEPENDENCY
53204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53205    msys_help $MISSING_DEPENDENCY
53206  else
53207    PKGHANDLER_COMMAND=
53208
53209    case $PKGHANDLER in
53210      apt-get)
53211        apt_help     $MISSING_DEPENDENCY ;;
53212      yum)
53213        yum_help     $MISSING_DEPENDENCY ;;
53214      brew)
53215        brew_help    $MISSING_DEPENDENCY ;;
53216      port)
53217        port_help    $MISSING_DEPENDENCY ;;
53218      pkgutil)
53219        pkgutil_help $MISSING_DEPENDENCY ;;
53220      pkgadd)
53221        pkgadd_help  $MISSING_DEPENDENCY ;;
53222    esac
53223
53224    if test "x$PKGHANDLER_COMMAND" != x; then
53225      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53226    fi
53227  fi
53228
53229      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53230    else
53231      INCLUDE_DTRACE=true
53232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53233$as_echo "yes, forced" >&6; }
53234    fi
53235  elif test "x$enable_dtrace" = "xno"; then
53236    INCLUDE_DTRACE=false
53237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53238$as_echo "no, forced" >&6; }
53239  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53240    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53241      INCLUDE_DTRACE=false
53242      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53243$as_echo "no, missing dependencies" >&6; }
53244    else
53245      INCLUDE_DTRACE=true
53246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53247$as_echo "yes, dependencies present" >&6; }
53248    fi
53249  else
53250    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53251  fi
53252
53253
53254  # Check whether --enable-aot was given.
53255if test "${enable_aot+set}" = set; then :
53256  enableval=$enable_aot;
53257fi
53258
53259
53260  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53261    ENABLE_AOT="true"
53262  elif test "x$enable_aot" = "xyes"; then
53263    ENABLE_AOT="true"
53264  elif test "x$enable_aot" = "xno"; then
53265    ENABLE_AOT="false"
53266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53267$as_echo_n "checking if aot should be enabled... " >&6; }
53268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53269$as_echo "no, forced" >&6; }
53270  else
53271    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53272  fi
53273
53274  if test "x$ENABLE_AOT" = "xtrue"; then
53275    # Only enable AOT on linux-X64.
53276    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53277      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53278        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53279          ENABLE_AOT="true"
53280        else
53281          ENABLE_AOT="false"
53282          if test "x$enable_aot" = "xyes"; then
53283            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53284          fi
53285        fi
53286      else
53287        ENABLE_AOT="false"
53288        if test "x$enable_aot" = "xyes"; then
53289          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53290        fi
53291      fi
53292    else
53293      ENABLE_AOT="false"
53294      if test "x$enable_aot" = "xyes"; then
53295        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53296      fi
53297    fi
53298  fi
53299
53300
53301
53302
53303  # Check whether --enable-hotspot-gtest was given.
53304if test "${enable_hotspot_gtest+set}" = set; then :
53305  enableval=$enable_hotspot_gtest;
53306fi
53307
53308
53309  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53310    GTEST_DIR_EXISTS="true"
53311  else
53312    GTEST_DIR_EXISTS="false"
53313  fi
53314
53315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53316$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53317  if test "x$enable_hotspot_gtest" = "xyes"; then
53318    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53320$as_echo "yes, forced" >&6; }
53321      BUILD_GTEST="true"
53322    else
53323      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53324    fi
53325  elif test "x$enable_hotspot_gtest" = "xno"; then
53326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53327$as_echo "no, forced" >&6; }
53328    BUILD_GTEST="false"
53329  elif test "x$enable_hotspot_gtest" = "x"; then
53330    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53332$as_echo "yes" >&6; }
53333      BUILD_GTEST="true"
53334    else
53335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53336$as_echo "no" >&6; }
53337      BUILD_GTEST="false"
53338    fi
53339  else
53340    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53341  fi
53342
53343
53344
53345
53346###############################################################################
53347#
53348# Check dependencies for external and internal libraries.
53349#
53350###############################################################################
53351
53352# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53353
53354  # When using cygwin or msys, we need a wrapper binary that renames
53355  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53356  # @files and rewrites these too! This wrapper binary is
53357  # called fixpath.
53358  FIXPATH=
53359  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53361$as_echo_n "checking if fixpath can be created... " >&6; }
53362    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53363    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53364    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53365    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53366      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53367      FIXPATH="$FIXPATH_BIN -c"
53368    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53369      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53370      # @ was chosen as separator to minimize risk of other tools messing around with it
53371      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53372          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53373      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53374      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53375    fi
53376    FIXPATH_SRC_W="$FIXPATH_SRC"
53377    FIXPATH_BIN_W="$FIXPATH_BIN"
53378
53379  unix_path="$FIXPATH_SRC_W"
53380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53381    windows_path=`$CYGPATH -m "$unix_path"`
53382    FIXPATH_SRC_W="$windows_path"
53383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53384    windows_path=`cmd //c echo $unix_path`
53385    FIXPATH_SRC_W="$windows_path"
53386  fi
53387
53388
53389  unix_path="$FIXPATH_BIN_W"
53390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53391    windows_path=`$CYGPATH -m "$unix_path"`
53392    FIXPATH_BIN_W="$windows_path"
53393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53394    windows_path=`cmd //c echo $unix_path`
53395    FIXPATH_BIN_W="$windows_path"
53396  fi
53397
53398    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53399    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53400    cd $FIXPATH_DIR
53401    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53402    cd $CURDIR
53403
53404    if test ! -x $FIXPATH_BIN; then
53405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53406$as_echo "no" >&6; }
53407      cat $FIXPATH_DIR/fixpath1.log
53408      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53409    fi
53410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53411$as_echo "yes" >&6; }
53412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53413$as_echo_n "checking if fixpath.exe works... " >&6; }
53414    cd $FIXPATH_DIR
53415    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53416        > $FIXPATH_DIR/fixpath2.log 2>&1
53417    cd $CURDIR
53418    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53420$as_echo "no" >&6; }
53421      cat $FIXPATH_DIR/fixpath2.log
53422      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53423    fi
53424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53425$as_echo "yes" >&6; }
53426
53427    FIXPATH_DETACH_FLAG="--detach"
53428  fi
53429
53430
53431
53432
53433
53434
53435  # Check if X11 is needed
53436  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53437    # No X11 support on windows or macosx
53438    NEEDS_LIB_X11=false
53439  else
53440    # All other instances need X11, even if building headless only, libawt still
53441    # needs X11 headers.
53442    NEEDS_LIB_X11=true
53443  fi
53444
53445  # Check if cups is needed
53446  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53447    # Windows have a separate print system
53448    NEEDS_LIB_CUPS=false
53449  else
53450    NEEDS_LIB_CUPS=true
53451  fi
53452
53453  # A custom hook may have set this already
53454  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53455    NEEDS_LIB_FREETYPE=true
53456  fi
53457
53458  # Check if alsa is needed
53459  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53460    NEEDS_LIB_ALSA=true
53461  else
53462    NEEDS_LIB_ALSA=false
53463  fi
53464
53465  # Check if ffi is needed
53466  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53467    NEEDS_LIB_FFI=true
53468  else
53469    NEEDS_LIB_FFI=false
53470  fi
53471
53472
53473  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53474  # dynamic build is configured on command line.
53475
53476# Check whether --with-stdc++lib was given.
53477if test "${with_stdc__lib+set}" = set; then :
53478  withval=$with_stdc__lib;
53479        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53480                && test "x$with_stdc__lib" != xdefault; then
53481          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53482        fi
53483
53484else
53485  with_stdc__lib=default
53486
53487fi
53488
53489
53490  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53491    # Test if stdc++ can be linked statically.
53492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53493$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53494    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53495    ac_ext=cpp
53496ac_cpp='$CXXCPP $CPPFLAGS'
53497ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53498ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53499ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53500
53501    OLD_LIBS="$LIBS"
53502    LIBS="$STATIC_STDCXX_FLAGS"
53503    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53504/* end confdefs.h.  */
53505
53506int
53507main ()
53508{
53509return 0;
53510  ;
53511  return 0;
53512}
53513_ACEOF
53514if ac_fn_cxx_try_link "$LINENO"; then :
53515  has_static_libstdcxx=yes
53516else
53517  has_static_libstdcxx=no
53518fi
53519rm -f core conftest.err conftest.$ac_objext \
53520    conftest$ac_exeext conftest.$ac_ext
53521    LIBS="$OLD_LIBS"
53522    ac_ext=cpp
53523ac_cpp='$CXXCPP $CPPFLAGS'
53524ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53525ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53526ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53527
53528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53529$as_echo "$has_static_libstdcxx" >&6; }
53530
53531    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53532      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53533    fi
53534
53535    # If dynamic was requested, it's available since it would fail above otherwise.
53536    # If dynamic wasn't requested, go with static unless it isn't available.
53537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53538$as_echo_n "checking how to link with libstdc++... " >&6; }
53539    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53540        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53542$as_echo "dynamic" >&6; }
53543    else
53544      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53545      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53546      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53547      # just use the same setting as for the TARGET toolchain.
53548      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53550$as_echo "static" >&6; }
53551    fi
53552  fi
53553
53554  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53555  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53556    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53557  fi
53558
53559
53560
53561  # Setup Windows runtime dlls
53562  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53563
53564
53565# Check whether --with-msvcr-dll was given.
53566if test "${with_msvcr_dll+set}" = set; then :
53567  withval=$with_msvcr_dll;
53568fi
53569
53570
53571  if test "x$with_msvcr_dll" != x; then
53572    # If given explicitly by user, do not probe. If not present, fail directly.
53573
53574  DLL_NAME="$MSVCR_NAME"
53575  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53576  METHOD="--with-msvcr-dll"
53577  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53579$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53580
53581    # Need to check if the found msvcr is correct architecture
53582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53583$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53584    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53586      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53587      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53588      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53589        CORRECT_MSVCR_ARCH="PE32 executable"
53590      else
53591        CORRECT_MSVCR_ARCH="PE32+ executable"
53592      fi
53593    else
53594      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53595        CORRECT_MSVCR_ARCH=386
53596      else
53597        CORRECT_MSVCR_ARCH=x86-64
53598      fi
53599    fi
53600    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53602$as_echo "ok" >&6; }
53603      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53604
53605  # Only process if variable expands to non-empty
53606
53607  if test "x$MSVC_DLL" != x; then
53608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53609
53610  # Input might be given as Windows format, start by converting to
53611  # unix format.
53612  path="$MSVC_DLL"
53613  new_path=`$CYGPATH -u "$path"`
53614
53615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53618  # "foo.exe" is OK but "foo" is an error.
53619  #
53620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53621  # It is also a way to make sure we got the proper file name for the real test later on.
53622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53623  if test "x$test_shortpath" = x; then
53624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53625$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53626    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53627  fi
53628
53629  # Call helper function which possibly converts this using DOS-style short mode.
53630  # If so, the updated path is stored in $new_path.
53631
53632  input_path="$new_path"
53633  # Check if we need to convert this using DOS-style short mode. If the path
53634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53635  # take no chances and rewrite it.
53636  # Note: m4 eats our [], so we need to use [ and ] instead.
53637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53638  if test "x$has_forbidden_chars" != x; then
53639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53643      # Going to short mode and back again did indeed matter. Since short mode is
53644      # case insensitive, let's make it lowercase to improve readability.
53645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53646      # Now convert it back to Unix-style (cygpath)
53647      input_path=`$CYGPATH -u "$shortmode_path"`
53648      new_path="$input_path"
53649    fi
53650  fi
53651
53652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53653  if test "x$test_cygdrive_prefix" = x; then
53654    # As a simple fix, exclude /usr/bin since it's not a real path.
53655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53657      # a path prefixed by /cygdrive for fixpath to work.
53658      new_path="$CYGWIN_ROOT_PATH$input_path"
53659    fi
53660  fi
53661
53662
53663  if test "x$path" != "x$new_path"; then
53664    MSVC_DLL="$new_path"
53665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53666$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53667  fi
53668
53669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53670
53671  path="$MSVC_DLL"
53672  has_colon=`$ECHO $path | $GREP ^.:`
53673  new_path="$path"
53674  if test "x$has_colon" = x; then
53675    # Not in mixed or Windows style, start by that.
53676    new_path=`cmd //c echo $path`
53677  fi
53678
53679
53680  input_path="$new_path"
53681  # Check if we need to convert this using DOS-style short mode. If the path
53682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53683  # take no chances and rewrite it.
53684  # Note: m4 eats our [], so we need to use [ and ] instead.
53685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53686  if test "x$has_forbidden_chars" != x; then
53687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53689  fi
53690
53691
53692  windows_path="$new_path"
53693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53694    unix_path=`$CYGPATH -u "$windows_path"`
53695    new_path="$unix_path"
53696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53698    new_path="$unix_path"
53699  fi
53700
53701  if test "x$path" != "x$new_path"; then
53702    MSVC_DLL="$new_path"
53703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53704$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53705  fi
53706
53707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53709
53710    else
53711      # We're on a unix platform. Hooray! :)
53712      path="$MSVC_DLL"
53713      has_space=`$ECHO "$path" | $GREP " "`
53714      if test "x$has_space" != x; then
53715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53716$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53718      fi
53719
53720      # Use eval to expand a potential ~
53721      eval path="$path"
53722      if test ! -f "$path" && test ! -d "$path"; then
53723        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53724      fi
53725
53726      if test -d "$path"; then
53727        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53728      else
53729        dir="`$DIRNAME "$path"`"
53730        base="`$BASENAME "$path"`"
53731        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53732      fi
53733    fi
53734  fi
53735
53736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53737$as_echo_n "checking for $DLL_NAME... " >&6; }
53738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53739$as_echo "$MSVC_DLL" >&6; }
53740    else
53741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53742$as_echo "incorrect, ignoring" >&6; }
53743      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53744$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53745    fi
53746  fi
53747
53748    if test "x$MSVC_DLL" = x; then
53749      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53750    fi
53751    MSVCR_DLL="$MSVC_DLL"
53752  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53753
53754  DLL_NAME="$MSVCR_NAME"
53755  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53756  METHOD="devkit"
53757  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53758    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53759$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53760
53761    # Need to check if the found msvcr is correct architecture
53762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53763$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53764    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53766      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53767      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53769        CORRECT_MSVCR_ARCH="PE32 executable"
53770      else
53771        CORRECT_MSVCR_ARCH="PE32+ executable"
53772      fi
53773    else
53774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53775        CORRECT_MSVCR_ARCH=386
53776      else
53777        CORRECT_MSVCR_ARCH=x86-64
53778      fi
53779    fi
53780    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53782$as_echo "ok" >&6; }
53783      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53784
53785  # Only process if variable expands to non-empty
53786
53787  if test "x$MSVC_DLL" != x; then
53788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53789
53790  # Input might be given as Windows format, start by converting to
53791  # unix format.
53792  path="$MSVC_DLL"
53793  new_path=`$CYGPATH -u "$path"`
53794
53795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53798  # "foo.exe" is OK but "foo" is an error.
53799  #
53800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53801  # It is also a way to make sure we got the proper file name for the real test later on.
53802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53803  if test "x$test_shortpath" = x; then
53804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53805$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53806    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53807  fi
53808
53809  # Call helper function which possibly converts this using DOS-style short mode.
53810  # If so, the updated path is stored in $new_path.
53811
53812  input_path="$new_path"
53813  # Check if we need to convert this using DOS-style short mode. If the path
53814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53815  # take no chances and rewrite it.
53816  # Note: m4 eats our [], so we need to use [ and ] instead.
53817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53818  if test "x$has_forbidden_chars" != x; then
53819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53823      # Going to short mode and back again did indeed matter. Since short mode is
53824      # case insensitive, let's make it lowercase to improve readability.
53825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53826      # Now convert it back to Unix-style (cygpath)
53827      input_path=`$CYGPATH -u "$shortmode_path"`
53828      new_path="$input_path"
53829    fi
53830  fi
53831
53832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53833  if test "x$test_cygdrive_prefix" = x; then
53834    # As a simple fix, exclude /usr/bin since it's not a real path.
53835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53837      # a path prefixed by /cygdrive for fixpath to work.
53838      new_path="$CYGWIN_ROOT_PATH$input_path"
53839    fi
53840  fi
53841
53842
53843  if test "x$path" != "x$new_path"; then
53844    MSVC_DLL="$new_path"
53845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53847  fi
53848
53849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53850
53851  path="$MSVC_DLL"
53852  has_colon=`$ECHO $path | $GREP ^.:`
53853  new_path="$path"
53854  if test "x$has_colon" = x; then
53855    # Not in mixed or Windows style, start by that.
53856    new_path=`cmd //c echo $path`
53857  fi
53858
53859
53860  input_path="$new_path"
53861  # Check if we need to convert this using DOS-style short mode. If the path
53862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53863  # take no chances and rewrite it.
53864  # Note: m4 eats our [], so we need to use [ and ] instead.
53865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53866  if test "x$has_forbidden_chars" != x; then
53867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53869  fi
53870
53871
53872  windows_path="$new_path"
53873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53874    unix_path=`$CYGPATH -u "$windows_path"`
53875    new_path="$unix_path"
53876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53878    new_path="$unix_path"
53879  fi
53880
53881  if test "x$path" != "x$new_path"; then
53882    MSVC_DLL="$new_path"
53883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53885  fi
53886
53887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53889
53890    else
53891      # We're on a unix platform. Hooray! :)
53892      path="$MSVC_DLL"
53893      has_space=`$ECHO "$path" | $GREP " "`
53894      if test "x$has_space" != x; then
53895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53896$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53898      fi
53899
53900      # Use eval to expand a potential ~
53901      eval path="$path"
53902      if test ! -f "$path" && test ! -d "$path"; then
53903        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53904      fi
53905
53906      if test -d "$path"; then
53907        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53908      else
53909        dir="`$DIRNAME "$path"`"
53910        base="`$BASENAME "$path"`"
53911        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53912      fi
53913    fi
53914  fi
53915
53916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53917$as_echo_n "checking for $DLL_NAME... " >&6; }
53918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53919$as_echo "$MSVC_DLL" >&6; }
53920    else
53921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53922$as_echo "incorrect, ignoring" >&6; }
53923      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53924$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53925    fi
53926  fi
53927
53928    if test "x$MSVC_DLL" = x; then
53929      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53930    fi
53931    MSVCR_DLL="$MSVC_DLL"
53932  else
53933
53934  DLL_NAME="${MSVCR_NAME}"
53935  MSVC_DLL=
53936
53937  if test "x$MSVC_DLL" = x; then
53938    # Probe: Using well-known location from Visual Studio 10.0
53939    if test "x$VCINSTALLDIR" != x; then
53940      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53941
53942  windows_path="$CYGWIN_VC_INSTALL_DIR"
53943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53944    unix_path=`$CYGPATH -u "$windows_path"`
53945    CYGWIN_VC_INSTALL_DIR="$unix_path"
53946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53948    CYGWIN_VC_INSTALL_DIR="$unix_path"
53949  fi
53950
53951      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53952        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53953      else
53954        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53955      fi
53956      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53957
53958  DLL_NAME="$DLL_NAME"
53959  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53960  METHOD="well-known location in VCINSTALLDIR"
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  fi
54134
54135  if test "x$MSVC_DLL" = x; then
54136    # Probe: Check in the Boot JDK directory.
54137    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54138
54139  DLL_NAME="$DLL_NAME"
54140  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54141  METHOD="well-known location in Boot JDK"
54142  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54143    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54144$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54145
54146    # Need to check if the found msvcr is correct architecture
54147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54148$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54149    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54151      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54152      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54153      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54154        CORRECT_MSVCR_ARCH="PE32 executable"
54155      else
54156        CORRECT_MSVCR_ARCH="PE32+ executable"
54157      fi
54158    else
54159      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54160        CORRECT_MSVCR_ARCH=386
54161      else
54162        CORRECT_MSVCR_ARCH=x86-64
54163      fi
54164    fi
54165    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54167$as_echo "ok" >&6; }
54168      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54169
54170  # Only process if variable expands to non-empty
54171
54172  if test "x$MSVC_DLL" != x; then
54173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54174
54175  # Input might be given as Windows format, start by converting to
54176  # unix format.
54177  path="$MSVC_DLL"
54178  new_path=`$CYGPATH -u "$path"`
54179
54180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54183  # "foo.exe" is OK but "foo" is an error.
54184  #
54185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54186  # It is also a way to make sure we got the proper file name for the real test later on.
54187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54188  if test "x$test_shortpath" = x; then
54189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54190$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54191    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54192  fi
54193
54194  # Call helper function which possibly converts this using DOS-style short mode.
54195  # If so, the updated path is stored in $new_path.
54196
54197  input_path="$new_path"
54198  # Check if we need to convert this using DOS-style short mode. If the path
54199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54200  # take no chances and rewrite it.
54201  # Note: m4 eats our [], so we need to use [ and ] instead.
54202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54203  if test "x$has_forbidden_chars" != x; then
54204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54208      # Going to short mode and back again did indeed matter. Since short mode is
54209      # case insensitive, let's make it lowercase to improve readability.
54210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54211      # Now convert it back to Unix-style (cygpath)
54212      input_path=`$CYGPATH -u "$shortmode_path"`
54213      new_path="$input_path"
54214    fi
54215  fi
54216
54217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54218  if test "x$test_cygdrive_prefix" = x; then
54219    # As a simple fix, exclude /usr/bin since it's not a real path.
54220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54222      # a path prefixed by /cygdrive for fixpath to work.
54223      new_path="$CYGWIN_ROOT_PATH$input_path"
54224    fi
54225  fi
54226
54227
54228  if test "x$path" != "x$new_path"; then
54229    MSVC_DLL="$new_path"
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54231$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54232  fi
54233
54234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54235
54236  path="$MSVC_DLL"
54237  has_colon=`$ECHO $path | $GREP ^.:`
54238  new_path="$path"
54239  if test "x$has_colon" = x; then
54240    # Not in mixed or Windows style, start by that.
54241    new_path=`cmd //c echo $path`
54242  fi
54243
54244
54245  input_path="$new_path"
54246  # Check if we need to convert this using DOS-style short mode. If the path
54247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54248  # take no chances and rewrite it.
54249  # Note: m4 eats our [], so we need to use [ and ] instead.
54250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54251  if test "x$has_forbidden_chars" != x; then
54252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54254  fi
54255
54256
54257  windows_path="$new_path"
54258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54259    unix_path=`$CYGPATH -u "$windows_path"`
54260    new_path="$unix_path"
54261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54263    new_path="$unix_path"
54264  fi
54265
54266  if test "x$path" != "x$new_path"; then
54267    MSVC_DLL="$new_path"
54268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54269$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54270  fi
54271
54272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54274
54275    else
54276      # We're on a unix platform. Hooray! :)
54277      path="$MSVC_DLL"
54278      has_space=`$ECHO "$path" | $GREP " "`
54279      if test "x$has_space" != x; then
54280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54281$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54283      fi
54284
54285      # Use eval to expand a potential ~
54286      eval path="$path"
54287      if test ! -f "$path" && test ! -d "$path"; then
54288        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54289      fi
54290
54291      if test -d "$path"; then
54292        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54293      else
54294        dir="`$DIRNAME "$path"`"
54295        base="`$BASENAME "$path"`"
54296        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54297      fi
54298    fi
54299  fi
54300
54301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54302$as_echo_n "checking for $DLL_NAME... " >&6; }
54303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54304$as_echo "$MSVC_DLL" >&6; }
54305    else
54306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54307$as_echo "incorrect, ignoring" >&6; }
54308      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54309$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54310    fi
54311  fi
54312
54313  fi
54314
54315  if test "x$MSVC_DLL" = x; then
54316    # Probe: Look in the Windows system32 directory
54317    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54318
54319  windows_path="$CYGWIN_SYSTEMROOT"
54320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54321    unix_path=`$CYGPATH -u "$windows_path"`
54322    CYGWIN_SYSTEMROOT="$unix_path"
54323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54325    CYGWIN_SYSTEMROOT="$unix_path"
54326  fi
54327
54328    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54329
54330  DLL_NAME="$DLL_NAME"
54331  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54332  METHOD="well-known location in SYSTEMROOT"
54333  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54334    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54335$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54336
54337    # Need to check if the found msvcr is correct architecture
54338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54339$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54340    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54342      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54343      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54344      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54345        CORRECT_MSVCR_ARCH="PE32 executable"
54346      else
54347        CORRECT_MSVCR_ARCH="PE32+ executable"
54348      fi
54349    else
54350      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54351        CORRECT_MSVCR_ARCH=386
54352      else
54353        CORRECT_MSVCR_ARCH=x86-64
54354      fi
54355    fi
54356    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54358$as_echo "ok" >&6; }
54359      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54360
54361  # Only process if variable expands to non-empty
54362
54363  if test "x$MSVC_DLL" != x; then
54364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54365
54366  # Input might be given as Windows format, start by converting to
54367  # unix format.
54368  path="$MSVC_DLL"
54369  new_path=`$CYGPATH -u "$path"`
54370
54371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54374  # "foo.exe" is OK but "foo" is an error.
54375  #
54376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54377  # It is also a way to make sure we got the proper file name for the real test later on.
54378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54379  if test "x$test_shortpath" = x; then
54380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54381$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54382    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54383  fi
54384
54385  # Call helper function which possibly converts this using DOS-style short mode.
54386  # If so, the updated path is stored in $new_path.
54387
54388  input_path="$new_path"
54389  # Check if we need to convert this using DOS-style short mode. If the path
54390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54391  # take no chances and rewrite it.
54392  # Note: m4 eats our [], so we need to use [ and ] instead.
54393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54394  if test "x$has_forbidden_chars" != x; then
54395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54399      # Going to short mode and back again did indeed matter. Since short mode is
54400      # case insensitive, let's make it lowercase to improve readability.
54401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54402      # Now convert it back to Unix-style (cygpath)
54403      input_path=`$CYGPATH -u "$shortmode_path"`
54404      new_path="$input_path"
54405    fi
54406  fi
54407
54408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54409  if test "x$test_cygdrive_prefix" = x; then
54410    # As a simple fix, exclude /usr/bin since it's not a real path.
54411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54413      # a path prefixed by /cygdrive for fixpath to work.
54414      new_path="$CYGWIN_ROOT_PATH$input_path"
54415    fi
54416  fi
54417
54418
54419  if test "x$path" != "x$new_path"; then
54420    MSVC_DLL="$new_path"
54421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54422$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54423  fi
54424
54425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54426
54427  path="$MSVC_DLL"
54428  has_colon=`$ECHO $path | $GREP ^.:`
54429  new_path="$path"
54430  if test "x$has_colon" = x; then
54431    # Not in mixed or Windows style, start by that.
54432    new_path=`cmd //c echo $path`
54433  fi
54434
54435
54436  input_path="$new_path"
54437  # Check if we need to convert this using DOS-style short mode. If the path
54438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54439  # take no chances and rewrite it.
54440  # Note: m4 eats our [], so we need to use [ and ] instead.
54441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54442  if test "x$has_forbidden_chars" != x; then
54443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54445  fi
54446
54447
54448  windows_path="$new_path"
54449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54450    unix_path=`$CYGPATH -u "$windows_path"`
54451    new_path="$unix_path"
54452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54454    new_path="$unix_path"
54455  fi
54456
54457  if test "x$path" != "x$new_path"; then
54458    MSVC_DLL="$new_path"
54459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54460$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54461  fi
54462
54463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54465
54466    else
54467      # We're on a unix platform. Hooray! :)
54468      path="$MSVC_DLL"
54469      has_space=`$ECHO "$path" | $GREP " "`
54470      if test "x$has_space" != x; then
54471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54472$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54474      fi
54475
54476      # Use eval to expand a potential ~
54477      eval path="$path"
54478      if test ! -f "$path" && test ! -d "$path"; then
54479        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54480      fi
54481
54482      if test -d "$path"; then
54483        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54484      else
54485        dir="`$DIRNAME "$path"`"
54486        base="`$BASENAME "$path"`"
54487        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54488      fi
54489    fi
54490  fi
54491
54492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54493$as_echo_n "checking for $DLL_NAME... " >&6; }
54494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54495$as_echo "$MSVC_DLL" >&6; }
54496    else
54497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54498$as_echo "incorrect, ignoring" >&6; }
54499      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54500$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54501    fi
54502  fi
54503
54504  fi
54505
54506  if test "x$MSVC_DLL" = x; then
54507    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54508    if test "x$VS100COMNTOOLS" != x; then
54509      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54510
54511  windows_path="$CYGWIN_VS_TOOLS_DIR"
54512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54513    unix_path=`$CYGPATH -u "$windows_path"`
54514    CYGWIN_VS_TOOLS_DIR="$unix_path"
54515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54517    CYGWIN_VS_TOOLS_DIR="$unix_path"
54518  fi
54519
54520      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54521        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54522	    | $GREP -i /x64/ | $HEAD --lines 1`
54523      else
54524        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54525	    | $GREP -i /x86/ | $HEAD --lines 1`
54526      fi
54527
54528  DLL_NAME="$DLL_NAME"
54529  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54530  METHOD="search of VS100COMNTOOLS"
54531  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54532    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54533$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54534
54535    # Need to check if the found msvcr is correct architecture
54536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54537$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54538    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54540      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54541      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54542      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54543        CORRECT_MSVCR_ARCH="PE32 executable"
54544      else
54545        CORRECT_MSVCR_ARCH="PE32+ executable"
54546      fi
54547    else
54548      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54549        CORRECT_MSVCR_ARCH=386
54550      else
54551        CORRECT_MSVCR_ARCH=x86-64
54552      fi
54553    fi
54554    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54555      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54556$as_echo "ok" >&6; }
54557      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54558
54559  # Only process if variable expands to non-empty
54560
54561  if test "x$MSVC_DLL" != x; then
54562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54563
54564  # Input might be given as Windows format, start by converting to
54565  # unix format.
54566  path="$MSVC_DLL"
54567  new_path=`$CYGPATH -u "$path"`
54568
54569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54572  # "foo.exe" is OK but "foo" is an error.
54573  #
54574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54575  # It is also a way to make sure we got the proper file name for the real test later on.
54576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54577  if test "x$test_shortpath" = x; then
54578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54579$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54580    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54581  fi
54582
54583  # Call helper function which possibly converts this using DOS-style short mode.
54584  # If so, the updated path is stored in $new_path.
54585
54586  input_path="$new_path"
54587  # Check if we need to convert this using DOS-style short mode. If the path
54588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54589  # take no chances and rewrite it.
54590  # Note: m4 eats our [], so we need to use [ and ] instead.
54591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54592  if test "x$has_forbidden_chars" != x; then
54593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54597      # Going to short mode and back again did indeed matter. Since short mode is
54598      # case insensitive, let's make it lowercase to improve readability.
54599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54600      # Now convert it back to Unix-style (cygpath)
54601      input_path=`$CYGPATH -u "$shortmode_path"`
54602      new_path="$input_path"
54603    fi
54604  fi
54605
54606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54607  if test "x$test_cygdrive_prefix" = x; then
54608    # As a simple fix, exclude /usr/bin since it's not a real path.
54609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54611      # a path prefixed by /cygdrive for fixpath to work.
54612      new_path="$CYGWIN_ROOT_PATH$input_path"
54613    fi
54614  fi
54615
54616
54617  if test "x$path" != "x$new_path"; then
54618    MSVC_DLL="$new_path"
54619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54620$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54621  fi
54622
54623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54624
54625  path="$MSVC_DLL"
54626  has_colon=`$ECHO $path | $GREP ^.:`
54627  new_path="$path"
54628  if test "x$has_colon" = x; then
54629    # Not in mixed or Windows style, start by that.
54630    new_path=`cmd //c echo $path`
54631  fi
54632
54633
54634  input_path="$new_path"
54635  # Check if we need to convert this using DOS-style short mode. If the path
54636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54637  # take no chances and rewrite it.
54638  # Note: m4 eats our [], so we need to use [ and ] instead.
54639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54640  if test "x$has_forbidden_chars" != x; then
54641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54643  fi
54644
54645
54646  windows_path="$new_path"
54647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54648    unix_path=`$CYGPATH -u "$windows_path"`
54649    new_path="$unix_path"
54650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54652    new_path="$unix_path"
54653  fi
54654
54655  if test "x$path" != "x$new_path"; then
54656    MSVC_DLL="$new_path"
54657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54658$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54659  fi
54660
54661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54663
54664    else
54665      # We're on a unix platform. Hooray! :)
54666      path="$MSVC_DLL"
54667      has_space=`$ECHO "$path" | $GREP " "`
54668      if test "x$has_space" != x; then
54669        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54670$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54671        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54672      fi
54673
54674      # Use eval to expand a potential ~
54675      eval path="$path"
54676      if test ! -f "$path" && test ! -d "$path"; then
54677        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54678      fi
54679
54680      if test -d "$path"; then
54681        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54682      else
54683        dir="`$DIRNAME "$path"`"
54684        base="`$BASENAME "$path"`"
54685        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54686      fi
54687    fi
54688  fi
54689
54690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54691$as_echo_n "checking for $DLL_NAME... " >&6; }
54692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54693$as_echo "$MSVC_DLL" >&6; }
54694    else
54695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54696$as_echo "incorrect, ignoring" >&6; }
54697      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54698$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54699    fi
54700  fi
54701
54702    fi
54703  fi
54704
54705  if test "x$MSVC_DLL" = x; then
54706    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54707    # (This was the original behaviour; kept since it might turn something up)
54708    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54709      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54710        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54711	    | $GREP x64 | $HEAD --lines 1`
54712      else
54713        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54714	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54715        if test "x$POSSIBLE_MSVC_DLL" = x; then
54716          # We're grasping at straws now...
54717          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54718	      | $HEAD --lines 1`
54719        fi
54720      fi
54721
54722
54723  DLL_NAME="$DLL_NAME"
54724  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54725  METHOD="search of VCINSTALLDIR"
54726  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54727    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54728$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54729
54730    # Need to check if the found msvcr is correct architecture
54731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54732$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54733    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54735      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54736      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54737      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54738        CORRECT_MSVCR_ARCH="PE32 executable"
54739      else
54740        CORRECT_MSVCR_ARCH="PE32+ executable"
54741      fi
54742    else
54743      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54744        CORRECT_MSVCR_ARCH=386
54745      else
54746        CORRECT_MSVCR_ARCH=x86-64
54747      fi
54748    fi
54749    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54751$as_echo "ok" >&6; }
54752      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54753
54754  # Only process if variable expands to non-empty
54755
54756  if test "x$MSVC_DLL" != x; then
54757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54758
54759  # Input might be given as Windows format, start by converting to
54760  # unix format.
54761  path="$MSVC_DLL"
54762  new_path=`$CYGPATH -u "$path"`
54763
54764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54767  # "foo.exe" is OK but "foo" is an error.
54768  #
54769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54770  # It is also a way to make sure we got the proper file name for the real test later on.
54771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54772  if test "x$test_shortpath" = x; then
54773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54774$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54775    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54776  fi
54777
54778  # Call helper function which possibly converts this using DOS-style short mode.
54779  # If so, the updated path is stored in $new_path.
54780
54781  input_path="$new_path"
54782  # Check if we need to convert this using DOS-style short mode. If the path
54783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54784  # take no chances and rewrite it.
54785  # Note: m4 eats our [], so we need to use [ and ] instead.
54786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54787  if test "x$has_forbidden_chars" != x; then
54788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54792      # Going to short mode and back again did indeed matter. Since short mode is
54793      # case insensitive, let's make it lowercase to improve readability.
54794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54795      # Now convert it back to Unix-style (cygpath)
54796      input_path=`$CYGPATH -u "$shortmode_path"`
54797      new_path="$input_path"
54798    fi
54799  fi
54800
54801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54802  if test "x$test_cygdrive_prefix" = x; then
54803    # As a simple fix, exclude /usr/bin since it's not a real path.
54804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54806      # a path prefixed by /cygdrive for fixpath to work.
54807      new_path="$CYGWIN_ROOT_PATH$input_path"
54808    fi
54809  fi
54810
54811
54812  if test "x$path" != "x$new_path"; then
54813    MSVC_DLL="$new_path"
54814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54815$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54816  fi
54817
54818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54819
54820  path="$MSVC_DLL"
54821  has_colon=`$ECHO $path | $GREP ^.:`
54822  new_path="$path"
54823  if test "x$has_colon" = x; then
54824    # Not in mixed or Windows style, start by that.
54825    new_path=`cmd //c echo $path`
54826  fi
54827
54828
54829  input_path="$new_path"
54830  # Check if we need to convert this using DOS-style short mode. If the path
54831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54832  # take no chances and rewrite it.
54833  # Note: m4 eats our [], so we need to use [ and ] instead.
54834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54835  if test "x$has_forbidden_chars" != x; then
54836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54838  fi
54839
54840
54841  windows_path="$new_path"
54842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54843    unix_path=`$CYGPATH -u "$windows_path"`
54844    new_path="$unix_path"
54845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54847    new_path="$unix_path"
54848  fi
54849
54850  if test "x$path" != "x$new_path"; then
54851    MSVC_DLL="$new_path"
54852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54853$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54854  fi
54855
54856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54858
54859    else
54860      # We're on a unix platform. Hooray! :)
54861      path="$MSVC_DLL"
54862      has_space=`$ECHO "$path" | $GREP " "`
54863      if test "x$has_space" != x; then
54864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54865$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54867      fi
54868
54869      # Use eval to expand a potential ~
54870      eval path="$path"
54871      if test ! -f "$path" && test ! -d "$path"; then
54872        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54873      fi
54874
54875      if test -d "$path"; then
54876        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54877      else
54878        dir="`$DIRNAME "$path"`"
54879        base="`$BASENAME "$path"`"
54880        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54881      fi
54882    fi
54883  fi
54884
54885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54886$as_echo_n "checking for $DLL_NAME... " >&6; }
54887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54888$as_echo "$MSVC_DLL" >&6; }
54889    else
54890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54891$as_echo "incorrect, ignoring" >&6; }
54892      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54893$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54894    fi
54895  fi
54896
54897    fi
54898  fi
54899
54900  if test "x$MSVC_DLL" = x; then
54901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54902$as_echo_n "checking for $DLL_NAME... " >&6; }
54903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54904$as_echo "no" >&6; }
54905    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54906  fi
54907
54908    MSVCR_DLL="$MSVC_DLL"
54909  fi
54910
54911
54912
54913# Check whether --with-msvcp-dll was given.
54914if test "${with_msvcp_dll+set}" = set; then :
54915  withval=$with_msvcp_dll;
54916fi
54917
54918
54919  if test "x$MSVCP_NAME" != "x"; then
54920    if test "x$with_msvcp_dll" != x; then
54921      # If given explicitly by user, do not probe. If not present, fail directly.
54922
54923  DLL_NAME="$MSVCP_NAME"
54924  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54925  METHOD="--with-msvcp-dll"
54926  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54927    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54928$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54929
54930    # Need to check if the found msvcr is correct architecture
54931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54932$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54933    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54935      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54936      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54937      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54938        CORRECT_MSVCR_ARCH="PE32 executable"
54939      else
54940        CORRECT_MSVCR_ARCH="PE32+ executable"
54941      fi
54942    else
54943      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54944        CORRECT_MSVCR_ARCH=386
54945      else
54946        CORRECT_MSVCR_ARCH=x86-64
54947      fi
54948    fi
54949    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54951$as_echo "ok" >&6; }
54952      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54953
54954  # Only process if variable expands to non-empty
54955
54956  if test "x$MSVC_DLL" != x; then
54957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54958
54959  # Input might be given as Windows format, start by converting to
54960  # unix format.
54961  path="$MSVC_DLL"
54962  new_path=`$CYGPATH -u "$path"`
54963
54964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54967  # "foo.exe" is OK but "foo" is an error.
54968  #
54969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54970  # It is also a way to make sure we got the proper file name for the real test later on.
54971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54972  if test "x$test_shortpath" = x; then
54973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54974$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54975    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54976  fi
54977
54978  # Call helper function which possibly converts this using DOS-style short mode.
54979  # If so, the updated path is stored in $new_path.
54980
54981  input_path="$new_path"
54982  # Check if we need to convert this using DOS-style short mode. If the path
54983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54984  # take no chances and rewrite it.
54985  # Note: m4 eats our [], so we need to use [ and ] instead.
54986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54987  if test "x$has_forbidden_chars" != x; then
54988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54992      # Going to short mode and back again did indeed matter. Since short mode is
54993      # case insensitive, let's make it lowercase to improve readability.
54994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54995      # Now convert it back to Unix-style (cygpath)
54996      input_path=`$CYGPATH -u "$shortmode_path"`
54997      new_path="$input_path"
54998    fi
54999  fi
55000
55001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55002  if test "x$test_cygdrive_prefix" = x; then
55003    # As a simple fix, exclude /usr/bin since it's not a real path.
55004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55006      # a path prefixed by /cygdrive for fixpath to work.
55007      new_path="$CYGWIN_ROOT_PATH$input_path"
55008    fi
55009  fi
55010
55011
55012  if test "x$path" != "x$new_path"; then
55013    MSVC_DLL="$new_path"
55014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55015$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55016  fi
55017
55018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55019
55020  path="$MSVC_DLL"
55021  has_colon=`$ECHO $path | $GREP ^.:`
55022  new_path="$path"
55023  if test "x$has_colon" = x; then
55024    # Not in mixed or Windows style, start by that.
55025    new_path=`cmd //c echo $path`
55026  fi
55027
55028
55029  input_path="$new_path"
55030  # Check if we need to convert this using DOS-style short mode. If the path
55031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55032  # take no chances and rewrite it.
55033  # Note: m4 eats our [], so we need to use [ and ] instead.
55034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55035  if test "x$has_forbidden_chars" != x; then
55036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55038  fi
55039
55040
55041  windows_path="$new_path"
55042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55043    unix_path=`$CYGPATH -u "$windows_path"`
55044    new_path="$unix_path"
55045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55047    new_path="$unix_path"
55048  fi
55049
55050  if test "x$path" != "x$new_path"; then
55051    MSVC_DLL="$new_path"
55052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55053$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55054  fi
55055
55056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55058
55059    else
55060      # We're on a unix platform. Hooray! :)
55061      path="$MSVC_DLL"
55062      has_space=`$ECHO "$path" | $GREP " "`
55063      if test "x$has_space" != x; then
55064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55065$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55066        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55067      fi
55068
55069      # Use eval to expand a potential ~
55070      eval path="$path"
55071      if test ! -f "$path" && test ! -d "$path"; then
55072        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55073      fi
55074
55075      if test -d "$path"; then
55076        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55077      else
55078        dir="`$DIRNAME "$path"`"
55079        base="`$BASENAME "$path"`"
55080        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55081      fi
55082    fi
55083  fi
55084
55085      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55086$as_echo_n "checking for $DLL_NAME... " >&6; }
55087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55088$as_echo "$MSVC_DLL" >&6; }
55089    else
55090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55091$as_echo "incorrect, ignoring" >&6; }
55092      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55093$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55094    fi
55095  fi
55096
55097      if test "x$MSVC_DLL" = x; then
55098        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55099      fi
55100      MSVCP_DLL="$MSVC_DLL"
55101    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55102
55103  DLL_NAME="$MSVCP_NAME"
55104  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55105  METHOD="devkit"
55106  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55107    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55108$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55109
55110    # Need to check if the found msvcr is correct architecture
55111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55112$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55113    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55115      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55116      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55118        CORRECT_MSVCR_ARCH="PE32 executable"
55119      else
55120        CORRECT_MSVCR_ARCH="PE32+ executable"
55121      fi
55122    else
55123      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55124        CORRECT_MSVCR_ARCH=386
55125      else
55126        CORRECT_MSVCR_ARCH=x86-64
55127      fi
55128    fi
55129    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55131$as_echo "ok" >&6; }
55132      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55133
55134  # Only process if variable expands to non-empty
55135
55136  if test "x$MSVC_DLL" != x; then
55137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55138
55139  # Input might be given as Windows format, start by converting to
55140  # unix format.
55141  path="$MSVC_DLL"
55142  new_path=`$CYGPATH -u "$path"`
55143
55144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55147  # "foo.exe" is OK but "foo" is an error.
55148  #
55149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55150  # It is also a way to make sure we got the proper file name for the real test later on.
55151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55152  if test "x$test_shortpath" = x; then
55153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55154$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55155    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55156  fi
55157
55158  # Call helper function which possibly converts this using DOS-style short mode.
55159  # If so, the updated path is stored in $new_path.
55160
55161  input_path="$new_path"
55162  # Check if we need to convert this using DOS-style short mode. If the path
55163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55164  # take no chances and rewrite it.
55165  # Note: m4 eats our [], so we need to use [ and ] instead.
55166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55167  if test "x$has_forbidden_chars" != x; then
55168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55172      # Going to short mode and back again did indeed matter. Since short mode is
55173      # case insensitive, let's make it lowercase to improve readability.
55174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55175      # Now convert it back to Unix-style (cygpath)
55176      input_path=`$CYGPATH -u "$shortmode_path"`
55177      new_path="$input_path"
55178    fi
55179  fi
55180
55181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55182  if test "x$test_cygdrive_prefix" = x; then
55183    # As a simple fix, exclude /usr/bin since it's not a real path.
55184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55186      # a path prefixed by /cygdrive for fixpath to work.
55187      new_path="$CYGWIN_ROOT_PATH$input_path"
55188    fi
55189  fi
55190
55191
55192  if test "x$path" != "x$new_path"; then
55193    MSVC_DLL="$new_path"
55194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55195$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55196  fi
55197
55198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55199
55200  path="$MSVC_DLL"
55201  has_colon=`$ECHO $path | $GREP ^.:`
55202  new_path="$path"
55203  if test "x$has_colon" = x; then
55204    # Not in mixed or Windows style, start by that.
55205    new_path=`cmd //c echo $path`
55206  fi
55207
55208
55209  input_path="$new_path"
55210  # Check if we need to convert this using DOS-style short mode. If the path
55211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55212  # take no chances and rewrite it.
55213  # Note: m4 eats our [], so we need to use [ and ] instead.
55214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55215  if test "x$has_forbidden_chars" != x; then
55216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55218  fi
55219
55220
55221  windows_path="$new_path"
55222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55223    unix_path=`$CYGPATH -u "$windows_path"`
55224    new_path="$unix_path"
55225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55227    new_path="$unix_path"
55228  fi
55229
55230  if test "x$path" != "x$new_path"; then
55231    MSVC_DLL="$new_path"
55232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55233$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55234  fi
55235
55236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55238
55239    else
55240      # We're on a unix platform. Hooray! :)
55241      path="$MSVC_DLL"
55242      has_space=`$ECHO "$path" | $GREP " "`
55243      if test "x$has_space" != x; then
55244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55245$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55246        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55247      fi
55248
55249      # Use eval to expand a potential ~
55250      eval path="$path"
55251      if test ! -f "$path" && test ! -d "$path"; then
55252        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55253      fi
55254
55255      if test -d "$path"; then
55256        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55257      else
55258        dir="`$DIRNAME "$path"`"
55259        base="`$BASENAME "$path"`"
55260        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55261      fi
55262    fi
55263  fi
55264
55265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55266$as_echo_n "checking for $DLL_NAME... " >&6; }
55267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55268$as_echo "$MSVC_DLL" >&6; }
55269    else
55270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55271$as_echo "incorrect, ignoring" >&6; }
55272      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55273$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55274    fi
55275  fi
55276
55277      if test "x$MSVC_DLL" = x; then
55278        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55279      fi
55280      MSVCP_DLL="$MSVC_DLL"
55281    else
55282
55283  DLL_NAME="${MSVCP_NAME}"
55284  MSVC_DLL=
55285
55286  if test "x$MSVC_DLL" = x; then
55287    # Probe: Using well-known location from Visual Studio 10.0
55288    if test "x$VCINSTALLDIR" != x; then
55289      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55290
55291  windows_path="$CYGWIN_VC_INSTALL_DIR"
55292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55293    unix_path=`$CYGPATH -u "$windows_path"`
55294    CYGWIN_VC_INSTALL_DIR="$unix_path"
55295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55297    CYGWIN_VC_INSTALL_DIR="$unix_path"
55298  fi
55299
55300      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55301        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55302      else
55303        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55304      fi
55305      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55306
55307  DLL_NAME="$DLL_NAME"
55308  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55309  METHOD="well-known location in VCINSTALLDIR"
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  fi
55483
55484  if test "x$MSVC_DLL" = x; then
55485    # Probe: Check in the Boot JDK directory.
55486    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55487
55488  DLL_NAME="$DLL_NAME"
55489  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55490  METHOD="well-known location in Boot JDK"
55491  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55493$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55494
55495    # Need to check if the found msvcr is correct architecture
55496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55497$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55498    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55499    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55500      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55501      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55502      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55503        CORRECT_MSVCR_ARCH="PE32 executable"
55504      else
55505        CORRECT_MSVCR_ARCH="PE32+ executable"
55506      fi
55507    else
55508      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55509        CORRECT_MSVCR_ARCH=386
55510      else
55511        CORRECT_MSVCR_ARCH=x86-64
55512      fi
55513    fi
55514    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55516$as_echo "ok" >&6; }
55517      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55518
55519  # Only process if variable expands to non-empty
55520
55521  if test "x$MSVC_DLL" != x; then
55522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55523
55524  # Input might be given as Windows format, start by converting to
55525  # unix format.
55526  path="$MSVC_DLL"
55527  new_path=`$CYGPATH -u "$path"`
55528
55529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55532  # "foo.exe" is OK but "foo" is an error.
55533  #
55534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55535  # It is also a way to make sure we got the proper file name for the real test later on.
55536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55537  if test "x$test_shortpath" = x; then
55538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55539$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55540    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55541  fi
55542
55543  # Call helper function which possibly converts this using DOS-style short mode.
55544  # If so, the updated path is stored in $new_path.
55545
55546  input_path="$new_path"
55547  # Check if we need to convert this using DOS-style short mode. If the path
55548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55549  # take no chances and rewrite it.
55550  # Note: m4 eats our [], so we need to use [ and ] instead.
55551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55552  if test "x$has_forbidden_chars" != x; then
55553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55557      # Going to short mode and back again did indeed matter. Since short mode is
55558      # case insensitive, let's make it lowercase to improve readability.
55559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55560      # Now convert it back to Unix-style (cygpath)
55561      input_path=`$CYGPATH -u "$shortmode_path"`
55562      new_path="$input_path"
55563    fi
55564  fi
55565
55566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55567  if test "x$test_cygdrive_prefix" = x; then
55568    # As a simple fix, exclude /usr/bin since it's not a real path.
55569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55571      # a path prefixed by /cygdrive for fixpath to work.
55572      new_path="$CYGWIN_ROOT_PATH$input_path"
55573    fi
55574  fi
55575
55576
55577  if test "x$path" != "x$new_path"; then
55578    MSVC_DLL="$new_path"
55579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55580$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55581  fi
55582
55583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55584
55585  path="$MSVC_DLL"
55586  has_colon=`$ECHO $path | $GREP ^.:`
55587  new_path="$path"
55588  if test "x$has_colon" = x; then
55589    # Not in mixed or Windows style, start by that.
55590    new_path=`cmd //c echo $path`
55591  fi
55592
55593
55594  input_path="$new_path"
55595  # Check if we need to convert this using DOS-style short mode. If the path
55596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55597  # take no chances and rewrite it.
55598  # Note: m4 eats our [], so we need to use [ and ] instead.
55599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55600  if test "x$has_forbidden_chars" != x; then
55601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55603  fi
55604
55605
55606  windows_path="$new_path"
55607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55608    unix_path=`$CYGPATH -u "$windows_path"`
55609    new_path="$unix_path"
55610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55612    new_path="$unix_path"
55613  fi
55614
55615  if test "x$path" != "x$new_path"; then
55616    MSVC_DLL="$new_path"
55617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55618$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55619  fi
55620
55621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55623
55624    else
55625      # We're on a unix platform. Hooray! :)
55626      path="$MSVC_DLL"
55627      has_space=`$ECHO "$path" | $GREP " "`
55628      if test "x$has_space" != x; then
55629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55630$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55632      fi
55633
55634      # Use eval to expand a potential ~
55635      eval path="$path"
55636      if test ! -f "$path" && test ! -d "$path"; then
55637        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55638      fi
55639
55640      if test -d "$path"; then
55641        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55642      else
55643        dir="`$DIRNAME "$path"`"
55644        base="`$BASENAME "$path"`"
55645        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55646      fi
55647    fi
55648  fi
55649
55650      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55651$as_echo_n "checking for $DLL_NAME... " >&6; }
55652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55653$as_echo "$MSVC_DLL" >&6; }
55654    else
55655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55656$as_echo "incorrect, ignoring" >&6; }
55657      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55658$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55659    fi
55660  fi
55661
55662  fi
55663
55664  if test "x$MSVC_DLL" = x; then
55665    # Probe: Look in the Windows system32 directory
55666    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55667
55668  windows_path="$CYGWIN_SYSTEMROOT"
55669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55670    unix_path=`$CYGPATH -u "$windows_path"`
55671    CYGWIN_SYSTEMROOT="$unix_path"
55672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55674    CYGWIN_SYSTEMROOT="$unix_path"
55675  fi
55676
55677    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55678
55679  DLL_NAME="$DLL_NAME"
55680  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55681  METHOD="well-known location in SYSTEMROOT"
55682  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55683    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55684$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55685
55686    # Need to check if the found msvcr is correct architecture
55687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55688$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55689    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55691      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55692      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55693      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55694        CORRECT_MSVCR_ARCH="PE32 executable"
55695      else
55696        CORRECT_MSVCR_ARCH="PE32+ executable"
55697      fi
55698    else
55699      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55700        CORRECT_MSVCR_ARCH=386
55701      else
55702        CORRECT_MSVCR_ARCH=x86-64
55703      fi
55704    fi
55705    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55707$as_echo "ok" >&6; }
55708      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55709
55710  # Only process if variable expands to non-empty
55711
55712  if test "x$MSVC_DLL" != x; then
55713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55714
55715  # Input might be given as Windows format, start by converting to
55716  # unix format.
55717  path="$MSVC_DLL"
55718  new_path=`$CYGPATH -u "$path"`
55719
55720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55723  # "foo.exe" is OK but "foo" is an error.
55724  #
55725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55726  # It is also a way to make sure we got the proper file name for the real test later on.
55727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55728  if test "x$test_shortpath" = x; then
55729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55730$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55731    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55732  fi
55733
55734  # Call helper function which possibly converts this using DOS-style short mode.
55735  # If so, the updated path is stored in $new_path.
55736
55737  input_path="$new_path"
55738  # Check if we need to convert this using DOS-style short mode. If the path
55739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55740  # take no chances and rewrite it.
55741  # Note: m4 eats our [], so we need to use [ and ] instead.
55742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55743  if test "x$has_forbidden_chars" != x; then
55744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55748      # Going to short mode and back again did indeed matter. Since short mode is
55749      # case insensitive, let's make it lowercase to improve readability.
55750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55751      # Now convert it back to Unix-style (cygpath)
55752      input_path=`$CYGPATH -u "$shortmode_path"`
55753      new_path="$input_path"
55754    fi
55755  fi
55756
55757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55758  if test "x$test_cygdrive_prefix" = x; then
55759    # As a simple fix, exclude /usr/bin since it's not a real path.
55760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55762      # a path prefixed by /cygdrive for fixpath to work.
55763      new_path="$CYGWIN_ROOT_PATH$input_path"
55764    fi
55765  fi
55766
55767
55768  if test "x$path" != "x$new_path"; then
55769    MSVC_DLL="$new_path"
55770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55771$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55772  fi
55773
55774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55775
55776  path="$MSVC_DLL"
55777  has_colon=`$ECHO $path | $GREP ^.:`
55778  new_path="$path"
55779  if test "x$has_colon" = x; then
55780    # Not in mixed or Windows style, start by that.
55781    new_path=`cmd //c echo $path`
55782  fi
55783
55784
55785  input_path="$new_path"
55786  # Check if we need to convert this using DOS-style short mode. If the path
55787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55788  # take no chances and rewrite it.
55789  # Note: m4 eats our [], so we need to use [ and ] instead.
55790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55791  if test "x$has_forbidden_chars" != x; then
55792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55794  fi
55795
55796
55797  windows_path="$new_path"
55798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55799    unix_path=`$CYGPATH -u "$windows_path"`
55800    new_path="$unix_path"
55801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55803    new_path="$unix_path"
55804  fi
55805
55806  if test "x$path" != "x$new_path"; then
55807    MSVC_DLL="$new_path"
55808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55809$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55810  fi
55811
55812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55814
55815    else
55816      # We're on a unix platform. Hooray! :)
55817      path="$MSVC_DLL"
55818      has_space=`$ECHO "$path" | $GREP " "`
55819      if test "x$has_space" != x; then
55820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55821$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55823      fi
55824
55825      # Use eval to expand a potential ~
55826      eval path="$path"
55827      if test ! -f "$path" && test ! -d "$path"; then
55828        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55829      fi
55830
55831      if test -d "$path"; then
55832        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55833      else
55834        dir="`$DIRNAME "$path"`"
55835        base="`$BASENAME "$path"`"
55836        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55837      fi
55838    fi
55839  fi
55840
55841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55842$as_echo_n "checking for $DLL_NAME... " >&6; }
55843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55844$as_echo "$MSVC_DLL" >&6; }
55845    else
55846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55847$as_echo "incorrect, ignoring" >&6; }
55848      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55849$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55850    fi
55851  fi
55852
55853  fi
55854
55855  if test "x$MSVC_DLL" = x; then
55856    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55857    if test "x$VS100COMNTOOLS" != x; then
55858      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55859
55860  windows_path="$CYGWIN_VS_TOOLS_DIR"
55861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55862    unix_path=`$CYGPATH -u "$windows_path"`
55863    CYGWIN_VS_TOOLS_DIR="$unix_path"
55864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55866    CYGWIN_VS_TOOLS_DIR="$unix_path"
55867  fi
55868
55869      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55870        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55871	    | $GREP -i /x64/ | $HEAD --lines 1`
55872      else
55873        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55874	    | $GREP -i /x86/ | $HEAD --lines 1`
55875      fi
55876
55877  DLL_NAME="$DLL_NAME"
55878  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55879  METHOD="search of VS100COMNTOOLS"
55880  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55881    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55882$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55883
55884    # Need to check if the found msvcr is correct architecture
55885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55886$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55887    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55889      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55890      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55891      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55892        CORRECT_MSVCR_ARCH="PE32 executable"
55893      else
55894        CORRECT_MSVCR_ARCH="PE32+ executable"
55895      fi
55896    else
55897      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55898        CORRECT_MSVCR_ARCH=386
55899      else
55900        CORRECT_MSVCR_ARCH=x86-64
55901      fi
55902    fi
55903    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55905$as_echo "ok" >&6; }
55906      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55907
55908  # Only process if variable expands to non-empty
55909
55910  if test "x$MSVC_DLL" != x; then
55911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55912
55913  # Input might be given as Windows format, start by converting to
55914  # unix format.
55915  path="$MSVC_DLL"
55916  new_path=`$CYGPATH -u "$path"`
55917
55918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55921  # "foo.exe" is OK but "foo" is an error.
55922  #
55923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55924  # It is also a way to make sure we got the proper file name for the real test later on.
55925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55926  if test "x$test_shortpath" = x; then
55927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55928$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55929    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55930  fi
55931
55932  # Call helper function which possibly converts this using DOS-style short mode.
55933  # If so, the updated path is stored in $new_path.
55934
55935  input_path="$new_path"
55936  # Check if we need to convert this using DOS-style short mode. If the path
55937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55938  # take no chances and rewrite it.
55939  # Note: m4 eats our [], so we need to use [ and ] instead.
55940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55941  if test "x$has_forbidden_chars" != x; then
55942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55946      # Going to short mode and back again did indeed matter. Since short mode is
55947      # case insensitive, let's make it lowercase to improve readability.
55948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55949      # Now convert it back to Unix-style (cygpath)
55950      input_path=`$CYGPATH -u "$shortmode_path"`
55951      new_path="$input_path"
55952    fi
55953  fi
55954
55955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55956  if test "x$test_cygdrive_prefix" = x; then
55957    # As a simple fix, exclude /usr/bin since it's not a real path.
55958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55960      # a path prefixed by /cygdrive for fixpath to work.
55961      new_path="$CYGWIN_ROOT_PATH$input_path"
55962    fi
55963  fi
55964
55965
55966  if test "x$path" != "x$new_path"; then
55967    MSVC_DLL="$new_path"
55968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55969$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55970  fi
55971
55972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55973
55974  path="$MSVC_DLL"
55975  has_colon=`$ECHO $path | $GREP ^.:`
55976  new_path="$path"
55977  if test "x$has_colon" = x; then
55978    # Not in mixed or Windows style, start by that.
55979    new_path=`cmd //c echo $path`
55980  fi
55981
55982
55983  input_path="$new_path"
55984  # Check if we need to convert this using DOS-style short mode. If the path
55985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55986  # take no chances and rewrite it.
55987  # Note: m4 eats our [], so we need to use [ and ] instead.
55988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55989  if test "x$has_forbidden_chars" != x; then
55990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55992  fi
55993
55994
55995  windows_path="$new_path"
55996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55997    unix_path=`$CYGPATH -u "$windows_path"`
55998    new_path="$unix_path"
55999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56001    new_path="$unix_path"
56002  fi
56003
56004  if test "x$path" != "x$new_path"; then
56005    MSVC_DLL="$new_path"
56006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56007$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56008  fi
56009
56010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56012
56013    else
56014      # We're on a unix platform. Hooray! :)
56015      path="$MSVC_DLL"
56016      has_space=`$ECHO "$path" | $GREP " "`
56017      if test "x$has_space" != x; then
56018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56019$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56021      fi
56022
56023      # Use eval to expand a potential ~
56024      eval path="$path"
56025      if test ! -f "$path" && test ! -d "$path"; then
56026        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56027      fi
56028
56029      if test -d "$path"; then
56030        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56031      else
56032        dir="`$DIRNAME "$path"`"
56033        base="`$BASENAME "$path"`"
56034        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56035      fi
56036    fi
56037  fi
56038
56039      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56040$as_echo_n "checking for $DLL_NAME... " >&6; }
56041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56042$as_echo "$MSVC_DLL" >&6; }
56043    else
56044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56045$as_echo "incorrect, ignoring" >&6; }
56046      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56047$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56048    fi
56049  fi
56050
56051    fi
56052  fi
56053
56054  if test "x$MSVC_DLL" = x; then
56055    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56056    # (This was the original behaviour; kept since it might turn something up)
56057    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56058      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56059        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56060	    | $GREP x64 | $HEAD --lines 1`
56061      else
56062        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56063	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56064        if test "x$POSSIBLE_MSVC_DLL" = x; then
56065          # We're grasping at straws now...
56066          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56067	      | $HEAD --lines 1`
56068        fi
56069      fi
56070
56071
56072  DLL_NAME="$DLL_NAME"
56073  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56074  METHOD="search of VCINSTALLDIR"
56075  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56076    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56077$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56078
56079    # Need to check if the found msvcr is correct architecture
56080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56081$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56082    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56084      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56085      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56086      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56087        CORRECT_MSVCR_ARCH="PE32 executable"
56088      else
56089        CORRECT_MSVCR_ARCH="PE32+ executable"
56090      fi
56091    else
56092      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56093        CORRECT_MSVCR_ARCH=386
56094      else
56095        CORRECT_MSVCR_ARCH=x86-64
56096      fi
56097    fi
56098    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56100$as_echo "ok" >&6; }
56101      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56102
56103  # Only process if variable expands to non-empty
56104
56105  if test "x$MSVC_DLL" != x; then
56106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56107
56108  # Input might be given as Windows format, start by converting to
56109  # unix format.
56110  path="$MSVC_DLL"
56111  new_path=`$CYGPATH -u "$path"`
56112
56113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56116  # "foo.exe" is OK but "foo" is an error.
56117  #
56118  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56119  # It is also a way to make sure we got the proper file name for the real test later on.
56120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56121  if test "x$test_shortpath" = x; then
56122    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56123$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56124    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56125  fi
56126
56127  # Call helper function which possibly converts this using DOS-style short mode.
56128  # If so, the updated path is stored in $new_path.
56129
56130  input_path="$new_path"
56131  # Check if we need to convert this using DOS-style short mode. If the path
56132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56133  # take no chances and rewrite it.
56134  # Note: m4 eats our [], so we need to use [ and ] instead.
56135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56136  if test "x$has_forbidden_chars" != x; then
56137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56141      # Going to short mode and back again did indeed matter. Since short mode is
56142      # case insensitive, let's make it lowercase to improve readability.
56143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56144      # Now convert it back to Unix-style (cygpath)
56145      input_path=`$CYGPATH -u "$shortmode_path"`
56146      new_path="$input_path"
56147    fi
56148  fi
56149
56150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56151  if test "x$test_cygdrive_prefix" = x; then
56152    # As a simple fix, exclude /usr/bin since it's not a real path.
56153    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56155      # a path prefixed by /cygdrive for fixpath to work.
56156      new_path="$CYGWIN_ROOT_PATH$input_path"
56157    fi
56158  fi
56159
56160
56161  if test "x$path" != "x$new_path"; then
56162    MSVC_DLL="$new_path"
56163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56164$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56165  fi
56166
56167    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56168
56169  path="$MSVC_DLL"
56170  has_colon=`$ECHO $path | $GREP ^.:`
56171  new_path="$path"
56172  if test "x$has_colon" = x; then
56173    # Not in mixed or Windows style, start by that.
56174    new_path=`cmd //c echo $path`
56175  fi
56176
56177
56178  input_path="$new_path"
56179  # Check if we need to convert this using DOS-style short mode. If the path
56180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56181  # take no chances and rewrite it.
56182  # Note: m4 eats our [], so we need to use [ and ] instead.
56183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56184  if test "x$has_forbidden_chars" != x; then
56185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56187  fi
56188
56189
56190  windows_path="$new_path"
56191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56192    unix_path=`$CYGPATH -u "$windows_path"`
56193    new_path="$unix_path"
56194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56196    new_path="$unix_path"
56197  fi
56198
56199  if test "x$path" != "x$new_path"; then
56200    MSVC_DLL="$new_path"
56201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56202$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56203  fi
56204
56205  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56206  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56207
56208    else
56209      # We're on a unix platform. Hooray! :)
56210      path="$MSVC_DLL"
56211      has_space=`$ECHO "$path" | $GREP " "`
56212      if test "x$has_space" != x; then
56213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56214$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56215        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56216      fi
56217
56218      # Use eval to expand a potential ~
56219      eval path="$path"
56220      if test ! -f "$path" && test ! -d "$path"; then
56221        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56222      fi
56223
56224      if test -d "$path"; then
56225        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56226      else
56227        dir="`$DIRNAME "$path"`"
56228        base="`$BASENAME "$path"`"
56229        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56230      fi
56231    fi
56232  fi
56233
56234      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56235$as_echo_n "checking for $DLL_NAME... " >&6; }
56236      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56237$as_echo "$MSVC_DLL" >&6; }
56238    else
56239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56240$as_echo "incorrect, ignoring" >&6; }
56241      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56242$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56243    fi
56244  fi
56245
56246    fi
56247  fi
56248
56249  if test "x$MSVC_DLL" = x; then
56250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56251$as_echo_n "checking for $DLL_NAME... " >&6; }
56252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56253$as_echo "no" >&6; }
56254    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56255  fi
56256
56257      MSVCP_DLL="$MSVC_DLL"
56258    fi
56259
56260  fi
56261
56262  fi
56263
56264
56265  if test "x$NEEDS_LIB_X11" = xfalse; then
56266    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56267      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56268$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56269    fi
56270    X_CFLAGS=
56271    X_LIBS=
56272  else
56273
56274    if test "x${with_x}" = xno; then
56275      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56276    fi
56277
56278    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56279      # The user has specified a X11 base directory. Use it for includes and
56280      # libraries, unless explicitly overridden.
56281      if test "x$x_includes" = xNONE; then
56282        x_includes="${with_x}/include"
56283      fi
56284      if test "x$x_libraries" = xNONE; then
56285        x_libraries="${with_x}/lib"
56286      fi
56287    else
56288      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56289      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56290      # --x-libraries for the sysroot, if that seems to be correct.
56291      if test "x$SYSROOT" != "x"; then
56292        if test "x$x_includes" = xNONE; then
56293          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56294            x_includes="$SYSROOT/usr/X11R6/include"
56295          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56296            x_includes="$SYSROOT/usr/include"
56297          fi
56298        fi
56299        if test "x$x_libraries" = xNONE; then
56300          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56301            x_libraries="$SYSROOT/usr/X11R6/lib"
56302          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56303            x_libraries="$SYSROOT/usr/lib64"
56304          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56305            x_libraries="$SYSROOT/usr/lib"
56306          fi
56307        fi
56308      fi
56309    fi
56310
56311    # Now let autoconf do it's magic
56312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56313$as_echo_n "checking for X... " >&6; }
56314
56315
56316# Check whether --with-x was given.
56317if test "${with_x+set}" = set; then :
56318  withval=$with_x;
56319fi
56320
56321# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56322if test "x$with_x" = xno; then
56323  # The user explicitly disabled X.
56324  have_x=disabled
56325else
56326  case $x_includes,$x_libraries in #(
56327    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56328    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56329  $as_echo_n "(cached) " >&6
56330else
56331  # One or both of the vars are not set, and there is no cached value.
56332ac_x_includes=no ac_x_libraries=no
56333rm -f -r conftest.dir
56334if mkdir conftest.dir; then
56335  cd conftest.dir
56336  cat >Imakefile <<'_ACEOF'
56337incroot:
56338	@echo incroot='${INCROOT}'
56339usrlibdir:
56340	@echo usrlibdir='${USRLIBDIR}'
56341libdir:
56342	@echo libdir='${LIBDIR}'
56343_ACEOF
56344  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56345    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56346    for ac_var in incroot usrlibdir libdir; do
56347      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56348    done
56349    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56350    for ac_extension in a so sl dylib la dll; do
56351      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56352	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56353	ac_im_usrlibdir=$ac_im_libdir; break
56354      fi
56355    done
56356    # Screen out bogus values from the imake configuration.  They are
56357    # bogus both because they are the default anyway, and because
56358    # using them would break gcc on systems where it needs fixed includes.
56359    case $ac_im_incroot in
56360	/usr/include) ac_x_includes= ;;
56361	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56362    esac
56363    case $ac_im_usrlibdir in
56364	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56365	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56366    esac
56367  fi
56368  cd ..
56369  rm -f -r conftest.dir
56370fi
56371
56372# Standard set of common directories for X headers.
56373# Check X11 before X11Rn because it is often a symlink to the current release.
56374ac_x_header_dirs='
56375/usr/X11/include
56376/usr/X11R7/include
56377/usr/X11R6/include
56378/usr/X11R5/include
56379/usr/X11R4/include
56380
56381/usr/include/X11
56382/usr/include/X11R7
56383/usr/include/X11R6
56384/usr/include/X11R5
56385/usr/include/X11R4
56386
56387/usr/local/X11/include
56388/usr/local/X11R7/include
56389/usr/local/X11R6/include
56390/usr/local/X11R5/include
56391/usr/local/X11R4/include
56392
56393/usr/local/include/X11
56394/usr/local/include/X11R7
56395/usr/local/include/X11R6
56396/usr/local/include/X11R5
56397/usr/local/include/X11R4
56398
56399/usr/X386/include
56400/usr/x386/include
56401/usr/XFree86/include/X11
56402
56403/usr/include
56404/usr/local/include
56405/usr/unsupported/include
56406/usr/athena/include
56407/usr/local/x11r5/include
56408/usr/lpp/Xamples/include
56409
56410/usr/openwin/include
56411/usr/openwin/share/include'
56412
56413if test "$ac_x_includes" = no; then
56414  # Guess where to find include files, by looking for Xlib.h.
56415  # First, try using that file with no special directory specified.
56416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56417/* end confdefs.h.  */
56418#include <X11/Xlib.h>
56419_ACEOF
56420if ac_fn_cxx_try_cpp "$LINENO"; then :
56421  # We can compile using X headers with no special include directory.
56422ac_x_includes=
56423else
56424  for ac_dir in $ac_x_header_dirs; do
56425  if test -r "$ac_dir/X11/Xlib.h"; then
56426    ac_x_includes=$ac_dir
56427    break
56428  fi
56429done
56430fi
56431rm -f conftest.err conftest.i conftest.$ac_ext
56432fi # $ac_x_includes = no
56433
56434if test "$ac_x_libraries" = no; then
56435  # Check for the libraries.
56436  # See if we find them without any special options.
56437  # Don't add to $LIBS permanently.
56438  ac_save_LIBS=$LIBS
56439  LIBS="-lX11 $LIBS"
56440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56441/* end confdefs.h.  */
56442#include <X11/Xlib.h>
56443int
56444main ()
56445{
56446XrmInitialize ()
56447  ;
56448  return 0;
56449}
56450_ACEOF
56451if ac_fn_cxx_try_link "$LINENO"; then :
56452  LIBS=$ac_save_LIBS
56453# We can link X programs with no special library path.
56454ac_x_libraries=
56455else
56456  LIBS=$ac_save_LIBS
56457for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56458do
56459  # Don't even attempt the hair of trying to link an X program!
56460  for ac_extension in a so sl dylib la dll; do
56461    if test -r "$ac_dir/libX11.$ac_extension"; then
56462      ac_x_libraries=$ac_dir
56463      break 2
56464    fi
56465  done
56466done
56467fi
56468rm -f core conftest.err conftest.$ac_objext \
56469    conftest$ac_exeext conftest.$ac_ext
56470fi # $ac_x_libraries = no
56471
56472case $ac_x_includes,$ac_x_libraries in #(
56473  no,* | *,no | *\'*)
56474    # Didn't find X, or a directory has "'" in its name.
56475    ac_cv_have_x="have_x=no";; #(
56476  *)
56477    # Record where we found X for the cache.
56478    ac_cv_have_x="have_x=yes\
56479	ac_x_includes='$ac_x_includes'\
56480	ac_x_libraries='$ac_x_libraries'"
56481esac
56482fi
56483;; #(
56484    *) have_x=yes;;
56485  esac
56486  eval "$ac_cv_have_x"
56487fi # $with_x != no
56488
56489if test "$have_x" != yes; then
56490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56491$as_echo "$have_x" >&6; }
56492  no_x=yes
56493else
56494  # If each of the values was on the command line, it overrides each guess.
56495  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56496  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56497  # Update the cache value to reflect the command line values.
56498  ac_cv_have_x="have_x=yes\
56499	ac_x_includes='$x_includes'\
56500	ac_x_libraries='$x_libraries'"
56501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56502$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56503fi
56504
56505    if test "$no_x" = yes; then
56506  # Not all programs may use this symbol, but it does not hurt to define it.
56507
56508$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56509
56510  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56511else
56512  if test -n "$x_includes"; then
56513    X_CFLAGS="$X_CFLAGS -I$x_includes"
56514  fi
56515
56516  # It would also be nice to do this for all -L options, not just this one.
56517  if test -n "$x_libraries"; then
56518    X_LIBS="$X_LIBS -L$x_libraries"
56519    # For Solaris; some versions of Sun CC require a space after -R and
56520    # others require no space.  Words are not sufficient . . . .
56521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56522$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56523    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56524    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56525    ac_cxx_werror_flag=yes
56526    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56527/* end confdefs.h.  */
56528
56529int
56530main ()
56531{
56532
56533  ;
56534  return 0;
56535}
56536_ACEOF
56537if ac_fn_cxx_try_link "$LINENO"; then :
56538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56539$as_echo "no" >&6; }
56540       X_LIBS="$X_LIBS -R$x_libraries"
56541else
56542  LIBS="$ac_xsave_LIBS -R $x_libraries"
56543       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56544/* end confdefs.h.  */
56545
56546int
56547main ()
56548{
56549
56550  ;
56551  return 0;
56552}
56553_ACEOF
56554if ac_fn_cxx_try_link "$LINENO"; then :
56555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56556$as_echo "yes" >&6; }
56557	  X_LIBS="$X_LIBS -R $x_libraries"
56558else
56559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56560$as_echo "neither works" >&6; }
56561fi
56562rm -f core conftest.err conftest.$ac_objext \
56563    conftest$ac_exeext conftest.$ac_ext
56564fi
56565rm -f core conftest.err conftest.$ac_objext \
56566    conftest$ac_exeext conftest.$ac_ext
56567    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56568    LIBS=$ac_xsave_LIBS
56569  fi
56570
56571  # Check for system-dependent libraries X programs must link with.
56572  # Do this before checking for the system-independent R6 libraries
56573  # (-lICE), since we may need -lsocket or whatever for X linking.
56574
56575  if test "$ISC" = yes; then
56576    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56577  else
56578    # Martyn Johnson says this is needed for Ultrix, if the X
56579    # libraries were built with DECnet support.  And Karl Berry says
56580    # the Alpha needs dnet_stub (dnet does not exist).
56581    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56582    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56583/* end confdefs.h.  */
56584
56585/* Override any GCC internal prototype to avoid an error.
56586   Use char because int might match the return type of a GCC
56587   builtin and then its argument prototype would still apply.  */
56588#ifdef __cplusplus
56589extern "C"
56590#endif
56591char XOpenDisplay ();
56592int
56593main ()
56594{
56595return XOpenDisplay ();
56596  ;
56597  return 0;
56598}
56599_ACEOF
56600if ac_fn_cxx_try_link "$LINENO"; then :
56601
56602else
56603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56604$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56605if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56606  $as_echo_n "(cached) " >&6
56607else
56608  ac_check_lib_save_LIBS=$LIBS
56609LIBS="-ldnet  $LIBS"
56610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56611/* end confdefs.h.  */
56612
56613/* Override any GCC internal prototype to avoid an error.
56614   Use char because int might match the return type of a GCC
56615   builtin and then its argument prototype would still apply.  */
56616#ifdef __cplusplus
56617extern "C"
56618#endif
56619char dnet_ntoa ();
56620int
56621main ()
56622{
56623return dnet_ntoa ();
56624  ;
56625  return 0;
56626}
56627_ACEOF
56628if ac_fn_cxx_try_link "$LINENO"; then :
56629  ac_cv_lib_dnet_dnet_ntoa=yes
56630else
56631  ac_cv_lib_dnet_dnet_ntoa=no
56632fi
56633rm -f core conftest.err conftest.$ac_objext \
56634    conftest$ac_exeext conftest.$ac_ext
56635LIBS=$ac_check_lib_save_LIBS
56636fi
56637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56638$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56639if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56640  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56641fi
56642
56643    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56645$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56646if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56647  $as_echo_n "(cached) " >&6
56648else
56649  ac_check_lib_save_LIBS=$LIBS
56650LIBS="-ldnet_stub  $LIBS"
56651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56652/* end confdefs.h.  */
56653
56654/* Override any GCC internal prototype to avoid an error.
56655   Use char because int might match the return type of a GCC
56656   builtin and then its argument prototype would still apply.  */
56657#ifdef __cplusplus
56658extern "C"
56659#endif
56660char dnet_ntoa ();
56661int
56662main ()
56663{
56664return dnet_ntoa ();
56665  ;
56666  return 0;
56667}
56668_ACEOF
56669if ac_fn_cxx_try_link "$LINENO"; then :
56670  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56671else
56672  ac_cv_lib_dnet_stub_dnet_ntoa=no
56673fi
56674rm -f core conftest.err conftest.$ac_objext \
56675    conftest$ac_exeext conftest.$ac_ext
56676LIBS=$ac_check_lib_save_LIBS
56677fi
56678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56679$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56680if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56681  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56682fi
56683
56684    fi
56685fi
56686rm -f core conftest.err conftest.$ac_objext \
56687    conftest$ac_exeext conftest.$ac_ext
56688    LIBS="$ac_xsave_LIBS"
56689
56690    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56691    # to get the SysV transport functions.
56692    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56693    # needs -lnsl.
56694    # The nsl library prevents programs from opening the X display
56695    # on Irix 5.2, according to T.E. Dickey.
56696    # The functions gethostbyname, getservbyname, and inet_addr are
56697    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56698    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56699if test "x$ac_cv_func_gethostbyname" = xyes; then :
56700
56701fi
56702
56703    if test $ac_cv_func_gethostbyname = no; then
56704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56705$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56706if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56707  $as_echo_n "(cached) " >&6
56708else
56709  ac_check_lib_save_LIBS=$LIBS
56710LIBS="-lnsl  $LIBS"
56711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56712/* end confdefs.h.  */
56713
56714/* Override any GCC internal prototype to avoid an error.
56715   Use char because int might match the return type of a GCC
56716   builtin and then its argument prototype would still apply.  */
56717#ifdef __cplusplus
56718extern "C"
56719#endif
56720char gethostbyname ();
56721int
56722main ()
56723{
56724return gethostbyname ();
56725  ;
56726  return 0;
56727}
56728_ACEOF
56729if ac_fn_cxx_try_link "$LINENO"; then :
56730  ac_cv_lib_nsl_gethostbyname=yes
56731else
56732  ac_cv_lib_nsl_gethostbyname=no
56733fi
56734rm -f core conftest.err conftest.$ac_objext \
56735    conftest$ac_exeext conftest.$ac_ext
56736LIBS=$ac_check_lib_save_LIBS
56737fi
56738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56739$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56740if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56741  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56742fi
56743
56744      if test $ac_cv_lib_nsl_gethostbyname = no; then
56745	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56746$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56747if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56748  $as_echo_n "(cached) " >&6
56749else
56750  ac_check_lib_save_LIBS=$LIBS
56751LIBS="-lbsd  $LIBS"
56752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56753/* end confdefs.h.  */
56754
56755/* Override any GCC internal prototype to avoid an error.
56756   Use char because int might match the return type of a GCC
56757   builtin and then its argument prototype would still apply.  */
56758#ifdef __cplusplus
56759extern "C"
56760#endif
56761char gethostbyname ();
56762int
56763main ()
56764{
56765return gethostbyname ();
56766  ;
56767  return 0;
56768}
56769_ACEOF
56770if ac_fn_cxx_try_link "$LINENO"; then :
56771  ac_cv_lib_bsd_gethostbyname=yes
56772else
56773  ac_cv_lib_bsd_gethostbyname=no
56774fi
56775rm -f core conftest.err conftest.$ac_objext \
56776    conftest$ac_exeext conftest.$ac_ext
56777LIBS=$ac_check_lib_save_LIBS
56778fi
56779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56780$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56781if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56782  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56783fi
56784
56785      fi
56786    fi
56787
56788    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56789    # socket/setsockopt and other routines are undefined under SCO ODT
56790    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56791    # on later versions), says Simon Leinen: it contains gethostby*
56792    # variants that don't use the name server (or something).  -lsocket
56793    # must be given before -lnsl if both are needed.  We assume that
56794    # if connect needs -lnsl, so does gethostbyname.
56795    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56796if test "x$ac_cv_func_connect" = xyes; then :
56797
56798fi
56799
56800    if test $ac_cv_func_connect = no; then
56801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56802$as_echo_n "checking for connect in -lsocket... " >&6; }
56803if ${ac_cv_lib_socket_connect+:} false; then :
56804  $as_echo_n "(cached) " >&6
56805else
56806  ac_check_lib_save_LIBS=$LIBS
56807LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56809/* end confdefs.h.  */
56810
56811/* Override any GCC internal prototype to avoid an error.
56812   Use char because int might match the return type of a GCC
56813   builtin and then its argument prototype would still apply.  */
56814#ifdef __cplusplus
56815extern "C"
56816#endif
56817char connect ();
56818int
56819main ()
56820{
56821return connect ();
56822  ;
56823  return 0;
56824}
56825_ACEOF
56826if ac_fn_cxx_try_link "$LINENO"; then :
56827  ac_cv_lib_socket_connect=yes
56828else
56829  ac_cv_lib_socket_connect=no
56830fi
56831rm -f core conftest.err conftest.$ac_objext \
56832    conftest$ac_exeext conftest.$ac_ext
56833LIBS=$ac_check_lib_save_LIBS
56834fi
56835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56836$as_echo "$ac_cv_lib_socket_connect" >&6; }
56837if test "x$ac_cv_lib_socket_connect" = xyes; then :
56838  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56839fi
56840
56841    fi
56842
56843    # Guillermo Gomez says -lposix is necessary on A/UX.
56844    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56845if test "x$ac_cv_func_remove" = xyes; then :
56846
56847fi
56848
56849    if test $ac_cv_func_remove = no; then
56850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56851$as_echo_n "checking for remove in -lposix... " >&6; }
56852if ${ac_cv_lib_posix_remove+:} false; then :
56853  $as_echo_n "(cached) " >&6
56854else
56855  ac_check_lib_save_LIBS=$LIBS
56856LIBS="-lposix  $LIBS"
56857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56858/* end confdefs.h.  */
56859
56860/* Override any GCC internal prototype to avoid an error.
56861   Use char because int might match the return type of a GCC
56862   builtin and then its argument prototype would still apply.  */
56863#ifdef __cplusplus
56864extern "C"
56865#endif
56866char remove ();
56867int
56868main ()
56869{
56870return remove ();
56871  ;
56872  return 0;
56873}
56874_ACEOF
56875if ac_fn_cxx_try_link "$LINENO"; then :
56876  ac_cv_lib_posix_remove=yes
56877else
56878  ac_cv_lib_posix_remove=no
56879fi
56880rm -f core conftest.err conftest.$ac_objext \
56881    conftest$ac_exeext conftest.$ac_ext
56882LIBS=$ac_check_lib_save_LIBS
56883fi
56884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56885$as_echo "$ac_cv_lib_posix_remove" >&6; }
56886if test "x$ac_cv_lib_posix_remove" = xyes; then :
56887  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56888fi
56889
56890    fi
56891
56892    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56893    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56894if test "x$ac_cv_func_shmat" = xyes; then :
56895
56896fi
56897
56898    if test $ac_cv_func_shmat = no; then
56899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56900$as_echo_n "checking for shmat in -lipc... " >&6; }
56901if ${ac_cv_lib_ipc_shmat+:} false; then :
56902  $as_echo_n "(cached) " >&6
56903else
56904  ac_check_lib_save_LIBS=$LIBS
56905LIBS="-lipc  $LIBS"
56906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56907/* end confdefs.h.  */
56908
56909/* Override any GCC internal prototype to avoid an error.
56910   Use char because int might match the return type of a GCC
56911   builtin and then its argument prototype would still apply.  */
56912#ifdef __cplusplus
56913extern "C"
56914#endif
56915char shmat ();
56916int
56917main ()
56918{
56919return shmat ();
56920  ;
56921  return 0;
56922}
56923_ACEOF
56924if ac_fn_cxx_try_link "$LINENO"; then :
56925  ac_cv_lib_ipc_shmat=yes
56926else
56927  ac_cv_lib_ipc_shmat=no
56928fi
56929rm -f core conftest.err conftest.$ac_objext \
56930    conftest$ac_exeext conftest.$ac_ext
56931LIBS=$ac_check_lib_save_LIBS
56932fi
56933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56934$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56935if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56936  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56937fi
56938
56939    fi
56940  fi
56941
56942  # Check for libraries that X11R6 Xt/Xaw programs need.
56943  ac_save_LDFLAGS=$LDFLAGS
56944  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56945  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56946  # check for ICE first), but we must link in the order -lSM -lICE or
56947  # we get undefined symbols.  So assume we have SM if we have ICE.
56948  # These have to be linked with before -lX11, unlike the other
56949  # libraries we check for below, so use a different variable.
56950  # John Interrante, Karl Berry
56951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56952$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56953if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56954  $as_echo_n "(cached) " >&6
56955else
56956  ac_check_lib_save_LIBS=$LIBS
56957LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56959/* end confdefs.h.  */
56960
56961/* Override any GCC internal prototype to avoid an error.
56962   Use char because int might match the return type of a GCC
56963   builtin and then its argument prototype would still apply.  */
56964#ifdef __cplusplus
56965extern "C"
56966#endif
56967char IceConnectionNumber ();
56968int
56969main ()
56970{
56971return IceConnectionNumber ();
56972  ;
56973  return 0;
56974}
56975_ACEOF
56976if ac_fn_cxx_try_link "$LINENO"; then :
56977  ac_cv_lib_ICE_IceConnectionNumber=yes
56978else
56979  ac_cv_lib_ICE_IceConnectionNumber=no
56980fi
56981rm -f core conftest.err conftest.$ac_objext \
56982    conftest$ac_exeext conftest.$ac_ext
56983LIBS=$ac_check_lib_save_LIBS
56984fi
56985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56986$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56987if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56988  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56989fi
56990
56991  LDFLAGS=$ac_save_LDFLAGS
56992
56993fi
56994
56995
56996    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56997    # this doesn't make sense so we remove it.
56998    if test "x$COMPILE_TYPE" = xcross; then
56999      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57000    fi
57001
57002    if test "x$no_x" = xyes; then
57003
57004  # Print a helpful message on how to acquire the necessary build dependency.
57005  # x11 is the help tag: freetype, cups, alsa etc
57006  MISSING_DEPENDENCY=x11
57007
57008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57009    cygwin_help $MISSING_DEPENDENCY
57010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57011    msys_help $MISSING_DEPENDENCY
57012  else
57013    PKGHANDLER_COMMAND=
57014
57015    case $PKGHANDLER in
57016      apt-get)
57017        apt_help     $MISSING_DEPENDENCY ;;
57018      yum)
57019        yum_help     $MISSING_DEPENDENCY ;;
57020      brew)
57021        brew_help    $MISSING_DEPENDENCY ;;
57022      port)
57023        port_help    $MISSING_DEPENDENCY ;;
57024      pkgutil)
57025        pkgutil_help $MISSING_DEPENDENCY ;;
57026      pkgadd)
57027        pkgadd_help  $MISSING_DEPENDENCY ;;
57028    esac
57029
57030    if test "x$PKGHANDLER_COMMAND" != x; then
57031      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57032    fi
57033  fi
57034
57035      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57036    fi
57037
57038    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57039      OPENWIN_HOME="/usr/openwin"
57040      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57041      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57042          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57043    fi
57044
57045    ac_ext=c
57046ac_cpp='$CPP $CPPFLAGS'
57047ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57048ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57049ac_compiler_gnu=$ac_cv_c_compiler_gnu
57050
57051    OLD_CFLAGS="$CFLAGS"
57052    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57053
57054    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57055    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57056do :
57057  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57058ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57059          # include <X11/Xlib.h>
57060          # include <X11/Xutil.h>
57061
57062
57063"
57064if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57065  cat >>confdefs.h <<_ACEOF
57066#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57067_ACEOF
57068 X11_HEADERS_OK=yes
57069else
57070  X11_HEADERS_OK=no; break
57071fi
57072
57073done
57074
57075
57076    if test "x$X11_HEADERS_OK" = xno; then
57077
57078  # Print a helpful message on how to acquire the necessary build dependency.
57079  # x11 is the help tag: freetype, cups, alsa etc
57080  MISSING_DEPENDENCY=x11
57081
57082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57083    cygwin_help $MISSING_DEPENDENCY
57084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57085    msys_help $MISSING_DEPENDENCY
57086  else
57087    PKGHANDLER_COMMAND=
57088
57089    case $PKGHANDLER in
57090      apt-get)
57091        apt_help     $MISSING_DEPENDENCY ;;
57092      yum)
57093        yum_help     $MISSING_DEPENDENCY ;;
57094      brew)
57095        brew_help    $MISSING_DEPENDENCY ;;
57096      port)
57097        port_help    $MISSING_DEPENDENCY ;;
57098      pkgutil)
57099        pkgutil_help $MISSING_DEPENDENCY ;;
57100      pkgadd)
57101        pkgadd_help  $MISSING_DEPENDENCY ;;
57102    esac
57103
57104    if test "x$PKGHANDLER_COMMAND" != x; then
57105      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57106    fi
57107  fi
57108
57109      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57110    fi
57111
57112    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57113    # defined in libawt_xawt.
57114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57115$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57116    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57117/* end confdefs.h.  */
57118#include <X11/extensions/Xrender.h>
57119int
57120main ()
57121{
57122XLinearGradient x;
57123  ;
57124  return 0;
57125}
57126_ACEOF
57127if ac_fn_c_try_compile "$LINENO"; then :
57128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57129$as_echo "yes" >&6; }
57130else
57131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57132$as_echo "no" >&6; }
57133         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57134fi
57135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57136
57137    CFLAGS="$OLD_CFLAGS"
57138    ac_ext=cpp
57139ac_cpp='$CXXCPP $CPPFLAGS'
57140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57143
57144  fi # NEEDS_LIB_X11
57145
57146
57147
57148
57149
57150
57151# Check whether --with-cups was given.
57152if test "${with_cups+set}" = set; then :
57153  withval=$with_cups;
57154fi
57155
57156
57157# Check whether --with-cups-include was given.
57158if test "${with_cups_include+set}" = set; then :
57159  withval=$with_cups_include;
57160fi
57161
57162
57163  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57164    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57165        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57166      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57167$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57168    fi
57169    CUPS_CFLAGS=
57170  else
57171    CUPS_FOUND=no
57172
57173    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57174      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57175    fi
57176
57177    if test "x${with_cups}" != x; then
57178      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57179$as_echo_n "checking for cups headers... " >&6; }
57180      if test -s "${with_cups}/include/cups/cups.h"; then
57181        CUPS_CFLAGS="-I${with_cups}/include"
57182        CUPS_FOUND=yes
57183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57184$as_echo "$CUPS_FOUND" >&6; }
57185      else
57186        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57187      fi
57188    fi
57189    if test "x${with_cups_include}" != x; then
57190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57191$as_echo_n "checking for cups headers... " >&6; }
57192      if test -s "${with_cups_include}/cups/cups.h"; then
57193        CUPS_CFLAGS="-I${with_cups_include}"
57194        CUPS_FOUND=yes
57195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57196$as_echo "$CUPS_FOUND" >&6; }
57197      else
57198        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57199      fi
57200    fi
57201    if test "x$CUPS_FOUND" = xno; then
57202      # Are the cups headers installed in the default /usr/include location?
57203      for ac_header in cups/cups.h cups/ppd.h
57204do :
57205  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57206ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57207if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57208  cat >>confdefs.h <<_ACEOF
57209#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57210_ACEOF
57211
57212          CUPS_FOUND=yes
57213          CUPS_CFLAGS=
57214          DEFAULT_CUPS=yes
57215
57216fi
57217
57218done
57219
57220    fi
57221    if test "x$CUPS_FOUND" = xno; then
57222
57223  # Print a helpful message on how to acquire the necessary build dependency.
57224  # cups is the help tag: freetype, cups, alsa etc
57225  MISSING_DEPENDENCY=cups
57226
57227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57228    cygwin_help $MISSING_DEPENDENCY
57229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57230    msys_help $MISSING_DEPENDENCY
57231  else
57232    PKGHANDLER_COMMAND=
57233
57234    case $PKGHANDLER in
57235      apt-get)
57236        apt_help     $MISSING_DEPENDENCY ;;
57237      yum)
57238        yum_help     $MISSING_DEPENDENCY ;;
57239      brew)
57240        brew_help    $MISSING_DEPENDENCY ;;
57241      port)
57242        port_help    $MISSING_DEPENDENCY ;;
57243      pkgutil)
57244        pkgutil_help $MISSING_DEPENDENCY ;;
57245      pkgadd)
57246        pkgadd_help  $MISSING_DEPENDENCY ;;
57247    esac
57248
57249    if test "x$PKGHANDLER_COMMAND" != x; then
57250      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57251    fi
57252  fi
57253
57254      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57255    fi
57256  fi
57257
57258
57259
57260
57261
57262# Check whether --with-freetype was given.
57263if test "${with_freetype+set}" = set; then :
57264  withval=$with_freetype;
57265fi
57266
57267
57268# Check whether --with-freetype-include was given.
57269if test "${with_freetype_include+set}" = set; then :
57270  withval=$with_freetype_include;
57271fi
57272
57273
57274# Check whether --with-freetype-lib was given.
57275if test "${with_freetype_lib+set}" = set; then :
57276  withval=$with_freetype_lib;
57277fi
57278
57279
57280# Check whether --with-freetype-src was given.
57281if test "${with_freetype_src+set}" = set; then :
57282  withval=$with_freetype_src;
57283fi
57284
57285  # Check whether --enable-freetype-bundling was given.
57286if test "${enable_freetype_bundling+set}" = set; then :
57287  enableval=$enable_freetype_bundling;
57288fi
57289
57290
57291  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57292  FREETYPE_BASE_NAME=freetype
57293  FREETYPE_CFLAGS=
57294  FREETYPE_LIBS=
57295  FREETYPE_BUNDLE_LIB_PATH=
57296
57297  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57298    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57299        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57300        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57301        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57302      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57303$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57304    fi
57305    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57306      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57307$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57308    fi
57309  else
57310    # freetype is needed to build; go get it!
57311
57312    BUNDLE_FREETYPE="$enable_freetype_bundling"
57313
57314    if  test "x$with_freetype_src" != x; then
57315      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57316        # Try to build freetype if --with-freetype-src was given on Windows
57317
57318  FREETYPE_SRC_PATH="$with_freetype_src"
57319  BUILD_FREETYPE=yes
57320
57321  # Check if the freetype sources are acessible..
57322  if ! test -d $FREETYPE_SRC_PATH; then
57323    { $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
57324$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57325    BUILD_FREETYPE=no
57326  fi
57327  # ..and contain a vc2010 project file
57328  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57329  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57330    { $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
57331$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57332    BUILD_FREETYPE=no
57333  fi
57334  # Now check if configure found a version of 'msbuild.exe'
57335  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57336    { $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
57337$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;}
57338    BUILD_FREETYPE=no
57339  fi
57340
57341  # Ready to go..
57342  if test "x$BUILD_FREETYPE" = xyes; then
57343    # msbuild requires trailing slashes for output directories
57344    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57345    freetype_lib_path_unix="$freetype_lib_path"
57346    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57347
57348  unix_path="$vcxproj_path"
57349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57350    windows_path=`$CYGPATH -m "$unix_path"`
57351    vcxproj_path="$windows_path"
57352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57353    windows_path=`cmd //c echo $unix_path`
57354    vcxproj_path="$windows_path"
57355  fi
57356
57357
57358  unix_path="$freetype_lib_path"
57359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57360    windows_path=`$CYGPATH -m "$unix_path"`
57361    freetype_lib_path="$windows_path"
57362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57363    windows_path=`cmd //c echo $unix_path`
57364    freetype_lib_path="$windows_path"
57365  fi
57366
57367
57368  unix_path="$freetype_obj_path"
57369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57370    windows_path=`$CYGPATH -m "$unix_path"`
57371    freetype_obj_path="$windows_path"
57372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57373    windows_path=`cmd //c echo $unix_path`
57374    freetype_obj_path="$windows_path"
57375  fi
57376
57377    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57378      freetype_platform=x64
57379    else
57380      freetype_platform=win32
57381    fi
57382
57383    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57384    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57385    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57386    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57387    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57388$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57389
57390    # First we try to build the freetype.dll
57391    $ECHO -e "@echo off\n"\
57392        "$MSBUILD $vcxproj_path "\
57393        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57394        "/p:Configuration=\"Release Multithreaded\" "\
57395        "/p:Platform=$freetype_platform "\
57396        "/p:ConfigurationType=DynamicLibrary "\
57397        "/p:TargetName=freetype "\
57398        "/p:OutDir=\"$freetype_lib_path\" "\
57399        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57400    cmd /c freetype.bat
57401
57402    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57403      # If that succeeds we also build freetype.lib
57404      $ECHO -e "@echo off\n"\
57405          "$MSBUILD $vcxproj_path "\
57406          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57407          "/p:Configuration=\"Release Multithreaded\" "\
57408          "/p:Platform=$freetype_platform "\
57409          "/p:ConfigurationType=StaticLibrary "\
57410          "/p:TargetName=freetype "\
57411          "/p:OutDir=\"$freetype_lib_path\" "\
57412          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57413      cmd /c freetype.bat
57414
57415      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57416        # Once we build both, lib and dll, set freetype lib and include path appropriately
57417        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57418        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57419        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57420$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57421      else
57422        BUILD_FREETYPE=no
57423      fi
57424    else
57425      BUILD_FREETYPE=no
57426    fi
57427  fi
57428
57429        if test "x$BUILD_FREETYPE" = xyes; then
57430          # Okay, we built it. Check that it works.
57431
57432  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57433  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57434  METHOD="--with-freetype-src"
57435
57436  # Let's start with an optimistic view of the world :-)
57437  FOUND_FREETYPE=yes
57438
57439  # First look for the canonical freetype main include file ft2build.h.
57440  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57441    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57442    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57443    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57444      # Fail.
57445      FOUND_FREETYPE=no
57446    fi
57447  fi
57448
57449  if test "x$FOUND_FREETYPE" = xyes; then
57450    # Include file found, let's continue the sanity check.
57451    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57452$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57453
57454    # Reset to default value
57455    FREETYPE_BASE_NAME=freetype
57456    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57457    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57458      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57459          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57460        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57461        # for the .6 version explicitly.
57462        FREETYPE_BASE_NAME=freetype.6
57463        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57464        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57465$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57466      else
57467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57468$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57469        FOUND_FREETYPE=no
57470      fi
57471    else
57472      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57473        # On Windows, we will need both .lib and .dll file.
57474        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57475          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57476$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57477          FOUND_FREETYPE=no
57478        fi
57479      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57480          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57481        # Found lib in isa dir, use that instead.
57482        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57483        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57484$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57485      fi
57486    fi
57487  fi
57488
57489  if test "x$FOUND_FREETYPE" = xyes; then
57490
57491  # Only process if variable expands to non-empty
57492
57493  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57495
57496  # Input might be given as Windows format, start by converting to
57497  # unix format.
57498  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57499  new_path=`$CYGPATH -u "$path"`
57500
57501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57504  # "foo.exe" is OK but "foo" is an error.
57505  #
57506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57507  # It is also a way to make sure we got the proper file name for the real test later on.
57508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57509  if test "x$test_shortpath" = x; then
57510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57512    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57513  fi
57514
57515  # Call helper function which possibly converts this using DOS-style short mode.
57516  # If so, the updated path is stored in $new_path.
57517
57518  input_path="$new_path"
57519  # Check if we need to convert this using DOS-style short mode. If the path
57520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57521  # take no chances and rewrite it.
57522  # Note: m4 eats our [], so we need to use [ and ] instead.
57523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57524  if test "x$has_forbidden_chars" != x; then
57525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57529      # Going to short mode and back again did indeed matter. Since short mode is
57530      # case insensitive, let's make it lowercase to improve readability.
57531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57532      # Now convert it back to Unix-style (cygpath)
57533      input_path=`$CYGPATH -u "$shortmode_path"`
57534      new_path="$input_path"
57535    fi
57536  fi
57537
57538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57539  if test "x$test_cygdrive_prefix" = x; then
57540    # As a simple fix, exclude /usr/bin since it's not a real path.
57541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57543      # a path prefixed by /cygdrive for fixpath to work.
57544      new_path="$CYGWIN_ROOT_PATH$input_path"
57545    fi
57546  fi
57547
57548
57549  if test "x$path" != "x$new_path"; then
57550    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57553  fi
57554
57555    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57556
57557  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57558  has_colon=`$ECHO $path | $GREP ^.:`
57559  new_path="$path"
57560  if test "x$has_colon" = x; then
57561    # Not in mixed or Windows style, start by that.
57562    new_path=`cmd //c echo $path`
57563  fi
57564
57565
57566  input_path="$new_path"
57567  # Check if we need to convert this using DOS-style short mode. If the path
57568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57569  # take no chances and rewrite it.
57570  # Note: m4 eats our [], so we need to use [ and ] instead.
57571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57572  if test "x$has_forbidden_chars" != x; then
57573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57575  fi
57576
57577
57578  windows_path="$new_path"
57579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57580    unix_path=`$CYGPATH -u "$windows_path"`
57581    new_path="$unix_path"
57582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57584    new_path="$unix_path"
57585  fi
57586
57587  if test "x$path" != "x$new_path"; then
57588    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57591  fi
57592
57593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57595
57596    else
57597      # We're on a unix platform. Hooray! :)
57598      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57599      has_space=`$ECHO "$path" | $GREP " "`
57600      if test "x$has_space" != x; then
57601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57602$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57603        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57604      fi
57605
57606      # Use eval to expand a potential ~
57607      eval path="$path"
57608      if test ! -f "$path" && test ! -d "$path"; then
57609        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57610      fi
57611
57612      if test -d "$path"; then
57613        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57614      else
57615        dir="`$DIRNAME "$path"`"
57616        base="`$BASENAME "$path"`"
57617        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57618      fi
57619    fi
57620  fi
57621
57622
57623  # Only process if variable expands to non-empty
57624
57625  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57627
57628  # Input might be given as Windows format, start by converting to
57629  # unix format.
57630  path="$POTENTIAL_FREETYPE_LIB_PATH"
57631  new_path=`$CYGPATH -u "$path"`
57632
57633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57636  # "foo.exe" is OK but "foo" is an error.
57637  #
57638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57639  # It is also a way to make sure we got the proper file name for the real test later on.
57640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57641  if test "x$test_shortpath" = x; then
57642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57645  fi
57646
57647  # Call helper function which possibly converts this using DOS-style short mode.
57648  # If so, the updated path is stored in $new_path.
57649
57650  input_path="$new_path"
57651  # Check if we need to convert this using DOS-style short mode. If the path
57652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57653  # take no chances and rewrite it.
57654  # Note: m4 eats our [], so we need to use [ and ] instead.
57655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57656  if test "x$has_forbidden_chars" != x; then
57657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57661      # Going to short mode and back again did indeed matter. Since short mode is
57662      # case insensitive, let's make it lowercase to improve readability.
57663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57664      # Now convert it back to Unix-style (cygpath)
57665      input_path=`$CYGPATH -u "$shortmode_path"`
57666      new_path="$input_path"
57667    fi
57668  fi
57669
57670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57671  if test "x$test_cygdrive_prefix" = x; then
57672    # As a simple fix, exclude /usr/bin since it's not a real path.
57673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57675      # a path prefixed by /cygdrive for fixpath to work.
57676      new_path="$CYGWIN_ROOT_PATH$input_path"
57677    fi
57678  fi
57679
57680
57681  if test "x$path" != "x$new_path"; then
57682    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57685  fi
57686
57687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57688
57689  path="$POTENTIAL_FREETYPE_LIB_PATH"
57690  has_colon=`$ECHO $path | $GREP ^.:`
57691  new_path="$path"
57692  if test "x$has_colon" = x; then
57693    # Not in mixed or Windows style, start by that.
57694    new_path=`cmd //c echo $path`
57695  fi
57696
57697
57698  input_path="$new_path"
57699  # Check if we need to convert this using DOS-style short mode. If the path
57700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57701  # take no chances and rewrite it.
57702  # Note: m4 eats our [], so we need to use [ and ] instead.
57703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57704  if test "x$has_forbidden_chars" != x; then
57705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57707  fi
57708
57709
57710  windows_path="$new_path"
57711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57712    unix_path=`$CYGPATH -u "$windows_path"`
57713    new_path="$unix_path"
57714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57716    new_path="$unix_path"
57717  fi
57718
57719  if test "x$path" != "x$new_path"; then
57720    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57723  fi
57724
57725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57727
57728    else
57729      # We're on a unix platform. Hooray! :)
57730      path="$POTENTIAL_FREETYPE_LIB_PATH"
57731      has_space=`$ECHO "$path" | $GREP " "`
57732      if test "x$has_space" != x; then
57733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57736      fi
57737
57738      # Use eval to expand a potential ~
57739      eval path="$path"
57740      if test ! -f "$path" && test ! -d "$path"; then
57741        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57742      fi
57743
57744      if test -d "$path"; then
57745        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57746      else
57747        dir="`$DIRNAME "$path"`"
57748        base="`$BASENAME "$path"`"
57749        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57750      fi
57751    fi
57752  fi
57753
57754
57755    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57757$as_echo_n "checking for freetype includes... " >&6; }
57758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57759$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57760    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57762$as_echo_n "checking for freetype libraries... " >&6; }
57763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57764$as_echo "$FREETYPE_LIB_PATH" >&6; }
57765  fi
57766
57767          if test "x$FOUND_FREETYPE" != xyes; then
57768            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57769          fi
57770        else
57771          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57772$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57773          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57774        fi
57775      else
57776        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57777$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57778      fi
57779    fi
57780
57781    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57782      # User has specified settings
57783
57784      if test "x$BUNDLE_FREETYPE" = x; then
57785        # If not specified, default is to bundle freetype
57786        BUNDLE_FREETYPE=yes
57787      fi
57788
57789      if test "x$with_freetype" != x; then
57790        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57791        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57792      fi
57793
57794      # Allow --with-freetype-lib and --with-freetype-include to override
57795      if test "x$with_freetype_include" != x; then
57796        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57797      fi
57798      if test "x$with_freetype_lib" != x; then
57799        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57800      fi
57801
57802      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57803        # Okay, we got it. Check that it works.
57804
57805  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57806  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57807  METHOD="--with-freetype"
57808
57809  # Let's start with an optimistic view of the world :-)
57810  FOUND_FREETYPE=yes
57811
57812  # First look for the canonical freetype main include file ft2build.h.
57813  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57814    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57815    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57816    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57817      # Fail.
57818      FOUND_FREETYPE=no
57819    fi
57820  fi
57821
57822  if test "x$FOUND_FREETYPE" = xyes; then
57823    # Include file found, let's continue the sanity check.
57824    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57825$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57826
57827    # Reset to default value
57828    FREETYPE_BASE_NAME=freetype
57829    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57830    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57831      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57832          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57833        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57834        # for the .6 version explicitly.
57835        FREETYPE_BASE_NAME=freetype.6
57836        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57837        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57838$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57839      else
57840        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57841$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57842        FOUND_FREETYPE=no
57843      fi
57844    else
57845      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57846        # On Windows, we will need both .lib and .dll file.
57847        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57848          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57849$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57850          FOUND_FREETYPE=no
57851        fi
57852      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57854        # Found lib in isa dir, use that instead.
57855        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57856        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57857$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57858      fi
57859    fi
57860  fi
57861
57862  if test "x$FOUND_FREETYPE" = xyes; then
57863
57864  # Only process if variable expands to non-empty
57865
57866  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57868
57869  # Input might be given as Windows format, start by converting to
57870  # unix format.
57871  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57872  new_path=`$CYGPATH -u "$path"`
57873
57874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57877  # "foo.exe" is OK but "foo" is an error.
57878  #
57879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57880  # It is also a way to make sure we got the proper file name for the real test later on.
57881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57882  if test "x$test_shortpath" = x; then
57883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57886  fi
57887
57888  # Call helper function which possibly converts this using DOS-style short mode.
57889  # If so, the updated path is stored in $new_path.
57890
57891  input_path="$new_path"
57892  # Check if we need to convert this using DOS-style short mode. If the path
57893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57894  # take no chances and rewrite it.
57895  # Note: m4 eats our [], so we need to use [ and ] instead.
57896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57897  if test "x$has_forbidden_chars" != x; then
57898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57902      # Going to short mode and back again did indeed matter. Since short mode is
57903      # case insensitive, let's make it lowercase to improve readability.
57904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57905      # Now convert it back to Unix-style (cygpath)
57906      input_path=`$CYGPATH -u "$shortmode_path"`
57907      new_path="$input_path"
57908    fi
57909  fi
57910
57911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57912  if test "x$test_cygdrive_prefix" = x; then
57913    # As a simple fix, exclude /usr/bin since it's not a real path.
57914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57916      # a path prefixed by /cygdrive for fixpath to work.
57917      new_path="$CYGWIN_ROOT_PATH$input_path"
57918    fi
57919  fi
57920
57921
57922  if test "x$path" != "x$new_path"; then
57923    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57926  fi
57927
57928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57929
57930  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57931  has_colon=`$ECHO $path | $GREP ^.:`
57932  new_path="$path"
57933  if test "x$has_colon" = x; then
57934    # Not in mixed or Windows style, start by that.
57935    new_path=`cmd //c echo $path`
57936  fi
57937
57938
57939  input_path="$new_path"
57940  # Check if we need to convert this using DOS-style short mode. If the path
57941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57942  # take no chances and rewrite it.
57943  # Note: m4 eats our [], so we need to use [ and ] instead.
57944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57945  if test "x$has_forbidden_chars" != x; then
57946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57948  fi
57949
57950
57951  windows_path="$new_path"
57952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57953    unix_path=`$CYGPATH -u "$windows_path"`
57954    new_path="$unix_path"
57955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57957    new_path="$unix_path"
57958  fi
57959
57960  if test "x$path" != "x$new_path"; then
57961    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57964  fi
57965
57966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57968
57969    else
57970      # We're on a unix platform. Hooray! :)
57971      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57972      has_space=`$ECHO "$path" | $GREP " "`
57973      if test "x$has_space" != x; then
57974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57977      fi
57978
57979      # Use eval to expand a potential ~
57980      eval path="$path"
57981      if test ! -f "$path" && test ! -d "$path"; then
57982        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57983      fi
57984
57985      if test -d "$path"; then
57986        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57987      else
57988        dir="`$DIRNAME "$path"`"
57989        base="`$BASENAME "$path"`"
57990        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57991      fi
57992    fi
57993  fi
57994
57995
57996  # Only process if variable expands to non-empty
57997
57998  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58000
58001  # Input might be given as Windows format, start by converting to
58002  # unix format.
58003  path="$POTENTIAL_FREETYPE_LIB_PATH"
58004  new_path=`$CYGPATH -u "$path"`
58005
58006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58009  # "foo.exe" is OK but "foo" is an error.
58010  #
58011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58012  # It is also a way to make sure we got the proper file name for the real test later on.
58013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58014  if test "x$test_shortpath" = x; then
58015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58017    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58018  fi
58019
58020  # Call helper function which possibly converts this using DOS-style short mode.
58021  # If so, the updated path is stored in $new_path.
58022
58023  input_path="$new_path"
58024  # Check if we need to convert this using DOS-style short mode. If the path
58025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58026  # take no chances and rewrite it.
58027  # Note: m4 eats our [], so we need to use [ and ] instead.
58028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58029  if test "x$has_forbidden_chars" != x; then
58030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58034      # Going to short mode and back again did indeed matter. Since short mode is
58035      # case insensitive, let's make it lowercase to improve readability.
58036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58037      # Now convert it back to Unix-style (cygpath)
58038      input_path=`$CYGPATH -u "$shortmode_path"`
58039      new_path="$input_path"
58040    fi
58041  fi
58042
58043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58044  if test "x$test_cygdrive_prefix" = x; then
58045    # As a simple fix, exclude /usr/bin since it's not a real path.
58046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58048      # a path prefixed by /cygdrive for fixpath to work.
58049      new_path="$CYGWIN_ROOT_PATH$input_path"
58050    fi
58051  fi
58052
58053
58054  if test "x$path" != "x$new_path"; then
58055    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58057$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58058  fi
58059
58060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58061
58062  path="$POTENTIAL_FREETYPE_LIB_PATH"
58063  has_colon=`$ECHO $path | $GREP ^.:`
58064  new_path="$path"
58065  if test "x$has_colon" = x; then
58066    # Not in mixed or Windows style, start by that.
58067    new_path=`cmd //c echo $path`
58068  fi
58069
58070
58071  input_path="$new_path"
58072  # Check if we need to convert this using DOS-style short mode. If the path
58073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58074  # take no chances and rewrite it.
58075  # Note: m4 eats our [], so we need to use [ and ] instead.
58076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58077  if test "x$has_forbidden_chars" != x; then
58078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58080  fi
58081
58082
58083  windows_path="$new_path"
58084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58085    unix_path=`$CYGPATH -u "$windows_path"`
58086    new_path="$unix_path"
58087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58089    new_path="$unix_path"
58090  fi
58091
58092  if test "x$path" != "x$new_path"; then
58093    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58096  fi
58097
58098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58100
58101    else
58102      # We're on a unix platform. Hooray! :)
58103      path="$POTENTIAL_FREETYPE_LIB_PATH"
58104      has_space=`$ECHO "$path" | $GREP " "`
58105      if test "x$has_space" != x; then
58106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58107$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58109      fi
58110
58111      # Use eval to expand a potential ~
58112      eval path="$path"
58113      if test ! -f "$path" && test ! -d "$path"; then
58114        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58115      fi
58116
58117      if test -d "$path"; then
58118        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58119      else
58120        dir="`$DIRNAME "$path"`"
58121        base="`$BASENAME "$path"`"
58122        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58123      fi
58124    fi
58125  fi
58126
58127
58128    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58130$as_echo_n "checking for freetype includes... " >&6; }
58131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58132$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58133    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58135$as_echo_n "checking for freetype libraries... " >&6; }
58136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58137$as_echo "$FREETYPE_LIB_PATH" >&6; }
58138  fi
58139
58140        if test "x$FOUND_FREETYPE" != xyes; then
58141          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58142        fi
58143      else
58144        # User specified only one of lib or include. This is an error.
58145        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58146          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58147$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58148          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58149        else
58150          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58151$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58152          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58153        fi
58154      fi
58155    else
58156      # User did not specify settings, but we need freetype. Try to locate it.
58157
58158      if test "x$BUNDLE_FREETYPE" = x; then
58159        # If not specified, default is to bundle freetype only on windows
58160        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58161          BUNDLE_FREETYPE=yes
58162        else
58163          BUNDLE_FREETYPE=no
58164        fi
58165      fi
58166
58167      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58168      if test "x$SYSROOT" = x; then
58169        if test "x$FOUND_FREETYPE" != xyes; then
58170          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58171          if test "x$PKG_CONFIG" != x; then
58172
58173pkg_failed=no
58174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58175$as_echo_n "checking for FREETYPE... " >&6; }
58176
58177if test -n "$FREETYPE_CFLAGS"; then
58178    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58179 elif test -n "$PKG_CONFIG"; then
58180    if test -n "$PKG_CONFIG" && \
58181    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58182  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58183  ac_status=$?
58184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58185  test $ac_status = 0; }; then
58186  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58187else
58188  pkg_failed=yes
58189fi
58190 else
58191    pkg_failed=untried
58192fi
58193if test -n "$FREETYPE_LIBS"; then
58194    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58195 elif test -n "$PKG_CONFIG"; then
58196    if test -n "$PKG_CONFIG" && \
58197    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58198  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58199  ac_status=$?
58200  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58201  test $ac_status = 0; }; then
58202  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58203else
58204  pkg_failed=yes
58205fi
58206 else
58207    pkg_failed=untried
58208fi
58209
58210
58211
58212if test $pkg_failed = yes; then
58213
58214if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58215        _pkg_short_errors_supported=yes
58216else
58217        _pkg_short_errors_supported=no
58218fi
58219        if test $_pkg_short_errors_supported = yes; then
58220	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58221        else
58222	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58223        fi
58224	# Put the nasty error message in config.log where it belongs
58225	echo "$FREETYPE_PKG_ERRORS" >&5
58226
58227	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58228$as_echo "no" >&6; }
58229                FOUND_FREETYPE=no
58230elif test $pkg_failed = untried; then
58231	FOUND_FREETYPE=no
58232else
58233	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58234	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58236$as_echo "yes" >&6; }
58237	FOUND_FREETYPE=yes
58238fi
58239            if test "x$FOUND_FREETYPE" = xyes; then
58240              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58241              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58242              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58243              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58244                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58245              fi
58246              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58247              if test "x$BUNDLE_FREETYPE" = xyes; then
58248                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58249$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58250                FOUND_FREETYPE=no
58251              else
58252                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58253$as_echo_n "checking for freetype... " >&6; }
58254                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58255$as_echo "yes (using pkg-config)" >&6; }
58256              fi
58257            fi
58258          fi
58259        fi
58260      fi
58261
58262      if test "x$FOUND_FREETYPE" != xyes; then
58263        # Check in well-known locations
58264        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58265          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58266
58267  windows_path="$FREETYPE_BASE_DIR"
58268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58269    unix_path=`$CYGPATH -u "$windows_path"`
58270    FREETYPE_BASE_DIR="$unix_path"
58271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58273    FREETYPE_BASE_DIR="$unix_path"
58274  fi
58275
58276
58277  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58278  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58279  METHOD="well-known location"
58280
58281  # Let's start with an optimistic view of the world :-)
58282  FOUND_FREETYPE=yes
58283
58284  # First look for the canonical freetype main include file ft2build.h.
58285  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58286    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58287    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58288    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58289      # Fail.
58290      FOUND_FREETYPE=no
58291    fi
58292  fi
58293
58294  if test "x$FOUND_FREETYPE" = xyes; then
58295    # Include file found, let's continue the sanity check.
58296    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58297$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58298
58299    # Reset to default value
58300    FREETYPE_BASE_NAME=freetype
58301    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58302    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58303      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58304          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58305        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58306        # for the .6 version explicitly.
58307        FREETYPE_BASE_NAME=freetype.6
58308        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58309        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58310$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58311      else
58312        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58313$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58314        FOUND_FREETYPE=no
58315      fi
58316    else
58317      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58318        # On Windows, we will need both .lib and .dll file.
58319        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58320          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58321$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58322          FOUND_FREETYPE=no
58323        fi
58324      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58325          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58326        # Found lib in isa dir, use that instead.
58327        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58328        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58329$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58330      fi
58331    fi
58332  fi
58333
58334  if test "x$FOUND_FREETYPE" = xyes; then
58335
58336  # Only process if variable expands to non-empty
58337
58338  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58340
58341  # Input might be given as Windows format, start by converting to
58342  # unix format.
58343  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58344  new_path=`$CYGPATH -u "$path"`
58345
58346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58349  # "foo.exe" is OK but "foo" is an error.
58350  #
58351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58352  # It is also a way to make sure we got the proper file name for the real test later on.
58353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58354  if test "x$test_shortpath" = x; then
58355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58357    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58358  fi
58359
58360  # Call helper function which possibly converts this using DOS-style short mode.
58361  # If so, the updated path is stored in $new_path.
58362
58363  input_path="$new_path"
58364  # Check if we need to convert this using DOS-style short mode. If the path
58365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58366  # take no chances and rewrite it.
58367  # Note: m4 eats our [], so we need to use [ and ] instead.
58368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58369  if test "x$has_forbidden_chars" != x; then
58370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58374      # Going to short mode and back again did indeed matter. Since short mode is
58375      # case insensitive, let's make it lowercase to improve readability.
58376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58377      # Now convert it back to Unix-style (cygpath)
58378      input_path=`$CYGPATH -u "$shortmode_path"`
58379      new_path="$input_path"
58380    fi
58381  fi
58382
58383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58384  if test "x$test_cygdrive_prefix" = x; then
58385    # As a simple fix, exclude /usr/bin since it's not a real path.
58386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58388      # a path prefixed by /cygdrive for fixpath to work.
58389      new_path="$CYGWIN_ROOT_PATH$input_path"
58390    fi
58391  fi
58392
58393
58394  if test "x$path" != "x$new_path"; then
58395    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58398  fi
58399
58400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58401
58402  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58403  has_colon=`$ECHO $path | $GREP ^.:`
58404  new_path="$path"
58405  if test "x$has_colon" = x; then
58406    # Not in mixed or Windows style, start by that.
58407    new_path=`cmd //c echo $path`
58408  fi
58409
58410
58411  input_path="$new_path"
58412  # Check if we need to convert this using DOS-style short mode. If the path
58413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58414  # take no chances and rewrite it.
58415  # Note: m4 eats our [], so we need to use [ and ] instead.
58416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58417  if test "x$has_forbidden_chars" != x; then
58418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58420  fi
58421
58422
58423  windows_path="$new_path"
58424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58425    unix_path=`$CYGPATH -u "$windows_path"`
58426    new_path="$unix_path"
58427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58429    new_path="$unix_path"
58430  fi
58431
58432  if test "x$path" != "x$new_path"; then
58433    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58436  fi
58437
58438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58440
58441    else
58442      # We're on a unix platform. Hooray! :)
58443      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58444      has_space=`$ECHO "$path" | $GREP " "`
58445      if test "x$has_space" != x; then
58446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58449      fi
58450
58451      # Use eval to expand a potential ~
58452      eval path="$path"
58453      if test ! -f "$path" && test ! -d "$path"; then
58454        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58455      fi
58456
58457      if test -d "$path"; then
58458        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58459      else
58460        dir="`$DIRNAME "$path"`"
58461        base="`$BASENAME "$path"`"
58462        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58463      fi
58464    fi
58465  fi
58466
58467
58468  # Only process if variable expands to non-empty
58469
58470  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58472
58473  # Input might be given as Windows format, start by converting to
58474  # unix format.
58475  path="$POTENTIAL_FREETYPE_LIB_PATH"
58476  new_path=`$CYGPATH -u "$path"`
58477
58478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58481  # "foo.exe" is OK but "foo" is an error.
58482  #
58483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58484  # It is also a way to make sure we got the proper file name for the real test later on.
58485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58486  if test "x$test_shortpath" = x; then
58487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58489    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58490  fi
58491
58492  # Call helper function which possibly converts this using DOS-style short mode.
58493  # If so, the updated path is stored in $new_path.
58494
58495  input_path="$new_path"
58496  # Check if we need to convert this using DOS-style short mode. If the path
58497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58498  # take no chances and rewrite it.
58499  # Note: m4 eats our [], so we need to use [ and ] instead.
58500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58501  if test "x$has_forbidden_chars" != x; then
58502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58506      # Going to short mode and back again did indeed matter. Since short mode is
58507      # case insensitive, let's make it lowercase to improve readability.
58508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58509      # Now convert it back to Unix-style (cygpath)
58510      input_path=`$CYGPATH -u "$shortmode_path"`
58511      new_path="$input_path"
58512    fi
58513  fi
58514
58515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58516  if test "x$test_cygdrive_prefix" = x; then
58517    # As a simple fix, exclude /usr/bin since it's not a real path.
58518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58520      # a path prefixed by /cygdrive for fixpath to work.
58521      new_path="$CYGWIN_ROOT_PATH$input_path"
58522    fi
58523  fi
58524
58525
58526  if test "x$path" != "x$new_path"; then
58527    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58529$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58530  fi
58531
58532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58533
58534  path="$POTENTIAL_FREETYPE_LIB_PATH"
58535  has_colon=`$ECHO $path | $GREP ^.:`
58536  new_path="$path"
58537  if test "x$has_colon" = x; then
58538    # Not in mixed or Windows style, start by that.
58539    new_path=`cmd //c echo $path`
58540  fi
58541
58542
58543  input_path="$new_path"
58544  # Check if we need to convert this using DOS-style short mode. If the path
58545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58546  # take no chances and rewrite it.
58547  # Note: m4 eats our [], so we need to use [ and ] instead.
58548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58549  if test "x$has_forbidden_chars" != x; then
58550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58552  fi
58553
58554
58555  windows_path="$new_path"
58556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58557    unix_path=`$CYGPATH -u "$windows_path"`
58558    new_path="$unix_path"
58559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58561    new_path="$unix_path"
58562  fi
58563
58564  if test "x$path" != "x$new_path"; then
58565    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58568  fi
58569
58570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58572
58573    else
58574      # We're on a unix platform. Hooray! :)
58575      path="$POTENTIAL_FREETYPE_LIB_PATH"
58576      has_space=`$ECHO "$path" | $GREP " "`
58577      if test "x$has_space" != x; then
58578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58579$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58581      fi
58582
58583      # Use eval to expand a potential ~
58584      eval path="$path"
58585      if test ! -f "$path" && test ! -d "$path"; then
58586        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58587      fi
58588
58589      if test -d "$path"; then
58590        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58591      else
58592        dir="`$DIRNAME "$path"`"
58593        base="`$BASENAME "$path"`"
58594        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58595      fi
58596    fi
58597  fi
58598
58599
58600    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58602$as_echo_n "checking for freetype includes... " >&6; }
58603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58604$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58605    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58607$as_echo_n "checking for freetype libraries... " >&6; }
58608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58609$as_echo "$FREETYPE_LIB_PATH" >&6; }
58610  fi
58611
58612          if test "x$FOUND_FREETYPE" != xyes; then
58613            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58614
58615  windows_path="$FREETYPE_BASE_DIR"
58616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58617    unix_path=`$CYGPATH -u "$windows_path"`
58618    FREETYPE_BASE_DIR="$unix_path"
58619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58621    FREETYPE_BASE_DIR="$unix_path"
58622  fi
58623
58624
58625  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58626  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58627  METHOD="well-known location"
58628
58629  # Let's start with an optimistic view of the world :-)
58630  FOUND_FREETYPE=yes
58631
58632  # First look for the canonical freetype main include file ft2build.h.
58633  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58634    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58635    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58636    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58637      # Fail.
58638      FOUND_FREETYPE=no
58639    fi
58640  fi
58641
58642  if test "x$FOUND_FREETYPE" = xyes; then
58643    # Include file found, let's continue the sanity check.
58644    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58645$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58646
58647    # Reset to default value
58648    FREETYPE_BASE_NAME=freetype
58649    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58650    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58651      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58652          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58653        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58654        # for the .6 version explicitly.
58655        FREETYPE_BASE_NAME=freetype.6
58656        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58657        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58658$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58659      else
58660        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58661$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58662        FOUND_FREETYPE=no
58663      fi
58664    else
58665      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58666        # On Windows, we will need both .lib and .dll file.
58667        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58668          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58669$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58670          FOUND_FREETYPE=no
58671        fi
58672      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58673          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58674        # Found lib in isa dir, use that instead.
58675        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58676        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58677$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58678      fi
58679    fi
58680  fi
58681
58682  if test "x$FOUND_FREETYPE" = xyes; then
58683
58684  # Only process if variable expands to non-empty
58685
58686  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58688
58689  # Input might be given as Windows format, start by converting to
58690  # unix format.
58691  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58692  new_path=`$CYGPATH -u "$path"`
58693
58694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58697  # "foo.exe" is OK but "foo" is an error.
58698  #
58699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58700  # It is also a way to make sure we got the proper file name for the real test later on.
58701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58702  if test "x$test_shortpath" = x; then
58703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58705    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58706  fi
58707
58708  # Call helper function which possibly converts this using DOS-style short mode.
58709  # If so, the updated path is stored in $new_path.
58710
58711  input_path="$new_path"
58712  # Check if we need to convert this using DOS-style short mode. If the path
58713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58714  # take no chances and rewrite it.
58715  # Note: m4 eats our [], so we need to use [ and ] instead.
58716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58717  if test "x$has_forbidden_chars" != x; then
58718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58722      # Going to short mode and back again did indeed matter. Since short mode is
58723      # case insensitive, let's make it lowercase to improve readability.
58724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58725      # Now convert it back to Unix-style (cygpath)
58726      input_path=`$CYGPATH -u "$shortmode_path"`
58727      new_path="$input_path"
58728    fi
58729  fi
58730
58731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58732  if test "x$test_cygdrive_prefix" = x; then
58733    # As a simple fix, exclude /usr/bin since it's not a real path.
58734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58736      # a path prefixed by /cygdrive for fixpath to work.
58737      new_path="$CYGWIN_ROOT_PATH$input_path"
58738    fi
58739  fi
58740
58741
58742  if test "x$path" != "x$new_path"; then
58743    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58746  fi
58747
58748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58749
58750  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58751  has_colon=`$ECHO $path | $GREP ^.:`
58752  new_path="$path"
58753  if test "x$has_colon" = x; then
58754    # Not in mixed or Windows style, start by that.
58755    new_path=`cmd //c echo $path`
58756  fi
58757
58758
58759  input_path="$new_path"
58760  # Check if we need to convert this using DOS-style short mode. If the path
58761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58762  # take no chances and rewrite it.
58763  # Note: m4 eats our [], so we need to use [ and ] instead.
58764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58765  if test "x$has_forbidden_chars" != x; then
58766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58768  fi
58769
58770
58771  windows_path="$new_path"
58772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58773    unix_path=`$CYGPATH -u "$windows_path"`
58774    new_path="$unix_path"
58775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58777    new_path="$unix_path"
58778  fi
58779
58780  if test "x$path" != "x$new_path"; then
58781    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58784  fi
58785
58786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58788
58789    else
58790      # We're on a unix platform. Hooray! :)
58791      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58792      has_space=`$ECHO "$path" | $GREP " "`
58793      if test "x$has_space" != x; then
58794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58797      fi
58798
58799      # Use eval to expand a potential ~
58800      eval path="$path"
58801      if test ! -f "$path" && test ! -d "$path"; then
58802        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58803      fi
58804
58805      if test -d "$path"; then
58806        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58807      else
58808        dir="`$DIRNAME "$path"`"
58809        base="`$BASENAME "$path"`"
58810        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58811      fi
58812    fi
58813  fi
58814
58815
58816  # Only process if variable expands to non-empty
58817
58818  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58820
58821  # Input might be given as Windows format, start by converting to
58822  # unix format.
58823  path="$POTENTIAL_FREETYPE_LIB_PATH"
58824  new_path=`$CYGPATH -u "$path"`
58825
58826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58829  # "foo.exe" is OK but "foo" is an error.
58830  #
58831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58832  # It is also a way to make sure we got the proper file name for the real test later on.
58833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58834  if test "x$test_shortpath" = x; then
58835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58837    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58838  fi
58839
58840  # Call helper function which possibly converts this using DOS-style short mode.
58841  # If so, the updated path is stored in $new_path.
58842
58843  input_path="$new_path"
58844  # Check if we need to convert this using DOS-style short mode. If the path
58845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58846  # take no chances and rewrite it.
58847  # Note: m4 eats our [], so we need to use [ and ] instead.
58848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58849  if test "x$has_forbidden_chars" != x; then
58850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58854      # Going to short mode and back again did indeed matter. Since short mode is
58855      # case insensitive, let's make it lowercase to improve readability.
58856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58857      # Now convert it back to Unix-style (cygpath)
58858      input_path=`$CYGPATH -u "$shortmode_path"`
58859      new_path="$input_path"
58860    fi
58861  fi
58862
58863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58864  if test "x$test_cygdrive_prefix" = x; then
58865    # As a simple fix, exclude /usr/bin since it's not a real path.
58866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58868      # a path prefixed by /cygdrive for fixpath to work.
58869      new_path="$CYGWIN_ROOT_PATH$input_path"
58870    fi
58871  fi
58872
58873
58874  if test "x$path" != "x$new_path"; then
58875    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58878  fi
58879
58880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58881
58882  path="$POTENTIAL_FREETYPE_LIB_PATH"
58883  has_colon=`$ECHO $path | $GREP ^.:`
58884  new_path="$path"
58885  if test "x$has_colon" = x; then
58886    # Not in mixed or Windows style, start by that.
58887    new_path=`cmd //c echo $path`
58888  fi
58889
58890
58891  input_path="$new_path"
58892  # Check if we need to convert this using DOS-style short mode. If the path
58893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58894  # take no chances and rewrite it.
58895  # Note: m4 eats our [], so we need to use [ and ] instead.
58896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58897  if test "x$has_forbidden_chars" != x; then
58898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58900  fi
58901
58902
58903  windows_path="$new_path"
58904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58905    unix_path=`$CYGPATH -u "$windows_path"`
58906    new_path="$unix_path"
58907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58909    new_path="$unix_path"
58910  fi
58911
58912  if test "x$path" != "x$new_path"; then
58913    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58915$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58916  fi
58917
58918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58920
58921    else
58922      # We're on a unix platform. Hooray! :)
58923      path="$POTENTIAL_FREETYPE_LIB_PATH"
58924      has_space=`$ECHO "$path" | $GREP " "`
58925      if test "x$has_space" != x; then
58926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58927$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58929      fi
58930
58931      # Use eval to expand a potential ~
58932      eval path="$path"
58933      if test ! -f "$path" && test ! -d "$path"; then
58934        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58935      fi
58936
58937      if test -d "$path"; then
58938        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58939      else
58940        dir="`$DIRNAME "$path"`"
58941        base="`$BASENAME "$path"`"
58942        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58943      fi
58944    fi
58945  fi
58946
58947
58948    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58950$as_echo_n "checking for freetype includes... " >&6; }
58951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58952$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58953    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58955$as_echo_n "checking for freetype libraries... " >&6; }
58956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58957$as_echo "$FREETYPE_LIB_PATH" >&6; }
58958  fi
58959
58960          fi
58961          if test "x$FOUND_FREETYPE" != xyes; then
58962            FREETYPE_BASE_DIR="$HOME/freetype"
58963
58964  windows_path="$FREETYPE_BASE_DIR"
58965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58966    unix_path=`$CYGPATH -u "$windows_path"`
58967    FREETYPE_BASE_DIR="$unix_path"
58968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58970    FREETYPE_BASE_DIR="$unix_path"
58971  fi
58972
58973            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58974
58975  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58976  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58977  METHOD="well-known location"
58978
58979  # Let's start with an optimistic view of the world :-)
58980  FOUND_FREETYPE=yes
58981
58982  # First look for the canonical freetype main include file ft2build.h.
58983  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58984    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58985    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58986    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58987      # Fail.
58988      FOUND_FREETYPE=no
58989    fi
58990  fi
58991
58992  if test "x$FOUND_FREETYPE" = xyes; then
58993    # Include file found, let's continue the sanity check.
58994    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58995$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58996
58997    # Reset to default value
58998    FREETYPE_BASE_NAME=freetype
58999    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59000    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59001      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59002          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59003        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59004        # for the .6 version explicitly.
59005        FREETYPE_BASE_NAME=freetype.6
59006        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59007        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59008$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59009      else
59010        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59011$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59012        FOUND_FREETYPE=no
59013      fi
59014    else
59015      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59016        # On Windows, we will need both .lib and .dll file.
59017        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59018          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59019$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59020          FOUND_FREETYPE=no
59021        fi
59022      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59023          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59024        # Found lib in isa dir, use that instead.
59025        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59026        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59027$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59028      fi
59029    fi
59030  fi
59031
59032  if test "x$FOUND_FREETYPE" = xyes; then
59033
59034  # Only process if variable expands to non-empty
59035
59036  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59038
59039  # Input might be given as Windows format, start by converting to
59040  # unix format.
59041  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59042  new_path=`$CYGPATH -u "$path"`
59043
59044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59047  # "foo.exe" is OK but "foo" is an error.
59048  #
59049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59050  # It is also a way to make sure we got the proper file name for the real test later on.
59051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59052  if test "x$test_shortpath" = x; then
59053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59055    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59056  fi
59057
59058  # Call helper function which possibly converts this using DOS-style short mode.
59059  # If so, the updated path is stored in $new_path.
59060
59061  input_path="$new_path"
59062  # Check if we need to convert this using DOS-style short mode. If the path
59063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59064  # take no chances and rewrite it.
59065  # Note: m4 eats our [], so we need to use [ and ] instead.
59066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59067  if test "x$has_forbidden_chars" != x; then
59068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59072      # Going to short mode and back again did indeed matter. Since short mode is
59073      # case insensitive, let's make it lowercase to improve readability.
59074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59075      # Now convert it back to Unix-style (cygpath)
59076      input_path=`$CYGPATH -u "$shortmode_path"`
59077      new_path="$input_path"
59078    fi
59079  fi
59080
59081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59082  if test "x$test_cygdrive_prefix" = x; then
59083    # As a simple fix, exclude /usr/bin since it's not a real path.
59084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59086      # a path prefixed by /cygdrive for fixpath to work.
59087      new_path="$CYGWIN_ROOT_PATH$input_path"
59088    fi
59089  fi
59090
59091
59092  if test "x$path" != "x$new_path"; then
59093    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59096  fi
59097
59098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59099
59100  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59101  has_colon=`$ECHO $path | $GREP ^.:`
59102  new_path="$path"
59103  if test "x$has_colon" = x; then
59104    # Not in mixed or Windows style, start by that.
59105    new_path=`cmd //c echo $path`
59106  fi
59107
59108
59109  input_path="$new_path"
59110  # Check if we need to convert this using DOS-style short mode. If the path
59111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59112  # take no chances and rewrite it.
59113  # Note: m4 eats our [], so we need to use [ and ] instead.
59114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59115  if test "x$has_forbidden_chars" != x; then
59116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59118  fi
59119
59120
59121  windows_path="$new_path"
59122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59123    unix_path=`$CYGPATH -u "$windows_path"`
59124    new_path="$unix_path"
59125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59127    new_path="$unix_path"
59128  fi
59129
59130  if test "x$path" != "x$new_path"; then
59131    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59134  fi
59135
59136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59138
59139    else
59140      # We're on a unix platform. Hooray! :)
59141      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59142      has_space=`$ECHO "$path" | $GREP " "`
59143      if test "x$has_space" != x; then
59144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59147      fi
59148
59149      # Use eval to expand a potential ~
59150      eval path="$path"
59151      if test ! -f "$path" && test ! -d "$path"; then
59152        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59153      fi
59154
59155      if test -d "$path"; then
59156        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59157      else
59158        dir="`$DIRNAME "$path"`"
59159        base="`$BASENAME "$path"`"
59160        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59161      fi
59162    fi
59163  fi
59164
59165
59166  # Only process if variable expands to non-empty
59167
59168  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59170
59171  # Input might be given as Windows format, start by converting to
59172  # unix format.
59173  path="$POTENTIAL_FREETYPE_LIB_PATH"
59174  new_path=`$CYGPATH -u "$path"`
59175
59176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59179  # "foo.exe" is OK but "foo" is an error.
59180  #
59181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59182  # It is also a way to make sure we got the proper file name for the real test later on.
59183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59184  if test "x$test_shortpath" = x; then
59185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59186$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59187    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59188  fi
59189
59190  # Call helper function which possibly converts this using DOS-style short mode.
59191  # If so, the updated path is stored in $new_path.
59192
59193  input_path="$new_path"
59194  # Check if we need to convert this using DOS-style short mode. If the path
59195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59196  # take no chances and rewrite it.
59197  # Note: m4 eats our [], so we need to use [ and ] instead.
59198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59199  if test "x$has_forbidden_chars" != x; then
59200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59204      # Going to short mode and back again did indeed matter. Since short mode is
59205      # case insensitive, let's make it lowercase to improve readability.
59206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59207      # Now convert it back to Unix-style (cygpath)
59208      input_path=`$CYGPATH -u "$shortmode_path"`
59209      new_path="$input_path"
59210    fi
59211  fi
59212
59213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59214  if test "x$test_cygdrive_prefix" = x; then
59215    # As a simple fix, exclude /usr/bin since it's not a real path.
59216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59218      # a path prefixed by /cygdrive for fixpath to work.
59219      new_path="$CYGWIN_ROOT_PATH$input_path"
59220    fi
59221  fi
59222
59223
59224  if test "x$path" != "x$new_path"; then
59225    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59228  fi
59229
59230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59231
59232  path="$POTENTIAL_FREETYPE_LIB_PATH"
59233  has_colon=`$ECHO $path | $GREP ^.:`
59234  new_path="$path"
59235  if test "x$has_colon" = x; then
59236    # Not in mixed or Windows style, start by that.
59237    new_path=`cmd //c echo $path`
59238  fi
59239
59240
59241  input_path="$new_path"
59242  # Check if we need to convert this using DOS-style short mode. If the path
59243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59244  # take no chances and rewrite it.
59245  # Note: m4 eats our [], so we need to use [ and ] instead.
59246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59247  if test "x$has_forbidden_chars" != x; then
59248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59250  fi
59251
59252
59253  windows_path="$new_path"
59254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59255    unix_path=`$CYGPATH -u "$windows_path"`
59256    new_path="$unix_path"
59257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59259    new_path="$unix_path"
59260  fi
59261
59262  if test "x$path" != "x$new_path"; then
59263    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59266  fi
59267
59268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59270
59271    else
59272      # We're on a unix platform. Hooray! :)
59273      path="$POTENTIAL_FREETYPE_LIB_PATH"
59274      has_space=`$ECHO "$path" | $GREP " "`
59275      if test "x$has_space" != x; then
59276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59279      fi
59280
59281      # Use eval to expand a potential ~
59282      eval path="$path"
59283      if test ! -f "$path" && test ! -d "$path"; then
59284        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59285      fi
59286
59287      if test -d "$path"; then
59288        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59289      else
59290        dir="`$DIRNAME "$path"`"
59291        base="`$BASENAME "$path"`"
59292        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59293      fi
59294    fi
59295  fi
59296
59297
59298    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59300$as_echo_n "checking for freetype includes... " >&6; }
59301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59302$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59303    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59305$as_echo_n "checking for freetype libraries... " >&6; }
59306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59307$as_echo "$FREETYPE_LIB_PATH" >&6; }
59308  fi
59309
59310            else
59311
59312  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59313  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59314  METHOD="well-known location"
59315
59316  # Let's start with an optimistic view of the world :-)
59317  FOUND_FREETYPE=yes
59318
59319  # First look for the canonical freetype main include file ft2build.h.
59320  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59321    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59322    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59323    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59324      # Fail.
59325      FOUND_FREETYPE=no
59326    fi
59327  fi
59328
59329  if test "x$FOUND_FREETYPE" = xyes; then
59330    # Include file found, let's continue the sanity check.
59331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59332$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59333
59334    # Reset to default value
59335    FREETYPE_BASE_NAME=freetype
59336    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59337    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59338      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59339          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59340        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59341        # for the .6 version explicitly.
59342        FREETYPE_BASE_NAME=freetype.6
59343        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59344        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59345$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59346      else
59347        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59348$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59349        FOUND_FREETYPE=no
59350      fi
59351    else
59352      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59353        # On Windows, we will need both .lib and .dll file.
59354        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59355          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59356$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59357          FOUND_FREETYPE=no
59358        fi
59359      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59360          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59361        # Found lib in isa dir, use that instead.
59362        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59363        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59364$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59365      fi
59366    fi
59367  fi
59368
59369  if test "x$FOUND_FREETYPE" = xyes; then
59370
59371  # Only process if variable expands to non-empty
59372
59373  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59375
59376  # Input might be given as Windows format, start by converting to
59377  # unix format.
59378  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59379  new_path=`$CYGPATH -u "$path"`
59380
59381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59384  # "foo.exe" is OK but "foo" is an error.
59385  #
59386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59387  # It is also a way to make sure we got the proper file name for the real test later on.
59388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59389  if test "x$test_shortpath" = x; then
59390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59392    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59393  fi
59394
59395  # Call helper function which possibly converts this using DOS-style short mode.
59396  # If so, the updated path is stored in $new_path.
59397
59398  input_path="$new_path"
59399  # Check if we need to convert this using DOS-style short mode. If the path
59400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59401  # take no chances and rewrite it.
59402  # Note: m4 eats our [], so we need to use [ and ] instead.
59403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59404  if test "x$has_forbidden_chars" != x; then
59405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59409      # Going to short mode and back again did indeed matter. Since short mode is
59410      # case insensitive, let's make it lowercase to improve readability.
59411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59412      # Now convert it back to Unix-style (cygpath)
59413      input_path=`$CYGPATH -u "$shortmode_path"`
59414      new_path="$input_path"
59415    fi
59416  fi
59417
59418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59419  if test "x$test_cygdrive_prefix" = x; then
59420    # As a simple fix, exclude /usr/bin since it's not a real path.
59421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59423      # a path prefixed by /cygdrive for fixpath to work.
59424      new_path="$CYGWIN_ROOT_PATH$input_path"
59425    fi
59426  fi
59427
59428
59429  if test "x$path" != "x$new_path"; then
59430    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59433  fi
59434
59435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59436
59437  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59438  has_colon=`$ECHO $path | $GREP ^.:`
59439  new_path="$path"
59440  if test "x$has_colon" = x; then
59441    # Not in mixed or Windows style, start by that.
59442    new_path=`cmd //c echo $path`
59443  fi
59444
59445
59446  input_path="$new_path"
59447  # Check if we need to convert this using DOS-style short mode. If the path
59448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59449  # take no chances and rewrite it.
59450  # Note: m4 eats our [], so we need to use [ and ] instead.
59451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59452  if test "x$has_forbidden_chars" != x; then
59453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59455  fi
59456
59457
59458  windows_path="$new_path"
59459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59460    unix_path=`$CYGPATH -u "$windows_path"`
59461    new_path="$unix_path"
59462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59464    new_path="$unix_path"
59465  fi
59466
59467  if test "x$path" != "x$new_path"; then
59468    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59470$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59471  fi
59472
59473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59475
59476    else
59477      # We're on a unix platform. Hooray! :)
59478      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59479      has_space=`$ECHO "$path" | $GREP " "`
59480      if test "x$has_space" != x; then
59481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59482$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59483        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59484      fi
59485
59486      # Use eval to expand a potential ~
59487      eval path="$path"
59488      if test ! -f "$path" && test ! -d "$path"; then
59489        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59490      fi
59491
59492      if test -d "$path"; then
59493        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59494      else
59495        dir="`$DIRNAME "$path"`"
59496        base="`$BASENAME "$path"`"
59497        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59498      fi
59499    fi
59500  fi
59501
59502
59503  # Only process if variable expands to non-empty
59504
59505  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59507
59508  # Input might be given as Windows format, start by converting to
59509  # unix format.
59510  path="$POTENTIAL_FREETYPE_LIB_PATH"
59511  new_path=`$CYGPATH -u "$path"`
59512
59513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59516  # "foo.exe" is OK but "foo" is an error.
59517  #
59518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59519  # It is also a way to make sure we got the proper file name for the real test later on.
59520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59521  if test "x$test_shortpath" = x; then
59522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59524    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59525  fi
59526
59527  # Call helper function which possibly converts this using DOS-style short mode.
59528  # If so, the updated path is stored in $new_path.
59529
59530  input_path="$new_path"
59531  # Check if we need to convert this using DOS-style short mode. If the path
59532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59533  # take no chances and rewrite it.
59534  # Note: m4 eats our [], so we need to use [ and ] instead.
59535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59536  if test "x$has_forbidden_chars" != x; then
59537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59541      # Going to short mode and back again did indeed matter. Since short mode is
59542      # case insensitive, let's make it lowercase to improve readability.
59543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59544      # Now convert it back to Unix-style (cygpath)
59545      input_path=`$CYGPATH -u "$shortmode_path"`
59546      new_path="$input_path"
59547    fi
59548  fi
59549
59550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59551  if test "x$test_cygdrive_prefix" = x; then
59552    # As a simple fix, exclude /usr/bin since it's not a real path.
59553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59555      # a path prefixed by /cygdrive for fixpath to work.
59556      new_path="$CYGWIN_ROOT_PATH$input_path"
59557    fi
59558  fi
59559
59560
59561  if test "x$path" != "x$new_path"; then
59562    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59565  fi
59566
59567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59568
59569  path="$POTENTIAL_FREETYPE_LIB_PATH"
59570  has_colon=`$ECHO $path | $GREP ^.:`
59571  new_path="$path"
59572  if test "x$has_colon" = x; then
59573    # Not in mixed or Windows style, start by that.
59574    new_path=`cmd //c echo $path`
59575  fi
59576
59577
59578  input_path="$new_path"
59579  # Check if we need to convert this using DOS-style short mode. If the path
59580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59581  # take no chances and rewrite it.
59582  # Note: m4 eats our [], so we need to use [ and ] instead.
59583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59584  if test "x$has_forbidden_chars" != x; then
59585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59587  fi
59588
59589
59590  windows_path="$new_path"
59591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59592    unix_path=`$CYGPATH -u "$windows_path"`
59593    new_path="$unix_path"
59594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59596    new_path="$unix_path"
59597  fi
59598
59599  if test "x$path" != "x$new_path"; then
59600    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59603  fi
59604
59605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59607
59608    else
59609      # We're on a unix platform. Hooray! :)
59610      path="$POTENTIAL_FREETYPE_LIB_PATH"
59611      has_space=`$ECHO "$path" | $GREP " "`
59612      if test "x$has_space" != x; then
59613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59616      fi
59617
59618      # Use eval to expand a potential ~
59619      eval path="$path"
59620      if test ! -f "$path" && test ! -d "$path"; then
59621        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59622      fi
59623
59624      if test -d "$path"; then
59625        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59626      else
59627        dir="`$DIRNAME "$path"`"
59628        base="`$BASENAME "$path"`"
59629        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59630      fi
59631    fi
59632  fi
59633
59634
59635    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59637$as_echo_n "checking for freetype includes... " >&6; }
59638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59639$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59640    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59642$as_echo_n "checking for freetype libraries... " >&6; }
59643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59644$as_echo "$FREETYPE_LIB_PATH" >&6; }
59645  fi
59646
59647            fi
59648            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59649                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59650              # Source is available, as a last resort try to build freetype in default location
59651
59652  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59653  BUILD_FREETYPE=yes
59654
59655  # Check if the freetype sources are acessible..
59656  if ! test -d $FREETYPE_SRC_PATH; then
59657    { $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
59658$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59659    BUILD_FREETYPE=no
59660  fi
59661  # ..and contain a vc2010 project file
59662  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59663  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59664    { $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
59665$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59666    BUILD_FREETYPE=no
59667  fi
59668  # Now check if configure found a version of 'msbuild.exe'
59669  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59670    { $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
59671$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;}
59672    BUILD_FREETYPE=no
59673  fi
59674
59675  # Ready to go..
59676  if test "x$BUILD_FREETYPE" = xyes; then
59677    # msbuild requires trailing slashes for output directories
59678    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59679    freetype_lib_path_unix="$freetype_lib_path"
59680    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59681
59682  unix_path="$vcxproj_path"
59683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59684    windows_path=`$CYGPATH -m "$unix_path"`
59685    vcxproj_path="$windows_path"
59686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59687    windows_path=`cmd //c echo $unix_path`
59688    vcxproj_path="$windows_path"
59689  fi
59690
59691
59692  unix_path="$freetype_lib_path"
59693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59694    windows_path=`$CYGPATH -m "$unix_path"`
59695    freetype_lib_path="$windows_path"
59696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59697    windows_path=`cmd //c echo $unix_path`
59698    freetype_lib_path="$windows_path"
59699  fi
59700
59701
59702  unix_path="$freetype_obj_path"
59703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59704    windows_path=`$CYGPATH -m "$unix_path"`
59705    freetype_obj_path="$windows_path"
59706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59707    windows_path=`cmd //c echo $unix_path`
59708    freetype_obj_path="$windows_path"
59709  fi
59710
59711    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59712      freetype_platform=x64
59713    else
59714      freetype_platform=win32
59715    fi
59716
59717    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59718    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59719    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59720    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59721    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59722$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59723
59724    # First we try to build the freetype.dll
59725    $ECHO -e "@echo off\n"\
59726        "$MSBUILD $vcxproj_path "\
59727        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59728        "/p:Configuration=\"Release Multithreaded\" "\
59729        "/p:Platform=$freetype_platform "\
59730        "/p:ConfigurationType=DynamicLibrary "\
59731        "/p:TargetName=freetype "\
59732        "/p:OutDir=\"$freetype_lib_path\" "\
59733        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59734    cmd /c freetype.bat
59735
59736    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59737      # If that succeeds we also build freetype.lib
59738      $ECHO -e "@echo off\n"\
59739          "$MSBUILD $vcxproj_path "\
59740          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59741          "/p:Configuration=\"Release Multithreaded\" "\
59742          "/p:Platform=$freetype_platform "\
59743          "/p:ConfigurationType=StaticLibrary "\
59744          "/p:TargetName=freetype "\
59745          "/p:OutDir=\"$freetype_lib_path\" "\
59746          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59747      cmd /c freetype.bat
59748
59749      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59750        # Once we build both, lib and dll, set freetype lib and include path appropriately
59751        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59752        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59753        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59754$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59755      else
59756        BUILD_FREETYPE=no
59757      fi
59758    else
59759      BUILD_FREETYPE=no
59760    fi
59761  fi
59762
59763              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59764
59765  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59766  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59767  METHOD="well-known location"
59768
59769  # Let's start with an optimistic view of the world :-)
59770  FOUND_FREETYPE=yes
59771
59772  # First look for the canonical freetype main include file ft2build.h.
59773  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59774    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59775    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59776    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59777      # Fail.
59778      FOUND_FREETYPE=no
59779    fi
59780  fi
59781
59782  if test "x$FOUND_FREETYPE" = xyes; then
59783    # Include file found, let's continue the sanity check.
59784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59785$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59786
59787    # Reset to default value
59788    FREETYPE_BASE_NAME=freetype
59789    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59790    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59791      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59793        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59794        # for the .6 version explicitly.
59795        FREETYPE_BASE_NAME=freetype.6
59796        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59797        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59798$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59799      else
59800        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59801$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59802        FOUND_FREETYPE=no
59803      fi
59804    else
59805      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59806        # On Windows, we will need both .lib and .dll file.
59807        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59808          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59809$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59810          FOUND_FREETYPE=no
59811        fi
59812      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59813          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59814        # Found lib in isa dir, use that instead.
59815        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59816        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59817$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59818      fi
59819    fi
59820  fi
59821
59822  if test "x$FOUND_FREETYPE" = xyes; then
59823
59824  # Only process if variable expands to non-empty
59825
59826  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59828
59829  # Input might be given as Windows format, start by converting to
59830  # unix format.
59831  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59832  new_path=`$CYGPATH -u "$path"`
59833
59834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59837  # "foo.exe" is OK but "foo" is an error.
59838  #
59839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59840  # It is also a way to make sure we got the proper file name for the real test later on.
59841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59842  if test "x$test_shortpath" = x; then
59843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59845    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59846  fi
59847
59848  # Call helper function which possibly converts this using DOS-style short mode.
59849  # If so, the updated path is stored in $new_path.
59850
59851  input_path="$new_path"
59852  # Check if we need to convert this using DOS-style short mode. If the path
59853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59854  # take no chances and rewrite it.
59855  # Note: m4 eats our [], so we need to use [ and ] instead.
59856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59857  if test "x$has_forbidden_chars" != x; then
59858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59862      # Going to short mode and back again did indeed matter. Since short mode is
59863      # case insensitive, let's make it lowercase to improve readability.
59864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59865      # Now convert it back to Unix-style (cygpath)
59866      input_path=`$CYGPATH -u "$shortmode_path"`
59867      new_path="$input_path"
59868    fi
59869  fi
59870
59871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59872  if test "x$test_cygdrive_prefix" = x; then
59873    # As a simple fix, exclude /usr/bin since it's not a real path.
59874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59876      # a path prefixed by /cygdrive for fixpath to work.
59877      new_path="$CYGWIN_ROOT_PATH$input_path"
59878    fi
59879  fi
59880
59881
59882  if test "x$path" != "x$new_path"; then
59883    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59886  fi
59887
59888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59889
59890  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59891  has_colon=`$ECHO $path | $GREP ^.:`
59892  new_path="$path"
59893  if test "x$has_colon" = x; then
59894    # Not in mixed or Windows style, start by that.
59895    new_path=`cmd //c echo $path`
59896  fi
59897
59898
59899  input_path="$new_path"
59900  # Check if we need to convert this using DOS-style short mode. If the path
59901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59902  # take no chances and rewrite it.
59903  # Note: m4 eats our [], so we need to use [ and ] instead.
59904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59905  if test "x$has_forbidden_chars" != x; then
59906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59908  fi
59909
59910
59911  windows_path="$new_path"
59912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59913    unix_path=`$CYGPATH -u "$windows_path"`
59914    new_path="$unix_path"
59915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59917    new_path="$unix_path"
59918  fi
59919
59920  if test "x$path" != "x$new_path"; then
59921    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59924  fi
59925
59926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59928
59929    else
59930      # We're on a unix platform. Hooray! :)
59931      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59932      has_space=`$ECHO "$path" | $GREP " "`
59933      if test "x$has_space" != x; then
59934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59937      fi
59938
59939      # Use eval to expand a potential ~
59940      eval path="$path"
59941      if test ! -f "$path" && test ! -d "$path"; then
59942        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59943      fi
59944
59945      if test -d "$path"; then
59946        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59947      else
59948        dir="`$DIRNAME "$path"`"
59949        base="`$BASENAME "$path"`"
59950        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59951      fi
59952    fi
59953  fi
59954
59955
59956  # Only process if variable expands to non-empty
59957
59958  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59960
59961  # Input might be given as Windows format, start by converting to
59962  # unix format.
59963  path="$POTENTIAL_FREETYPE_LIB_PATH"
59964  new_path=`$CYGPATH -u "$path"`
59965
59966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59969  # "foo.exe" is OK but "foo" is an error.
59970  #
59971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59972  # It is also a way to make sure we got the proper file name for the real test later on.
59973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59974  if test "x$test_shortpath" = x; then
59975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59976$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59977    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59978  fi
59979
59980  # Call helper function which possibly converts this using DOS-style short mode.
59981  # If so, the updated path is stored in $new_path.
59982
59983  input_path="$new_path"
59984  # Check if we need to convert this using DOS-style short mode. If the path
59985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59986  # take no chances and rewrite it.
59987  # Note: m4 eats our [], so we need to use [ and ] instead.
59988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59989  if test "x$has_forbidden_chars" != x; then
59990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59994      # Going to short mode and back again did indeed matter. Since short mode is
59995      # case insensitive, let's make it lowercase to improve readability.
59996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59997      # Now convert it back to Unix-style (cygpath)
59998      input_path=`$CYGPATH -u "$shortmode_path"`
59999      new_path="$input_path"
60000    fi
60001  fi
60002
60003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60004  if test "x$test_cygdrive_prefix" = x; then
60005    # As a simple fix, exclude /usr/bin since it's not a real path.
60006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60008      # a path prefixed by /cygdrive for fixpath to work.
60009      new_path="$CYGWIN_ROOT_PATH$input_path"
60010    fi
60011  fi
60012
60013
60014  if test "x$path" != "x$new_path"; then
60015    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60018  fi
60019
60020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60021
60022  path="$POTENTIAL_FREETYPE_LIB_PATH"
60023  has_colon=`$ECHO $path | $GREP ^.:`
60024  new_path="$path"
60025  if test "x$has_colon" = x; then
60026    # Not in mixed or Windows style, start by that.
60027    new_path=`cmd //c echo $path`
60028  fi
60029
60030
60031  input_path="$new_path"
60032  # Check if we need to convert this using DOS-style short mode. If the path
60033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60034  # take no chances and rewrite it.
60035  # Note: m4 eats our [], so we need to use [ and ] instead.
60036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60037  if test "x$has_forbidden_chars" != x; then
60038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60040  fi
60041
60042
60043  windows_path="$new_path"
60044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60045    unix_path=`$CYGPATH -u "$windows_path"`
60046    new_path="$unix_path"
60047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60049    new_path="$unix_path"
60050  fi
60051
60052  if test "x$path" != "x$new_path"; then
60053    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60056  fi
60057
60058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60060
60061    else
60062      # We're on a unix platform. Hooray! :)
60063      path="$POTENTIAL_FREETYPE_LIB_PATH"
60064      has_space=`$ECHO "$path" | $GREP " "`
60065      if test "x$has_space" != x; then
60066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60067$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60069      fi
60070
60071      # Use eval to expand a potential ~
60072      eval path="$path"
60073      if test ! -f "$path" && test ! -d "$path"; then
60074        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60075      fi
60076
60077      if test -d "$path"; then
60078        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60079      else
60080        dir="`$DIRNAME "$path"`"
60081        base="`$BASENAME "$path"`"
60082        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60083      fi
60084    fi
60085  fi
60086
60087
60088    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60090$as_echo_n "checking for freetype includes... " >&6; }
60091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60092$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60093    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60095$as_echo_n "checking for freetype libraries... " >&6; }
60096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60097$as_echo "$FREETYPE_LIB_PATH" >&6; }
60098  fi
60099
60100              else
60101
60102  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60103  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60104  METHOD="well-known location"
60105
60106  # Let's start with an optimistic view of the world :-)
60107  FOUND_FREETYPE=yes
60108
60109  # First look for the canonical freetype main include file ft2build.h.
60110  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60111    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60112    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60113    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60114      # Fail.
60115      FOUND_FREETYPE=no
60116    fi
60117  fi
60118
60119  if test "x$FOUND_FREETYPE" = xyes; then
60120    # Include file found, let's continue the sanity check.
60121    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60122$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60123
60124    # Reset to default value
60125    FREETYPE_BASE_NAME=freetype
60126    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60127    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60128      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60129          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60130        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60131        # for the .6 version explicitly.
60132        FREETYPE_BASE_NAME=freetype.6
60133        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60134        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60135$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60136      else
60137        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60139        FOUND_FREETYPE=no
60140      fi
60141    else
60142      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60143        # On Windows, we will need both .lib and .dll file.
60144        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60145          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60146$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60147          FOUND_FREETYPE=no
60148        fi
60149      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60150          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60151        # Found lib in isa dir, use that instead.
60152        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60153        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60154$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60155      fi
60156    fi
60157  fi
60158
60159  if test "x$FOUND_FREETYPE" = xyes; then
60160
60161  # Only process if variable expands to non-empty
60162
60163  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60165
60166  # Input might be given as Windows format, start by converting to
60167  # unix format.
60168  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60169  new_path=`$CYGPATH -u "$path"`
60170
60171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60174  # "foo.exe" is OK but "foo" is an error.
60175  #
60176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60177  # It is also a way to make sure we got the proper file name for the real test later on.
60178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60179  if test "x$test_shortpath" = x; then
60180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60182    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60183  fi
60184
60185  # Call helper function which possibly converts this using DOS-style short mode.
60186  # If so, the updated path is stored in $new_path.
60187
60188  input_path="$new_path"
60189  # Check if we need to convert this using DOS-style short mode. If the path
60190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60191  # take no chances and rewrite it.
60192  # Note: m4 eats our [], so we need to use [ and ] instead.
60193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60194  if test "x$has_forbidden_chars" != x; then
60195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60199      # Going to short mode and back again did indeed matter. Since short mode is
60200      # case insensitive, let's make it lowercase to improve readability.
60201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60202      # Now convert it back to Unix-style (cygpath)
60203      input_path=`$CYGPATH -u "$shortmode_path"`
60204      new_path="$input_path"
60205    fi
60206  fi
60207
60208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60209  if test "x$test_cygdrive_prefix" = x; then
60210    # As a simple fix, exclude /usr/bin since it's not a real path.
60211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60213      # a path prefixed by /cygdrive for fixpath to work.
60214      new_path="$CYGWIN_ROOT_PATH$input_path"
60215    fi
60216  fi
60217
60218
60219  if test "x$path" != "x$new_path"; then
60220    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60222$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60223  fi
60224
60225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60226
60227  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60228  has_colon=`$ECHO $path | $GREP ^.:`
60229  new_path="$path"
60230  if test "x$has_colon" = x; then
60231    # Not in mixed or Windows style, start by that.
60232    new_path=`cmd //c echo $path`
60233  fi
60234
60235
60236  input_path="$new_path"
60237  # Check if we need to convert this using DOS-style short mode. If the path
60238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60239  # take no chances and rewrite it.
60240  # Note: m4 eats our [], so we need to use [ and ] instead.
60241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60242  if test "x$has_forbidden_chars" != x; then
60243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60245  fi
60246
60247
60248  windows_path="$new_path"
60249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60250    unix_path=`$CYGPATH -u "$windows_path"`
60251    new_path="$unix_path"
60252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60254    new_path="$unix_path"
60255  fi
60256
60257  if test "x$path" != "x$new_path"; then
60258    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60260$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60261  fi
60262
60263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60265
60266    else
60267      # We're on a unix platform. Hooray! :)
60268      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60269      has_space=`$ECHO "$path" | $GREP " "`
60270      if test "x$has_space" != x; then
60271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60272$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60274      fi
60275
60276      # Use eval to expand a potential ~
60277      eval path="$path"
60278      if test ! -f "$path" && test ! -d "$path"; then
60279        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60280      fi
60281
60282      if test -d "$path"; then
60283        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60284      else
60285        dir="`$DIRNAME "$path"`"
60286        base="`$BASENAME "$path"`"
60287        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60288      fi
60289    fi
60290  fi
60291
60292
60293  # Only process if variable expands to non-empty
60294
60295  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60297
60298  # Input might be given as Windows format, start by converting to
60299  # unix format.
60300  path="$POTENTIAL_FREETYPE_LIB_PATH"
60301  new_path=`$CYGPATH -u "$path"`
60302
60303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60306  # "foo.exe" is OK but "foo" is an error.
60307  #
60308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60309  # It is also a way to make sure we got the proper file name for the real test later on.
60310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60311  if test "x$test_shortpath" = x; then
60312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60314    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60315  fi
60316
60317  # Call helper function which possibly converts this using DOS-style short mode.
60318  # If so, the updated path is stored in $new_path.
60319
60320  input_path="$new_path"
60321  # Check if we need to convert this using DOS-style short mode. If the path
60322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60323  # take no chances and rewrite it.
60324  # Note: m4 eats our [], so we need to use [ and ] instead.
60325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60326  if test "x$has_forbidden_chars" != x; then
60327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60331      # Going to short mode and back again did indeed matter. Since short mode is
60332      # case insensitive, let's make it lowercase to improve readability.
60333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60334      # Now convert it back to Unix-style (cygpath)
60335      input_path=`$CYGPATH -u "$shortmode_path"`
60336      new_path="$input_path"
60337    fi
60338  fi
60339
60340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60341  if test "x$test_cygdrive_prefix" = x; then
60342    # As a simple fix, exclude /usr/bin since it's not a real path.
60343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60345      # a path prefixed by /cygdrive for fixpath to work.
60346      new_path="$CYGWIN_ROOT_PATH$input_path"
60347    fi
60348  fi
60349
60350
60351  if test "x$path" != "x$new_path"; then
60352    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60355  fi
60356
60357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60358
60359  path="$POTENTIAL_FREETYPE_LIB_PATH"
60360  has_colon=`$ECHO $path | $GREP ^.:`
60361  new_path="$path"
60362  if test "x$has_colon" = x; then
60363    # Not in mixed or Windows style, start by that.
60364    new_path=`cmd //c echo $path`
60365  fi
60366
60367
60368  input_path="$new_path"
60369  # Check if we need to convert this using DOS-style short mode. If the path
60370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60371  # take no chances and rewrite it.
60372  # Note: m4 eats our [], so we need to use [ and ] instead.
60373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60374  if test "x$has_forbidden_chars" != x; then
60375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60377  fi
60378
60379
60380  windows_path="$new_path"
60381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60382    unix_path=`$CYGPATH -u "$windows_path"`
60383    new_path="$unix_path"
60384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60386    new_path="$unix_path"
60387  fi
60388
60389  if test "x$path" != "x$new_path"; then
60390    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60392$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60393  fi
60394
60395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60397
60398    else
60399      # We're on a unix platform. Hooray! :)
60400      path="$POTENTIAL_FREETYPE_LIB_PATH"
60401      has_space=`$ECHO "$path" | $GREP " "`
60402      if test "x$has_space" != x; then
60403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60404$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60406      fi
60407
60408      # Use eval to expand a potential ~
60409      eval path="$path"
60410      if test ! -f "$path" && test ! -d "$path"; then
60411        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60412      fi
60413
60414      if test -d "$path"; then
60415        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60416      else
60417        dir="`$DIRNAME "$path"`"
60418        base="`$BASENAME "$path"`"
60419        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60420      fi
60421    fi
60422  fi
60423
60424
60425    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60427$as_echo_n "checking for freetype includes... " >&6; }
60428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60429$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60430    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60432$as_echo_n "checking for freetype libraries... " >&6; }
60433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60434$as_echo "$FREETYPE_LIB_PATH" >&6; }
60435  fi
60436
60437              fi
60438            fi
60439          fi
60440        else
60441          FREETYPE_BASE_DIR="$SYSROOT/usr"
60442
60443  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60444  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60445  METHOD="well-known location"
60446
60447  # Let's start with an optimistic view of the world :-)
60448  FOUND_FREETYPE=yes
60449
60450  # First look for the canonical freetype main include file ft2build.h.
60451  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60452    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60453    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60454    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60455      # Fail.
60456      FOUND_FREETYPE=no
60457    fi
60458  fi
60459
60460  if test "x$FOUND_FREETYPE" = xyes; then
60461    # Include file found, let's continue the sanity check.
60462    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60463$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60464
60465    # Reset to default value
60466    FREETYPE_BASE_NAME=freetype
60467    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60468    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60469      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60470          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60471        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60472        # for the .6 version explicitly.
60473        FREETYPE_BASE_NAME=freetype.6
60474        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60475        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60476$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60477      else
60478        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60479$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60480        FOUND_FREETYPE=no
60481      fi
60482    else
60483      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60484        # On Windows, we will need both .lib and .dll file.
60485        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60486          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60487$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60488          FOUND_FREETYPE=no
60489        fi
60490      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60491          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60492        # Found lib in isa dir, use that instead.
60493        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60494        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60495$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60496      fi
60497    fi
60498  fi
60499
60500  if test "x$FOUND_FREETYPE" = xyes; then
60501
60502  # Only process if variable expands to non-empty
60503
60504  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60506
60507  # Input might be given as Windows format, start by converting to
60508  # unix format.
60509  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60510  new_path=`$CYGPATH -u "$path"`
60511
60512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60515  # "foo.exe" is OK but "foo" is an error.
60516  #
60517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60518  # It is also a way to make sure we got the proper file name for the real test later on.
60519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60520  if test "x$test_shortpath" = x; then
60521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60523    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60524  fi
60525
60526  # Call helper function which possibly converts this using DOS-style short mode.
60527  # If so, the updated path is stored in $new_path.
60528
60529  input_path="$new_path"
60530  # Check if we need to convert this using DOS-style short mode. If the path
60531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60532  # take no chances and rewrite it.
60533  # Note: m4 eats our [], so we need to use [ and ] instead.
60534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60535  if test "x$has_forbidden_chars" != x; then
60536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60540      # Going to short mode and back again did indeed matter. Since short mode is
60541      # case insensitive, let's make it lowercase to improve readability.
60542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60543      # Now convert it back to Unix-style (cygpath)
60544      input_path=`$CYGPATH -u "$shortmode_path"`
60545      new_path="$input_path"
60546    fi
60547  fi
60548
60549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60550  if test "x$test_cygdrive_prefix" = x; then
60551    # As a simple fix, exclude /usr/bin since it's not a real path.
60552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60554      # a path prefixed by /cygdrive for fixpath to work.
60555      new_path="$CYGWIN_ROOT_PATH$input_path"
60556    fi
60557  fi
60558
60559
60560  if test "x$path" != "x$new_path"; then
60561    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60563$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60564  fi
60565
60566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60567
60568  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60569  has_colon=`$ECHO $path | $GREP ^.:`
60570  new_path="$path"
60571  if test "x$has_colon" = x; then
60572    # Not in mixed or Windows style, start by that.
60573    new_path=`cmd //c echo $path`
60574  fi
60575
60576
60577  input_path="$new_path"
60578  # Check if we need to convert this using DOS-style short mode. If the path
60579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60580  # take no chances and rewrite it.
60581  # Note: m4 eats our [], so we need to use [ and ] instead.
60582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60583  if test "x$has_forbidden_chars" != x; then
60584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60586  fi
60587
60588
60589  windows_path="$new_path"
60590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60591    unix_path=`$CYGPATH -u "$windows_path"`
60592    new_path="$unix_path"
60593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60595    new_path="$unix_path"
60596  fi
60597
60598  if test "x$path" != "x$new_path"; then
60599    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60602  fi
60603
60604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60606
60607    else
60608      # We're on a unix platform. Hooray! :)
60609      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60610      has_space=`$ECHO "$path" | $GREP " "`
60611      if test "x$has_space" != x; then
60612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60615      fi
60616
60617      # Use eval to expand a potential ~
60618      eval path="$path"
60619      if test ! -f "$path" && test ! -d "$path"; then
60620        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60621      fi
60622
60623      if test -d "$path"; then
60624        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60625      else
60626        dir="`$DIRNAME "$path"`"
60627        base="`$BASENAME "$path"`"
60628        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60629      fi
60630    fi
60631  fi
60632
60633
60634  # Only process if variable expands to non-empty
60635
60636  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60638
60639  # Input might be given as Windows format, start by converting to
60640  # unix format.
60641  path="$POTENTIAL_FREETYPE_LIB_PATH"
60642  new_path=`$CYGPATH -u "$path"`
60643
60644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60647  # "foo.exe" is OK but "foo" is an error.
60648  #
60649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60650  # It is also a way to make sure we got the proper file name for the real test later on.
60651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60652  if test "x$test_shortpath" = x; then
60653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60654$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60655    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60656  fi
60657
60658  # Call helper function which possibly converts this using DOS-style short mode.
60659  # If so, the updated path is stored in $new_path.
60660
60661  input_path="$new_path"
60662  # Check if we need to convert this using DOS-style short mode. If the path
60663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60664  # take no chances and rewrite it.
60665  # Note: m4 eats our [], so we need to use [ and ] instead.
60666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60667  if test "x$has_forbidden_chars" != x; then
60668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60672      # Going to short mode and back again did indeed matter. Since short mode is
60673      # case insensitive, let's make it lowercase to improve readability.
60674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60675      # Now convert it back to Unix-style (cygpath)
60676      input_path=`$CYGPATH -u "$shortmode_path"`
60677      new_path="$input_path"
60678    fi
60679  fi
60680
60681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60682  if test "x$test_cygdrive_prefix" = x; then
60683    # As a simple fix, exclude /usr/bin since it's not a real path.
60684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60686      # a path prefixed by /cygdrive for fixpath to work.
60687      new_path="$CYGWIN_ROOT_PATH$input_path"
60688    fi
60689  fi
60690
60691
60692  if test "x$path" != "x$new_path"; then
60693    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60696  fi
60697
60698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60699
60700  path="$POTENTIAL_FREETYPE_LIB_PATH"
60701  has_colon=`$ECHO $path | $GREP ^.:`
60702  new_path="$path"
60703  if test "x$has_colon" = x; then
60704    # Not in mixed or Windows style, start by that.
60705    new_path=`cmd //c echo $path`
60706  fi
60707
60708
60709  input_path="$new_path"
60710  # Check if we need to convert this using DOS-style short mode. If the path
60711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60712  # take no chances and rewrite it.
60713  # Note: m4 eats our [], so we need to use [ and ] instead.
60714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60715  if test "x$has_forbidden_chars" != x; then
60716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60718  fi
60719
60720
60721  windows_path="$new_path"
60722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60723    unix_path=`$CYGPATH -u "$windows_path"`
60724    new_path="$unix_path"
60725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60727    new_path="$unix_path"
60728  fi
60729
60730  if test "x$path" != "x$new_path"; then
60731    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60734  fi
60735
60736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60738
60739    else
60740      # We're on a unix platform. Hooray! :)
60741      path="$POTENTIAL_FREETYPE_LIB_PATH"
60742      has_space=`$ECHO "$path" | $GREP " "`
60743      if test "x$has_space" != x; then
60744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60746        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60747      fi
60748
60749      # Use eval to expand a potential ~
60750      eval path="$path"
60751      if test ! -f "$path" && test ! -d "$path"; then
60752        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60753      fi
60754
60755      if test -d "$path"; then
60756        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60757      else
60758        dir="`$DIRNAME "$path"`"
60759        base="`$BASENAME "$path"`"
60760        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60761      fi
60762    fi
60763  fi
60764
60765
60766    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60768$as_echo_n "checking for freetype includes... " >&6; }
60769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60770$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60771    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60773$as_echo_n "checking for freetype libraries... " >&6; }
60774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60775$as_echo "$FREETYPE_LIB_PATH" >&6; }
60776  fi
60777
60778
60779          if test "x$FOUND_FREETYPE" != xyes; then
60780            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60781
60782  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60783  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60784  METHOD="well-known location"
60785
60786  # Let's start with an optimistic view of the world :-)
60787  FOUND_FREETYPE=yes
60788
60789  # First look for the canonical freetype main include file ft2build.h.
60790  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60791    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60792    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60793    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60794      # Fail.
60795      FOUND_FREETYPE=no
60796    fi
60797  fi
60798
60799  if test "x$FOUND_FREETYPE" = xyes; then
60800    # Include file found, let's continue the sanity check.
60801    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60802$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60803
60804    # Reset to default value
60805    FREETYPE_BASE_NAME=freetype
60806    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60807    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60808      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60809          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60810        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60811        # for the .6 version explicitly.
60812        FREETYPE_BASE_NAME=freetype.6
60813        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60814        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60815$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60816      else
60817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60818$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60819        FOUND_FREETYPE=no
60820      fi
60821    else
60822      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60823        # On Windows, we will need both .lib and .dll file.
60824        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60825          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60826$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60827          FOUND_FREETYPE=no
60828        fi
60829      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60830          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60831        # Found lib in isa dir, use that instead.
60832        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60833        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60834$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60835      fi
60836    fi
60837  fi
60838
60839  if test "x$FOUND_FREETYPE" = xyes; then
60840
60841  # Only process if variable expands to non-empty
60842
60843  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60845
60846  # Input might be given as Windows format, start by converting to
60847  # unix format.
60848  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60849  new_path=`$CYGPATH -u "$path"`
60850
60851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60854  # "foo.exe" is OK but "foo" is an error.
60855  #
60856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60857  # It is also a way to make sure we got the proper file name for the real test later on.
60858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60859  if test "x$test_shortpath" = x; then
60860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60862    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60863  fi
60864
60865  # Call helper function which possibly converts this using DOS-style short mode.
60866  # If so, the updated path is stored in $new_path.
60867
60868  input_path="$new_path"
60869  # Check if we need to convert this using DOS-style short mode. If the path
60870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60871  # take no chances and rewrite it.
60872  # Note: m4 eats our [], so we need to use [ and ] instead.
60873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60874  if test "x$has_forbidden_chars" != x; then
60875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60879      # Going to short mode and back again did indeed matter. Since short mode is
60880      # case insensitive, let's make it lowercase to improve readability.
60881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60882      # Now convert it back to Unix-style (cygpath)
60883      input_path=`$CYGPATH -u "$shortmode_path"`
60884      new_path="$input_path"
60885    fi
60886  fi
60887
60888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60889  if test "x$test_cygdrive_prefix" = x; then
60890    # As a simple fix, exclude /usr/bin since it's not a real path.
60891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60893      # a path prefixed by /cygdrive for fixpath to work.
60894      new_path="$CYGWIN_ROOT_PATH$input_path"
60895    fi
60896  fi
60897
60898
60899  if test "x$path" != "x$new_path"; then
60900    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60903  fi
60904
60905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60906
60907  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60908  has_colon=`$ECHO $path | $GREP ^.:`
60909  new_path="$path"
60910  if test "x$has_colon" = x; then
60911    # Not in mixed or Windows style, start by that.
60912    new_path=`cmd //c echo $path`
60913  fi
60914
60915
60916  input_path="$new_path"
60917  # Check if we need to convert this using DOS-style short mode. If the path
60918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60919  # take no chances and rewrite it.
60920  # Note: m4 eats our [], so we need to use [ and ] instead.
60921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60922  if test "x$has_forbidden_chars" != x; then
60923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60925  fi
60926
60927
60928  windows_path="$new_path"
60929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60930    unix_path=`$CYGPATH -u "$windows_path"`
60931    new_path="$unix_path"
60932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60934    new_path="$unix_path"
60935  fi
60936
60937  if test "x$path" != "x$new_path"; then
60938    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60941  fi
60942
60943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60945
60946    else
60947      # We're on a unix platform. Hooray! :)
60948      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60949      has_space=`$ECHO "$path" | $GREP " "`
60950      if test "x$has_space" != x; then
60951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60953        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60954      fi
60955
60956      # Use eval to expand a potential ~
60957      eval path="$path"
60958      if test ! -f "$path" && test ! -d "$path"; then
60959        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60960      fi
60961
60962      if test -d "$path"; then
60963        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60964      else
60965        dir="`$DIRNAME "$path"`"
60966        base="`$BASENAME "$path"`"
60967        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60968      fi
60969    fi
60970  fi
60971
60972
60973  # Only process if variable expands to non-empty
60974
60975  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60977
60978  # Input might be given as Windows format, start by converting to
60979  # unix format.
60980  path="$POTENTIAL_FREETYPE_LIB_PATH"
60981  new_path=`$CYGPATH -u "$path"`
60982
60983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60986  # "foo.exe" is OK but "foo" is an error.
60987  #
60988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60989  # It is also a way to make sure we got the proper file name for the real test later on.
60990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60991  if test "x$test_shortpath" = x; then
60992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60993$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60994    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60995  fi
60996
60997  # Call helper function which possibly converts this using DOS-style short mode.
60998  # If so, the updated path is stored in $new_path.
60999
61000  input_path="$new_path"
61001  # Check if we need to convert this using DOS-style short mode. If the path
61002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61003  # take no chances and rewrite it.
61004  # Note: m4 eats our [], so we need to use [ and ] instead.
61005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61006  if test "x$has_forbidden_chars" != x; then
61007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61011      # Going to short mode and back again did indeed matter. Since short mode is
61012      # case insensitive, let's make it lowercase to improve readability.
61013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61014      # Now convert it back to Unix-style (cygpath)
61015      input_path=`$CYGPATH -u "$shortmode_path"`
61016      new_path="$input_path"
61017    fi
61018  fi
61019
61020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61021  if test "x$test_cygdrive_prefix" = x; then
61022    # As a simple fix, exclude /usr/bin since it's not a real path.
61023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61025      # a path prefixed by /cygdrive for fixpath to work.
61026      new_path="$CYGWIN_ROOT_PATH$input_path"
61027    fi
61028  fi
61029
61030
61031  if test "x$path" != "x$new_path"; then
61032    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61034$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61035  fi
61036
61037    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61038
61039  path="$POTENTIAL_FREETYPE_LIB_PATH"
61040  has_colon=`$ECHO $path | $GREP ^.:`
61041  new_path="$path"
61042  if test "x$has_colon" = x; then
61043    # Not in mixed or Windows style, start by that.
61044    new_path=`cmd //c echo $path`
61045  fi
61046
61047
61048  input_path="$new_path"
61049  # Check if we need to convert this using DOS-style short mode. If the path
61050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61051  # take no chances and rewrite it.
61052  # Note: m4 eats our [], so we need to use [ and ] instead.
61053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61054  if test "x$has_forbidden_chars" != x; then
61055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61057  fi
61058
61059
61060  windows_path="$new_path"
61061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61062    unix_path=`$CYGPATH -u "$windows_path"`
61063    new_path="$unix_path"
61064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61066    new_path="$unix_path"
61067  fi
61068
61069  if test "x$path" != "x$new_path"; then
61070    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61072$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61073  fi
61074
61075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61077
61078    else
61079      # We're on a unix platform. Hooray! :)
61080      path="$POTENTIAL_FREETYPE_LIB_PATH"
61081      has_space=`$ECHO "$path" | $GREP " "`
61082      if test "x$has_space" != x; then
61083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61084$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61085        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61086      fi
61087
61088      # Use eval to expand a potential ~
61089      eval path="$path"
61090      if test ! -f "$path" && test ! -d "$path"; then
61091        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61092      fi
61093
61094      if test -d "$path"; then
61095        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61096      else
61097        dir="`$DIRNAME "$path"`"
61098        base="`$BASENAME "$path"`"
61099        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61100      fi
61101    fi
61102  fi
61103
61104
61105    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61107$as_echo_n "checking for freetype includes... " >&6; }
61108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61109$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61110    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61112$as_echo_n "checking for freetype libraries... " >&6; }
61113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61114$as_echo "$FREETYPE_LIB_PATH" >&6; }
61115  fi
61116
61117          fi
61118          if test "x$FOUND_FREETYPE" != xyes; then
61119            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61120
61121  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61122  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61123  METHOD="well-known location"
61124
61125  # Let's start with an optimistic view of the world :-)
61126  FOUND_FREETYPE=yes
61127
61128  # First look for the canonical freetype main include file ft2build.h.
61129  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61130    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61131    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61132    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61133      # Fail.
61134      FOUND_FREETYPE=no
61135    fi
61136  fi
61137
61138  if test "x$FOUND_FREETYPE" = xyes; then
61139    # Include file found, let's continue the sanity check.
61140    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61141$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61142
61143    # Reset to default value
61144    FREETYPE_BASE_NAME=freetype
61145    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61146    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61147      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61148          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61149        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61150        # for the .6 version explicitly.
61151        FREETYPE_BASE_NAME=freetype.6
61152        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61153        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61154$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61155      else
61156        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61157$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61158        FOUND_FREETYPE=no
61159      fi
61160    else
61161      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61162        # On Windows, we will need both .lib and .dll file.
61163        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61164          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61165$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61166          FOUND_FREETYPE=no
61167        fi
61168      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61169          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61170        # Found lib in isa dir, use that instead.
61171        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61172        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61173$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61174      fi
61175    fi
61176  fi
61177
61178  if test "x$FOUND_FREETYPE" = xyes; then
61179
61180  # Only process if variable expands to non-empty
61181
61182  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61184
61185  # Input might be given as Windows format, start by converting to
61186  # unix format.
61187  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61188  new_path=`$CYGPATH -u "$path"`
61189
61190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61193  # "foo.exe" is OK but "foo" is an error.
61194  #
61195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61196  # It is also a way to make sure we got the proper file name for the real test later on.
61197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61198  if test "x$test_shortpath" = x; then
61199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61200$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61201    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61202  fi
61203
61204  # Call helper function which possibly converts this using DOS-style short mode.
61205  # If so, the updated path is stored in $new_path.
61206
61207  input_path="$new_path"
61208  # Check if we need to convert this using DOS-style short mode. If the path
61209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61210  # take no chances and rewrite it.
61211  # Note: m4 eats our [], so we need to use [ and ] instead.
61212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61213  if test "x$has_forbidden_chars" != x; then
61214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61218      # Going to short mode and back again did indeed matter. Since short mode is
61219      # case insensitive, let's make it lowercase to improve readability.
61220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61221      # Now convert it back to Unix-style (cygpath)
61222      input_path=`$CYGPATH -u "$shortmode_path"`
61223      new_path="$input_path"
61224    fi
61225  fi
61226
61227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61228  if test "x$test_cygdrive_prefix" = x; then
61229    # As a simple fix, exclude /usr/bin since it's not a real path.
61230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61232      # a path prefixed by /cygdrive for fixpath to work.
61233      new_path="$CYGWIN_ROOT_PATH$input_path"
61234    fi
61235  fi
61236
61237
61238  if test "x$path" != "x$new_path"; then
61239    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61241$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61242  fi
61243
61244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61245
61246  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61247  has_colon=`$ECHO $path | $GREP ^.:`
61248  new_path="$path"
61249  if test "x$has_colon" = x; then
61250    # Not in mixed or Windows style, start by that.
61251    new_path=`cmd //c echo $path`
61252  fi
61253
61254
61255  input_path="$new_path"
61256  # Check if we need to convert this using DOS-style short mode. If the path
61257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61258  # take no chances and rewrite it.
61259  # Note: m4 eats our [], so we need to use [ and ] instead.
61260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61261  if test "x$has_forbidden_chars" != x; then
61262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61264  fi
61265
61266
61267  windows_path="$new_path"
61268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61269    unix_path=`$CYGPATH -u "$windows_path"`
61270    new_path="$unix_path"
61271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61273    new_path="$unix_path"
61274  fi
61275
61276  if test "x$path" != "x$new_path"; then
61277    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61279$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61280  fi
61281
61282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61284
61285    else
61286      # We're on a unix platform. Hooray! :)
61287      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61288      has_space=`$ECHO "$path" | $GREP " "`
61289      if test "x$has_space" != x; then
61290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61291$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61293      fi
61294
61295      # Use eval to expand a potential ~
61296      eval path="$path"
61297      if test ! -f "$path" && test ! -d "$path"; then
61298        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61299      fi
61300
61301      if test -d "$path"; then
61302        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61303      else
61304        dir="`$DIRNAME "$path"`"
61305        base="`$BASENAME "$path"`"
61306        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61307      fi
61308    fi
61309  fi
61310
61311
61312  # Only process if variable expands to non-empty
61313
61314  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61316
61317  # Input might be given as Windows format, start by converting to
61318  # unix format.
61319  path="$POTENTIAL_FREETYPE_LIB_PATH"
61320  new_path=`$CYGPATH -u "$path"`
61321
61322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61325  # "foo.exe" is OK but "foo" is an error.
61326  #
61327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61328  # It is also a way to make sure we got the proper file name for the real test later on.
61329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61330  if test "x$test_shortpath" = x; then
61331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61333    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61334  fi
61335
61336  # Call helper function which possibly converts this using DOS-style short mode.
61337  # If so, the updated path is stored in $new_path.
61338
61339  input_path="$new_path"
61340  # Check if we need to convert this using DOS-style short mode. If the path
61341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61342  # take no chances and rewrite it.
61343  # Note: m4 eats our [], so we need to use [ and ] instead.
61344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61345  if test "x$has_forbidden_chars" != x; then
61346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61350      # Going to short mode and back again did indeed matter. Since short mode is
61351      # case insensitive, let's make it lowercase to improve readability.
61352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61353      # Now convert it back to Unix-style (cygpath)
61354      input_path=`$CYGPATH -u "$shortmode_path"`
61355      new_path="$input_path"
61356    fi
61357  fi
61358
61359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61360  if test "x$test_cygdrive_prefix" = x; then
61361    # As a simple fix, exclude /usr/bin since it's not a real path.
61362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61364      # a path prefixed by /cygdrive for fixpath to work.
61365      new_path="$CYGWIN_ROOT_PATH$input_path"
61366    fi
61367  fi
61368
61369
61370  if test "x$path" != "x$new_path"; then
61371    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61373$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61374  fi
61375
61376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61377
61378  path="$POTENTIAL_FREETYPE_LIB_PATH"
61379  has_colon=`$ECHO $path | $GREP ^.:`
61380  new_path="$path"
61381  if test "x$has_colon" = x; then
61382    # Not in mixed or Windows style, start by that.
61383    new_path=`cmd //c echo $path`
61384  fi
61385
61386
61387  input_path="$new_path"
61388  # Check if we need to convert this using DOS-style short mode. If the path
61389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61390  # take no chances and rewrite it.
61391  # Note: m4 eats our [], so we need to use [ and ] instead.
61392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61393  if test "x$has_forbidden_chars" != x; then
61394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61396  fi
61397
61398
61399  windows_path="$new_path"
61400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61401    unix_path=`$CYGPATH -u "$windows_path"`
61402    new_path="$unix_path"
61403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61405    new_path="$unix_path"
61406  fi
61407
61408  if test "x$path" != "x$new_path"; then
61409    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61412  fi
61413
61414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61416
61417    else
61418      # We're on a unix platform. Hooray! :)
61419      path="$POTENTIAL_FREETYPE_LIB_PATH"
61420      has_space=`$ECHO "$path" | $GREP " "`
61421      if test "x$has_space" != x; then
61422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61425      fi
61426
61427      # Use eval to expand a potential ~
61428      eval path="$path"
61429      if test ! -f "$path" && test ! -d "$path"; then
61430        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61431      fi
61432
61433      if test -d "$path"; then
61434        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61435      else
61436        dir="`$DIRNAME "$path"`"
61437        base="`$BASENAME "$path"`"
61438        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61439      fi
61440    fi
61441  fi
61442
61443
61444    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61446$as_echo_n "checking for freetype includes... " >&6; }
61447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61448$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61449    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61451$as_echo_n "checking for freetype libraries... " >&6; }
61452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61453$as_echo "$FREETYPE_LIB_PATH" >&6; }
61454  fi
61455
61456          fi
61457
61458          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61459            if test "x$FOUND_FREETYPE" != xyes; then
61460              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61461              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61462
61463  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61464  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61465  METHOD="well-known location"
61466
61467  # Let's start with an optimistic view of the world :-)
61468  FOUND_FREETYPE=yes
61469
61470  # First look for the canonical freetype main include file ft2build.h.
61471  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61472    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61473    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61474    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61475      # Fail.
61476      FOUND_FREETYPE=no
61477    fi
61478  fi
61479
61480  if test "x$FOUND_FREETYPE" = xyes; then
61481    # Include file found, let's continue the sanity check.
61482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61483$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61484
61485    # Reset to default value
61486    FREETYPE_BASE_NAME=freetype
61487    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61488    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61489      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61490          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61491        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61492        # for the .6 version explicitly.
61493        FREETYPE_BASE_NAME=freetype.6
61494        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61495        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61496$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61497      else
61498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61500        FOUND_FREETYPE=no
61501      fi
61502    else
61503      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61504        # On Windows, we will need both .lib and .dll file.
61505        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61506          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61507$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61508          FOUND_FREETYPE=no
61509        fi
61510      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61511          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61512        # Found lib in isa dir, use that instead.
61513        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61514        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61515$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61516      fi
61517    fi
61518  fi
61519
61520  if test "x$FOUND_FREETYPE" = xyes; then
61521
61522  # Only process if variable expands to non-empty
61523
61524  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61526
61527  # Input might be given as Windows format, start by converting to
61528  # unix format.
61529  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61530  new_path=`$CYGPATH -u "$path"`
61531
61532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61535  # "foo.exe" is OK but "foo" is an error.
61536  #
61537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61538  # It is also a way to make sure we got the proper file name for the real test later on.
61539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61540  if test "x$test_shortpath" = x; then
61541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61543    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61544  fi
61545
61546  # Call helper function which possibly converts this using DOS-style short mode.
61547  # If so, the updated path is stored in $new_path.
61548
61549  input_path="$new_path"
61550  # Check if we need to convert this using DOS-style short mode. If the path
61551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61552  # take no chances and rewrite it.
61553  # Note: m4 eats our [], so we need to use [ and ] instead.
61554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61555  if test "x$has_forbidden_chars" != x; then
61556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61560      # Going to short mode and back again did indeed matter. Since short mode is
61561      # case insensitive, let's make it lowercase to improve readability.
61562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61563      # Now convert it back to Unix-style (cygpath)
61564      input_path=`$CYGPATH -u "$shortmode_path"`
61565      new_path="$input_path"
61566    fi
61567  fi
61568
61569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61570  if test "x$test_cygdrive_prefix" = x; then
61571    # As a simple fix, exclude /usr/bin since it's not a real path.
61572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61574      # a path prefixed by /cygdrive for fixpath to work.
61575      new_path="$CYGWIN_ROOT_PATH$input_path"
61576    fi
61577  fi
61578
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61587
61588  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61589  has_colon=`$ECHO $path | $GREP ^.:`
61590  new_path="$path"
61591  if test "x$has_colon" = x; then
61592    # Not in mixed or Windows style, start by that.
61593    new_path=`cmd //c echo $path`
61594  fi
61595
61596
61597  input_path="$new_path"
61598  # Check if we need to convert this using DOS-style short mode. If the path
61599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61600  # take no chances and rewrite it.
61601  # Note: m4 eats our [], so we need to use [ and ] instead.
61602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61603  if test "x$has_forbidden_chars" != x; then
61604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61606  fi
61607
61608
61609  windows_path="$new_path"
61610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61611    unix_path=`$CYGPATH -u "$windows_path"`
61612    new_path="$unix_path"
61613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61615    new_path="$unix_path"
61616  fi
61617
61618  if test "x$path" != "x$new_path"; then
61619    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61621$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61622  fi
61623
61624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61626
61627    else
61628      # We're on a unix platform. Hooray! :)
61629      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61630      has_space=`$ECHO "$path" | $GREP " "`
61631      if test "x$has_space" != x; then
61632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61635      fi
61636
61637      # Use eval to expand a potential ~
61638      eval path="$path"
61639      if test ! -f "$path" && test ! -d "$path"; then
61640        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61641      fi
61642
61643      if test -d "$path"; then
61644        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61645      else
61646        dir="`$DIRNAME "$path"`"
61647        base="`$BASENAME "$path"`"
61648        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61649      fi
61650    fi
61651  fi
61652
61653
61654  # Only process if variable expands to non-empty
61655
61656  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61658
61659  # Input might be given as Windows format, start by converting to
61660  # unix format.
61661  path="$POTENTIAL_FREETYPE_LIB_PATH"
61662  new_path=`$CYGPATH -u "$path"`
61663
61664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61667  # "foo.exe" is OK but "foo" is an error.
61668  #
61669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61670  # It is also a way to make sure we got the proper file name for the real test later on.
61671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61672  if test "x$test_shortpath" = x; then
61673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61675    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61676  fi
61677
61678  # Call helper function which possibly converts this using DOS-style short mode.
61679  # If so, the updated path is stored in $new_path.
61680
61681  input_path="$new_path"
61682  # Check if we need to convert this using DOS-style short mode. If the path
61683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61684  # take no chances and rewrite it.
61685  # Note: m4 eats our [], so we need to use [ and ] instead.
61686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61687  if test "x$has_forbidden_chars" != x; then
61688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61692      # Going to short mode and back again did indeed matter. Since short mode is
61693      # case insensitive, let's make it lowercase to improve readability.
61694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61695      # Now convert it back to Unix-style (cygpath)
61696      input_path=`$CYGPATH -u "$shortmode_path"`
61697      new_path="$input_path"
61698    fi
61699  fi
61700
61701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61702  if test "x$test_cygdrive_prefix" = x; then
61703    # As a simple fix, exclude /usr/bin since it's not a real path.
61704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61706      # a path prefixed by /cygdrive for fixpath to work.
61707      new_path="$CYGWIN_ROOT_PATH$input_path"
61708    fi
61709  fi
61710
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61719
61720  path="$POTENTIAL_FREETYPE_LIB_PATH"
61721  has_colon=`$ECHO $path | $GREP ^.:`
61722  new_path="$path"
61723  if test "x$has_colon" = x; then
61724    # Not in mixed or Windows style, start by that.
61725    new_path=`cmd //c echo $path`
61726  fi
61727
61728
61729  input_path="$new_path"
61730  # Check if we need to convert this using DOS-style short mode. If the path
61731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61732  # take no chances and rewrite it.
61733  # Note: m4 eats our [], so we need to use [ and ] instead.
61734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61735  if test "x$has_forbidden_chars" != x; then
61736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61738  fi
61739
61740
61741  windows_path="$new_path"
61742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61743    unix_path=`$CYGPATH -u "$windows_path"`
61744    new_path="$unix_path"
61745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61747    new_path="$unix_path"
61748  fi
61749
61750  if test "x$path" != "x$new_path"; then
61751    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61753$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61754  fi
61755
61756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61758
61759    else
61760      # We're on a unix platform. Hooray! :)
61761      path="$POTENTIAL_FREETYPE_LIB_PATH"
61762      has_space=`$ECHO "$path" | $GREP " "`
61763      if test "x$has_space" != x; then
61764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61765$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61767      fi
61768
61769      # Use eval to expand a potential ~
61770      eval path="$path"
61771      if test ! -f "$path" && test ! -d "$path"; then
61772        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61773      fi
61774
61775      if test -d "$path"; then
61776        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61777      else
61778        dir="`$DIRNAME "$path"`"
61779        base="`$BASENAME "$path"`"
61780        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61781      fi
61782    fi
61783  fi
61784
61785
61786    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61788$as_echo_n "checking for freetype includes... " >&6; }
61789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61790$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61791    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61793$as_echo_n "checking for freetype libraries... " >&6; }
61794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61795$as_echo "$FREETYPE_LIB_PATH" >&6; }
61796  fi
61797
61798            fi
61799          fi
61800
61801          if test "x$FOUND_FREETYPE" != xyes; then
61802            FREETYPE_BASE_DIR="$SYSROOT/usr"
61803            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61804
61805  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61806  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61807  METHOD="well-known location"
61808
61809  # Let's start with an optimistic view of the world :-)
61810  FOUND_FREETYPE=yes
61811
61812  # First look for the canonical freetype main include file ft2build.h.
61813  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61814    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61815    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61816    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61817      # Fail.
61818      FOUND_FREETYPE=no
61819    fi
61820  fi
61821
61822  if test "x$FOUND_FREETYPE" = xyes; then
61823    # Include file found, let's continue the sanity check.
61824    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61825$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61826
61827    # Reset to default value
61828    FREETYPE_BASE_NAME=freetype
61829    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61830    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61831      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61832          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61833        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61834        # for the .6 version explicitly.
61835        FREETYPE_BASE_NAME=freetype.6
61836        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61837        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61838$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61839      else
61840        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61841$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61842        FOUND_FREETYPE=no
61843      fi
61844    else
61845      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61846        # On Windows, we will need both .lib and .dll file.
61847        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61848          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61849$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61850          FOUND_FREETYPE=no
61851        fi
61852      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61854        # Found lib in isa dir, use that instead.
61855        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61856        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61857$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61858      fi
61859    fi
61860  fi
61861
61862  if test "x$FOUND_FREETYPE" = xyes; then
61863
61864  # Only process if variable expands to non-empty
61865
61866  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61868
61869  # Input might be given as Windows format, start by converting to
61870  # unix format.
61871  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61872  new_path=`$CYGPATH -u "$path"`
61873
61874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61877  # "foo.exe" is OK but "foo" is an error.
61878  #
61879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61880  # It is also a way to make sure we got the proper file name for the real test later on.
61881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61882  if test "x$test_shortpath" = x; then
61883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61886  fi
61887
61888  # Call helper function which possibly converts this using DOS-style short mode.
61889  # If so, the updated path is stored in $new_path.
61890
61891  input_path="$new_path"
61892  # Check if we need to convert this using DOS-style short mode. If the path
61893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61894  # take no chances and rewrite it.
61895  # Note: m4 eats our [], so we need to use [ and ] instead.
61896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61897  if test "x$has_forbidden_chars" != x; then
61898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61902      # Going to short mode and back again did indeed matter. Since short mode is
61903      # case insensitive, let's make it lowercase to improve readability.
61904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61905      # Now convert it back to Unix-style (cygpath)
61906      input_path=`$CYGPATH -u "$shortmode_path"`
61907      new_path="$input_path"
61908    fi
61909  fi
61910
61911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61912  if test "x$test_cygdrive_prefix" = x; then
61913    # As a simple fix, exclude /usr/bin since it's not a real path.
61914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61916      # a path prefixed by /cygdrive for fixpath to work.
61917      new_path="$CYGWIN_ROOT_PATH$input_path"
61918    fi
61919  fi
61920
61921
61922  if test "x$path" != "x$new_path"; then
61923    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61926  fi
61927
61928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61929
61930  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61931  has_colon=`$ECHO $path | $GREP ^.:`
61932  new_path="$path"
61933  if test "x$has_colon" = x; then
61934    # Not in mixed or Windows style, start by that.
61935    new_path=`cmd //c echo $path`
61936  fi
61937
61938
61939  input_path="$new_path"
61940  # Check if we need to convert this using DOS-style short mode. If the path
61941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61942  # take no chances and rewrite it.
61943  # Note: m4 eats our [], so we need to use [ and ] instead.
61944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61945  if test "x$has_forbidden_chars" != x; then
61946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61948  fi
61949
61950
61951  windows_path="$new_path"
61952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61953    unix_path=`$CYGPATH -u "$windows_path"`
61954    new_path="$unix_path"
61955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61957    new_path="$unix_path"
61958  fi
61959
61960  if test "x$path" != "x$new_path"; then
61961    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61964  fi
61965
61966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61968
61969    else
61970      # We're on a unix platform. Hooray! :)
61971      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61972      has_space=`$ECHO "$path" | $GREP " "`
61973      if test "x$has_space" != x; then
61974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61977      fi
61978
61979      # Use eval to expand a potential ~
61980      eval path="$path"
61981      if test ! -f "$path" && test ! -d "$path"; then
61982        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61983      fi
61984
61985      if test -d "$path"; then
61986        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61987      else
61988        dir="`$DIRNAME "$path"`"
61989        base="`$BASENAME "$path"`"
61990        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61991      fi
61992    fi
61993  fi
61994
61995
61996  # Only process if variable expands to non-empty
61997
61998  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62000
62001  # Input might be given as Windows format, start by converting to
62002  # unix format.
62003  path="$POTENTIAL_FREETYPE_LIB_PATH"
62004  new_path=`$CYGPATH -u "$path"`
62005
62006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62009  # "foo.exe" is OK but "foo" is an error.
62010  #
62011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62012  # It is also a way to make sure we got the proper file name for the real test later on.
62013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62014  if test "x$test_shortpath" = x; then
62015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62017    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62018  fi
62019
62020  # Call helper function which possibly converts this using DOS-style short mode.
62021  # If so, the updated path is stored in $new_path.
62022
62023  input_path="$new_path"
62024  # Check if we need to convert this using DOS-style short mode. If the path
62025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62026  # take no chances and rewrite it.
62027  # Note: m4 eats our [], so we need to use [ and ] instead.
62028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62029  if test "x$has_forbidden_chars" != x; then
62030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62034      # Going to short mode and back again did indeed matter. Since short mode is
62035      # case insensitive, let's make it lowercase to improve readability.
62036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62037      # Now convert it back to Unix-style (cygpath)
62038      input_path=`$CYGPATH -u "$shortmode_path"`
62039      new_path="$input_path"
62040    fi
62041  fi
62042
62043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62044  if test "x$test_cygdrive_prefix" = x; then
62045    # As a simple fix, exclude /usr/bin since it's not a real path.
62046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62048      # a path prefixed by /cygdrive for fixpath to work.
62049      new_path="$CYGWIN_ROOT_PATH$input_path"
62050    fi
62051  fi
62052
62053
62054  if test "x$path" != "x$new_path"; then
62055    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62057$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62058  fi
62059
62060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62061
62062  path="$POTENTIAL_FREETYPE_LIB_PATH"
62063  has_colon=`$ECHO $path | $GREP ^.:`
62064  new_path="$path"
62065  if test "x$has_colon" = x; then
62066    # Not in mixed or Windows style, start by that.
62067    new_path=`cmd //c echo $path`
62068  fi
62069
62070
62071  input_path="$new_path"
62072  # Check if we need to convert this using DOS-style short mode. If the path
62073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62074  # take no chances and rewrite it.
62075  # Note: m4 eats our [], so we need to use [ and ] instead.
62076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62077  if test "x$has_forbidden_chars" != x; then
62078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62080  fi
62081
62082
62083  windows_path="$new_path"
62084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62085    unix_path=`$CYGPATH -u "$windows_path"`
62086    new_path="$unix_path"
62087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62089    new_path="$unix_path"
62090  fi
62091
62092  if test "x$path" != "x$new_path"; then
62093    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62096  fi
62097
62098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62100
62101    else
62102      # We're on a unix platform. Hooray! :)
62103      path="$POTENTIAL_FREETYPE_LIB_PATH"
62104      has_space=`$ECHO "$path" | $GREP " "`
62105      if test "x$has_space" != x; then
62106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62107$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62109      fi
62110
62111      # Use eval to expand a potential ~
62112      eval path="$path"
62113      if test ! -f "$path" && test ! -d "$path"; then
62114        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62115      fi
62116
62117      if test -d "$path"; then
62118        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62119      else
62120        dir="`$DIRNAME "$path"`"
62121        base="`$BASENAME "$path"`"
62122        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62123      fi
62124    fi
62125  fi
62126
62127
62128    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62130$as_echo_n "checking for freetype includes... " >&6; }
62131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62132$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62133    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62135$as_echo_n "checking for freetype libraries... " >&6; }
62136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62137$as_echo "$FREETYPE_LIB_PATH" >&6; }
62138  fi
62139
62140            else
62141
62142  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62143  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62144  METHOD="well-known location"
62145
62146  # Let's start with an optimistic view of the world :-)
62147  FOUND_FREETYPE=yes
62148
62149  # First look for the canonical freetype main include file ft2build.h.
62150  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62151    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62152    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62153    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62154      # Fail.
62155      FOUND_FREETYPE=no
62156    fi
62157  fi
62158
62159  if test "x$FOUND_FREETYPE" = xyes; then
62160    # Include file found, let's continue the sanity check.
62161    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62162$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62163
62164    # Reset to default value
62165    FREETYPE_BASE_NAME=freetype
62166    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62167    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62168      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62169          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62170        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62171        # for the .6 version explicitly.
62172        FREETYPE_BASE_NAME=freetype.6
62173        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62174        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62175$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62176      else
62177        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62178$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62179        FOUND_FREETYPE=no
62180      fi
62181    else
62182      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62183        # On Windows, we will need both .lib and .dll file.
62184        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62185          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62186$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62187          FOUND_FREETYPE=no
62188        fi
62189      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62190          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62191        # Found lib in isa dir, use that instead.
62192        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62193        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62194$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62195      fi
62196    fi
62197  fi
62198
62199  if test "x$FOUND_FREETYPE" = xyes; then
62200
62201  # Only process if variable expands to non-empty
62202
62203  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62205
62206  # Input might be given as Windows format, start by converting to
62207  # unix format.
62208  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62209  new_path=`$CYGPATH -u "$path"`
62210
62211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62214  # "foo.exe" is OK but "foo" is an error.
62215  #
62216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62217  # It is also a way to make sure we got the proper file name for the real test later on.
62218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62219  if test "x$test_shortpath" = x; then
62220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62222    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62223  fi
62224
62225  # Call helper function which possibly converts this using DOS-style short mode.
62226  # If so, the updated path is stored in $new_path.
62227
62228  input_path="$new_path"
62229  # Check if we need to convert this using DOS-style short mode. If the path
62230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62231  # take no chances and rewrite it.
62232  # Note: m4 eats our [], so we need to use [ and ] instead.
62233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62234  if test "x$has_forbidden_chars" != x; then
62235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62239      # Going to short mode and back again did indeed matter. Since short mode is
62240      # case insensitive, let's make it lowercase to improve readability.
62241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62242      # Now convert it back to Unix-style (cygpath)
62243      input_path=`$CYGPATH -u "$shortmode_path"`
62244      new_path="$input_path"
62245    fi
62246  fi
62247
62248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62249  if test "x$test_cygdrive_prefix" = x; then
62250    # As a simple fix, exclude /usr/bin since it's not a real path.
62251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62253      # a path prefixed by /cygdrive for fixpath to work.
62254      new_path="$CYGWIN_ROOT_PATH$input_path"
62255    fi
62256  fi
62257
62258
62259  if test "x$path" != "x$new_path"; then
62260    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62263  fi
62264
62265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62266
62267  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62268  has_colon=`$ECHO $path | $GREP ^.:`
62269  new_path="$path"
62270  if test "x$has_colon" = x; then
62271    # Not in mixed or Windows style, start by that.
62272    new_path=`cmd //c echo $path`
62273  fi
62274
62275
62276  input_path="$new_path"
62277  # Check if we need to convert this using DOS-style short mode. If the path
62278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62279  # take no chances and rewrite it.
62280  # Note: m4 eats our [], so we need to use [ and ] instead.
62281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62282  if test "x$has_forbidden_chars" != x; then
62283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62285  fi
62286
62287
62288  windows_path="$new_path"
62289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62290    unix_path=`$CYGPATH -u "$windows_path"`
62291    new_path="$unix_path"
62292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62294    new_path="$unix_path"
62295  fi
62296
62297  if test "x$path" != "x$new_path"; then
62298    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62301  fi
62302
62303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62305
62306    else
62307      # We're on a unix platform. Hooray! :)
62308      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62309      has_space=`$ECHO "$path" | $GREP " "`
62310      if test "x$has_space" != x; then
62311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62314      fi
62315
62316      # Use eval to expand a potential ~
62317      eval path="$path"
62318      if test ! -f "$path" && test ! -d "$path"; then
62319        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62320      fi
62321
62322      if test -d "$path"; then
62323        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62324      else
62325        dir="`$DIRNAME "$path"`"
62326        base="`$BASENAME "$path"`"
62327        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62328      fi
62329    fi
62330  fi
62331
62332
62333  # Only process if variable expands to non-empty
62334
62335  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62337
62338  # Input might be given as Windows format, start by converting to
62339  # unix format.
62340  path="$POTENTIAL_FREETYPE_LIB_PATH"
62341  new_path=`$CYGPATH -u "$path"`
62342
62343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62346  # "foo.exe" is OK but "foo" is an error.
62347  #
62348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62349  # It is also a way to make sure we got the proper file name for the real test later on.
62350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62351  if test "x$test_shortpath" = x; then
62352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62354    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62355  fi
62356
62357  # Call helper function which possibly converts this using DOS-style short mode.
62358  # If so, the updated path is stored in $new_path.
62359
62360  input_path="$new_path"
62361  # Check if we need to convert this using DOS-style short mode. If the path
62362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62363  # take no chances and rewrite it.
62364  # Note: m4 eats our [], so we need to use [ and ] instead.
62365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62366  if test "x$has_forbidden_chars" != x; then
62367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62371      # Going to short mode and back again did indeed matter. Since short mode is
62372      # case insensitive, let's make it lowercase to improve readability.
62373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62374      # Now convert it back to Unix-style (cygpath)
62375      input_path=`$CYGPATH -u "$shortmode_path"`
62376      new_path="$input_path"
62377    fi
62378  fi
62379
62380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62381  if test "x$test_cygdrive_prefix" = x; then
62382    # As a simple fix, exclude /usr/bin since it's not a real path.
62383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62385      # a path prefixed by /cygdrive for fixpath to work.
62386      new_path="$CYGWIN_ROOT_PATH$input_path"
62387    fi
62388  fi
62389
62390
62391  if test "x$path" != "x$new_path"; then
62392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62395  fi
62396
62397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62398
62399  path="$POTENTIAL_FREETYPE_LIB_PATH"
62400  has_colon=`$ECHO $path | $GREP ^.:`
62401  new_path="$path"
62402  if test "x$has_colon" = x; then
62403    # Not in mixed or Windows style, start by that.
62404    new_path=`cmd //c echo $path`
62405  fi
62406
62407
62408  input_path="$new_path"
62409  # Check if we need to convert this using DOS-style short mode. If the path
62410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62411  # take no chances and rewrite it.
62412  # Note: m4 eats our [], so we need to use [ and ] instead.
62413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62414  if test "x$has_forbidden_chars" != x; then
62415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62417  fi
62418
62419
62420  windows_path="$new_path"
62421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62422    unix_path=`$CYGPATH -u "$windows_path"`
62423    new_path="$unix_path"
62424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62426    new_path="$unix_path"
62427  fi
62428
62429  if test "x$path" != "x$new_path"; then
62430    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62433  fi
62434
62435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62437
62438    else
62439      # We're on a unix platform. Hooray! :)
62440      path="$POTENTIAL_FREETYPE_LIB_PATH"
62441      has_space=`$ECHO "$path" | $GREP " "`
62442      if test "x$has_space" != x; then
62443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62445        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62446      fi
62447
62448      # Use eval to expand a potential ~
62449      eval path="$path"
62450      if test ! -f "$path" && test ! -d "$path"; then
62451        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62452      fi
62453
62454      if test -d "$path"; then
62455        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62456      else
62457        dir="`$DIRNAME "$path"`"
62458        base="`$BASENAME "$path"`"
62459        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62460      fi
62461    fi
62462  fi
62463
62464
62465    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62467$as_echo_n "checking for freetype includes... " >&6; }
62468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62469$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62470    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62472$as_echo_n "checking for freetype libraries... " >&6; }
62473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62474$as_echo "$FREETYPE_LIB_PATH" >&6; }
62475  fi
62476
62477              if test "x$FOUND_FREETYPE" != xyes; then
62478
62479  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62480  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62481  METHOD="well-known location"
62482
62483  # Let's start with an optimistic view of the world :-)
62484  FOUND_FREETYPE=yes
62485
62486  # First look for the canonical freetype main include file ft2build.h.
62487  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62488    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62489    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62490    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62491      # Fail.
62492      FOUND_FREETYPE=no
62493    fi
62494  fi
62495
62496  if test "x$FOUND_FREETYPE" = xyes; then
62497    # Include file found, let's continue the sanity check.
62498    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62499$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62500
62501    # Reset to default value
62502    FREETYPE_BASE_NAME=freetype
62503    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62504    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62505      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62506          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62507        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62508        # for the .6 version explicitly.
62509        FREETYPE_BASE_NAME=freetype.6
62510        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62511        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62512$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62513      else
62514        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62515$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62516        FOUND_FREETYPE=no
62517      fi
62518    else
62519      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62520        # On Windows, we will need both .lib and .dll file.
62521        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62522          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62524          FOUND_FREETYPE=no
62525        fi
62526      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62527          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62528        # Found lib in isa dir, use that instead.
62529        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62530        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62531$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62532      fi
62533    fi
62534  fi
62535
62536  if test "x$FOUND_FREETYPE" = xyes; then
62537
62538  # Only process if variable expands to non-empty
62539
62540  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62542
62543  # Input might be given as Windows format, start by converting to
62544  # unix format.
62545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62546  new_path=`$CYGPATH -u "$path"`
62547
62548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62551  # "foo.exe" is OK but "foo" is an error.
62552  #
62553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62554  # It is also a way to make sure we got the proper file name for the real test later on.
62555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62556  if test "x$test_shortpath" = x; then
62557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62558$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62559    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62560  fi
62561
62562  # Call helper function which possibly converts this using DOS-style short mode.
62563  # If so, the updated path is stored in $new_path.
62564
62565  input_path="$new_path"
62566  # Check if we need to convert this using DOS-style short mode. If the path
62567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62568  # take no chances and rewrite it.
62569  # Note: m4 eats our [], so we need to use [ and ] instead.
62570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62571  if test "x$has_forbidden_chars" != x; then
62572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62576      # Going to short mode and back again did indeed matter. Since short mode is
62577      # case insensitive, let's make it lowercase to improve readability.
62578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62579      # Now convert it back to Unix-style (cygpath)
62580      input_path=`$CYGPATH -u "$shortmode_path"`
62581      new_path="$input_path"
62582    fi
62583  fi
62584
62585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62586  if test "x$test_cygdrive_prefix" = x; then
62587    # As a simple fix, exclude /usr/bin since it's not a real path.
62588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62590      # a path prefixed by /cygdrive for fixpath to work.
62591      new_path="$CYGWIN_ROOT_PATH$input_path"
62592    fi
62593  fi
62594
62595
62596  if test "x$path" != "x$new_path"; then
62597    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62600  fi
62601
62602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62603
62604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62605  has_colon=`$ECHO $path | $GREP ^.:`
62606  new_path="$path"
62607  if test "x$has_colon" = x; then
62608    # Not in mixed or Windows style, start by that.
62609    new_path=`cmd //c echo $path`
62610  fi
62611
62612
62613  input_path="$new_path"
62614  # Check if we need to convert this using DOS-style short mode. If the path
62615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62616  # take no chances and rewrite it.
62617  # Note: m4 eats our [], so we need to use [ and ] instead.
62618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62619  if test "x$has_forbidden_chars" != x; then
62620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62622  fi
62623
62624
62625  windows_path="$new_path"
62626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62627    unix_path=`$CYGPATH -u "$windows_path"`
62628    new_path="$unix_path"
62629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62631    new_path="$unix_path"
62632  fi
62633
62634  if test "x$path" != "x$new_path"; then
62635    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62638  fi
62639
62640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62642
62643    else
62644      # We're on a unix platform. Hooray! :)
62645      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62646      has_space=`$ECHO "$path" | $GREP " "`
62647      if test "x$has_space" != x; then
62648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62651      fi
62652
62653      # Use eval to expand a potential ~
62654      eval path="$path"
62655      if test ! -f "$path" && test ! -d "$path"; then
62656        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62657      fi
62658
62659      if test -d "$path"; then
62660        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62661      else
62662        dir="`$DIRNAME "$path"`"
62663        base="`$BASENAME "$path"`"
62664        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62665      fi
62666    fi
62667  fi
62668
62669
62670  # Only process if variable expands to non-empty
62671
62672  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62674
62675  # Input might be given as Windows format, start by converting to
62676  # unix format.
62677  path="$POTENTIAL_FREETYPE_LIB_PATH"
62678  new_path=`$CYGPATH -u "$path"`
62679
62680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62683  # "foo.exe" is OK but "foo" is an error.
62684  #
62685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62686  # It is also a way to make sure we got the proper file name for the real test later on.
62687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62688  if test "x$test_shortpath" = x; then
62689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62690$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62691    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62692  fi
62693
62694  # Call helper function which possibly converts this using DOS-style short mode.
62695  # If so, the updated path is stored in $new_path.
62696
62697  input_path="$new_path"
62698  # Check if we need to convert this using DOS-style short mode. If the path
62699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62700  # take no chances and rewrite it.
62701  # Note: m4 eats our [], so we need to use [ and ] instead.
62702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62703  if test "x$has_forbidden_chars" != x; then
62704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62708      # Going to short mode and back again did indeed matter. Since short mode is
62709      # case insensitive, let's make it lowercase to improve readability.
62710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62711      # Now convert it back to Unix-style (cygpath)
62712      input_path=`$CYGPATH -u "$shortmode_path"`
62713      new_path="$input_path"
62714    fi
62715  fi
62716
62717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62718  if test "x$test_cygdrive_prefix" = x; then
62719    # As a simple fix, exclude /usr/bin since it's not a real path.
62720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62722      # a path prefixed by /cygdrive for fixpath to work.
62723      new_path="$CYGWIN_ROOT_PATH$input_path"
62724    fi
62725  fi
62726
62727
62728  if test "x$path" != "x$new_path"; then
62729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62732  fi
62733
62734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62735
62736  path="$POTENTIAL_FREETYPE_LIB_PATH"
62737  has_colon=`$ECHO $path | $GREP ^.:`
62738  new_path="$path"
62739  if test "x$has_colon" = x; then
62740    # Not in mixed or Windows style, start by that.
62741    new_path=`cmd //c echo $path`
62742  fi
62743
62744
62745  input_path="$new_path"
62746  # Check if we need to convert this using DOS-style short mode. If the path
62747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62748  # take no chances and rewrite it.
62749  # Note: m4 eats our [], so we need to use [ and ] instead.
62750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62751  if test "x$has_forbidden_chars" != x; then
62752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62754  fi
62755
62756
62757  windows_path="$new_path"
62758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62759    unix_path=`$CYGPATH -u "$windows_path"`
62760    new_path="$unix_path"
62761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62763    new_path="$unix_path"
62764  fi
62765
62766  if test "x$path" != "x$new_path"; then
62767    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62769$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62770  fi
62771
62772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62774
62775    else
62776      # We're on a unix platform. Hooray! :)
62777      path="$POTENTIAL_FREETYPE_LIB_PATH"
62778      has_space=`$ECHO "$path" | $GREP " "`
62779      if test "x$has_space" != x; then
62780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62781$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62782        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62783      fi
62784
62785      # Use eval to expand a potential ~
62786      eval path="$path"
62787      if test ! -f "$path" && test ! -d "$path"; then
62788        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62789      fi
62790
62791      if test -d "$path"; then
62792        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62793      else
62794        dir="`$DIRNAME "$path"`"
62795        base="`$BASENAME "$path"`"
62796        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62797      fi
62798    fi
62799  fi
62800
62801
62802    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62804$as_echo_n "checking for freetype includes... " >&6; }
62805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62806$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62807    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62809$as_echo_n "checking for freetype libraries... " >&6; }
62810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62811$as_echo "$FREETYPE_LIB_PATH" >&6; }
62812  fi
62813
62814              fi
62815            fi
62816          fi
62817        fi
62818      fi # end check in well-known locations
62819
62820      if test "x$FOUND_FREETYPE" != xyes; then
62821
62822  # Print a helpful message on how to acquire the necessary build dependency.
62823  # freetype is the help tag: freetype, cups, alsa etc
62824  MISSING_DEPENDENCY=freetype
62825
62826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62827    cygwin_help $MISSING_DEPENDENCY
62828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62829    msys_help $MISSING_DEPENDENCY
62830  else
62831    PKGHANDLER_COMMAND=
62832
62833    case $PKGHANDLER in
62834      apt-get)
62835        apt_help     $MISSING_DEPENDENCY ;;
62836      yum)
62837        yum_help     $MISSING_DEPENDENCY ;;
62838      brew)
62839        brew_help    $MISSING_DEPENDENCY ;;
62840      port)
62841        port_help    $MISSING_DEPENDENCY ;;
62842      pkgutil)
62843        pkgutil_help $MISSING_DEPENDENCY ;;
62844      pkgadd)
62845        pkgadd_help  $MISSING_DEPENDENCY ;;
62846    esac
62847
62848    if test "x$PKGHANDLER_COMMAND" != x; then
62849      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62850    fi
62851  fi
62852
62853        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62854      fi
62855    fi # end user specified settings
62856
62857    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62858    if test "x$FREETYPE_CFLAGS" = x; then
62859
62860  # Only process if variable expands to non-empty
62861
62862  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62864
62865  # Input might be given as Windows format, start by converting to
62866  # unix format.
62867  path="$FREETYPE_INCLUDE_PATH"
62868  new_path=`$CYGPATH -u "$path"`
62869
62870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62873  # "foo.exe" is OK but "foo" is an error.
62874  #
62875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62876  # It is also a way to make sure we got the proper file name for the real test later on.
62877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62878  if test "x$test_shortpath" = x; then
62879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62880$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62881    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62882  fi
62883
62884  # Call helper function which possibly converts this using DOS-style short mode.
62885  # If so, the updated path is stored in $new_path.
62886
62887  input_path="$new_path"
62888  # Check if we need to convert this using DOS-style short mode. If the path
62889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62890  # take no chances and rewrite it.
62891  # Note: m4 eats our [], so we need to use [ and ] instead.
62892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62893  if test "x$has_forbidden_chars" != x; then
62894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62898      # Going to short mode and back again did indeed matter. Since short mode is
62899      # case insensitive, let's make it lowercase to improve readability.
62900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62901      # Now convert it back to Unix-style (cygpath)
62902      input_path=`$CYGPATH -u "$shortmode_path"`
62903      new_path="$input_path"
62904    fi
62905  fi
62906
62907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62908  if test "x$test_cygdrive_prefix" = x; then
62909    # As a simple fix, exclude /usr/bin since it's not a real path.
62910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62912      # a path prefixed by /cygdrive for fixpath to work.
62913      new_path="$CYGWIN_ROOT_PATH$input_path"
62914    fi
62915  fi
62916
62917
62918  if test "x$path" != "x$new_path"; then
62919    FREETYPE_INCLUDE_PATH="$new_path"
62920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62921$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62922  fi
62923
62924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62925
62926  path="$FREETYPE_INCLUDE_PATH"
62927  has_colon=`$ECHO $path | $GREP ^.:`
62928  new_path="$path"
62929  if test "x$has_colon" = x; then
62930    # Not in mixed or Windows style, start by that.
62931    new_path=`cmd //c echo $path`
62932  fi
62933
62934
62935  input_path="$new_path"
62936  # Check if we need to convert this using DOS-style short mode. If the path
62937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62938  # take no chances and rewrite it.
62939  # Note: m4 eats our [], so we need to use [ and ] instead.
62940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62941  if test "x$has_forbidden_chars" != x; then
62942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62944  fi
62945
62946
62947  windows_path="$new_path"
62948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62949    unix_path=`$CYGPATH -u "$windows_path"`
62950    new_path="$unix_path"
62951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62953    new_path="$unix_path"
62954  fi
62955
62956  if test "x$path" != "x$new_path"; then
62957    FREETYPE_INCLUDE_PATH="$new_path"
62958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62959$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62960  fi
62961
62962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62964
62965    else
62966      # We're on a unix platform. Hooray! :)
62967      path="$FREETYPE_INCLUDE_PATH"
62968      has_space=`$ECHO "$path" | $GREP " "`
62969      if test "x$has_space" != x; then
62970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62971$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62972        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62973      fi
62974
62975      # Use eval to expand a potential ~
62976      eval path="$path"
62977      if test ! -f "$path" && test ! -d "$path"; then
62978        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62979      fi
62980
62981      if test -d "$path"; then
62982        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62983      else
62984        dir="`$DIRNAME "$path"`"
62985        base="`$BASENAME "$path"`"
62986        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62987      fi
62988    fi
62989  fi
62990
62991      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62992        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62993      else
62994        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62995      fi
62996    fi
62997
62998    if test "x$FREETYPE_LIBS" = x; then
62999
63000  # Only process if variable expands to non-empty
63001
63002  if test "x$FREETYPE_LIB_PATH" != x; then
63003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63004
63005  # Input might be given as Windows format, start by converting to
63006  # unix format.
63007  path="$FREETYPE_LIB_PATH"
63008  new_path=`$CYGPATH -u "$path"`
63009
63010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63013  # "foo.exe" is OK but "foo" is an error.
63014  #
63015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63016  # It is also a way to make sure we got the proper file name for the real test later on.
63017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63018  if test "x$test_shortpath" = x; then
63019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63020$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63021    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63022  fi
63023
63024  # Call helper function which possibly converts this using DOS-style short mode.
63025  # If so, the updated path is stored in $new_path.
63026
63027  input_path="$new_path"
63028  # Check if we need to convert this using DOS-style short mode. If the path
63029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63030  # take no chances and rewrite it.
63031  # Note: m4 eats our [], so we need to use [ and ] instead.
63032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63033  if test "x$has_forbidden_chars" != x; then
63034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63038      # Going to short mode and back again did indeed matter. Since short mode is
63039      # case insensitive, let's make it lowercase to improve readability.
63040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63041      # Now convert it back to Unix-style (cygpath)
63042      input_path=`$CYGPATH -u "$shortmode_path"`
63043      new_path="$input_path"
63044    fi
63045  fi
63046
63047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63048  if test "x$test_cygdrive_prefix" = x; then
63049    # As a simple fix, exclude /usr/bin since it's not a real path.
63050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63052      # a path prefixed by /cygdrive for fixpath to work.
63053      new_path="$CYGWIN_ROOT_PATH$input_path"
63054    fi
63055  fi
63056
63057
63058  if test "x$path" != "x$new_path"; then
63059    FREETYPE_LIB_PATH="$new_path"
63060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63061$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63062  fi
63063
63064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63065
63066  path="$FREETYPE_LIB_PATH"
63067  has_colon=`$ECHO $path | $GREP ^.:`
63068  new_path="$path"
63069  if test "x$has_colon" = x; then
63070    # Not in mixed or Windows style, start by that.
63071    new_path=`cmd //c echo $path`
63072  fi
63073
63074
63075  input_path="$new_path"
63076  # Check if we need to convert this using DOS-style short mode. If the path
63077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63078  # take no chances and rewrite it.
63079  # Note: m4 eats our [], so we need to use [ and ] instead.
63080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63081  if test "x$has_forbidden_chars" != x; then
63082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63084  fi
63085
63086
63087  windows_path="$new_path"
63088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63089    unix_path=`$CYGPATH -u "$windows_path"`
63090    new_path="$unix_path"
63091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63093    new_path="$unix_path"
63094  fi
63095
63096  if test "x$path" != "x$new_path"; then
63097    FREETYPE_LIB_PATH="$new_path"
63098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63099$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63100  fi
63101
63102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63104
63105    else
63106      # We're on a unix platform. Hooray! :)
63107      path="$FREETYPE_LIB_PATH"
63108      has_space=`$ECHO "$path" | $GREP " "`
63109      if test "x$has_space" != x; then
63110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63111$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63113      fi
63114
63115      # Use eval to expand a potential ~
63116      eval path="$path"
63117      if test ! -f "$path" && test ! -d "$path"; then
63118        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63119      fi
63120
63121      if test -d "$path"; then
63122        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63123      else
63124        dir="`$DIRNAME "$path"`"
63125        base="`$BASENAME "$path"`"
63126        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63127      fi
63128    fi
63129  fi
63130
63131      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63132        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63133      else
63134        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63135      fi
63136    fi
63137
63138    # Try to compile it
63139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63140$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63141    ac_ext=cpp
63142ac_cpp='$CXXCPP $CPPFLAGS'
63143ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63144ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63145ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63146
63147    PREV_CXXCFLAGS="$CXXFLAGS"
63148    PREV_LIBS="$LIBS"
63149    PREV_CXX="$CXX"
63150    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63151    LIBS="$LIBS $FREETYPE_LIBS"
63152    CXX="$FIXPATH $CXX"
63153    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63154/* end confdefs.h.  */
63155
63156          #include<ft2build.h>
63157          #include FT_FREETYPE_H
63158          int main () {
63159            FT_Init_FreeType(NULL);
63160            return 0;
63161          }
63162
63163_ACEOF
63164if ac_fn_cxx_try_link "$LINENO"; then :
63165
63166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63167$as_echo "yes" >&6; }
63168
63169else
63170
63171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63172$as_echo "no" >&6; }
63173          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63174$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63175          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63176$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63177
63178
63179  # Print a helpful message on how to acquire the necessary build dependency.
63180  # freetype is the help tag: freetype, cups, alsa etc
63181  MISSING_DEPENDENCY=freetype
63182
63183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63184    cygwin_help $MISSING_DEPENDENCY
63185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63186    msys_help $MISSING_DEPENDENCY
63187  else
63188    PKGHANDLER_COMMAND=
63189
63190    case $PKGHANDLER in
63191      apt-get)
63192        apt_help     $MISSING_DEPENDENCY ;;
63193      yum)
63194        yum_help     $MISSING_DEPENDENCY ;;
63195      brew)
63196        brew_help    $MISSING_DEPENDENCY ;;
63197      port)
63198        port_help    $MISSING_DEPENDENCY ;;
63199      pkgutil)
63200        pkgutil_help $MISSING_DEPENDENCY ;;
63201      pkgadd)
63202        pkgadd_help  $MISSING_DEPENDENCY ;;
63203    esac
63204
63205    if test "x$PKGHANDLER_COMMAND" != x; then
63206      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63207    fi
63208  fi
63209
63210
63211          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63212
63213
63214fi
63215rm -f core conftest.err conftest.$ac_objext \
63216    conftest$ac_exeext conftest.$ac_ext
63217    CXXCFLAGS="$PREV_CXXFLAGS"
63218    LIBS="$PREV_LIBS"
63219    CXX="$PREV_CXX"
63220    ac_ext=cpp
63221ac_cpp='$CXXCPP $CPPFLAGS'
63222ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63223ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63224ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63225
63226
63227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63228$as_echo_n "checking if we should bundle freetype... " >&6; }
63229    if test "x$BUNDLE_FREETYPE" = xyes; then
63230      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63231    fi
63232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63233$as_echo "$BUNDLE_FREETYPE" >&6; }
63234
63235  fi # end freetype needed
63236
63237
63238
63239
63240
63241
63242
63243# Check whether --with-alsa was given.
63244if test "${with_alsa+set}" = set; then :
63245  withval=$with_alsa;
63246fi
63247
63248
63249# Check whether --with-alsa-include was given.
63250if test "${with_alsa_include+set}" = set; then :
63251  withval=$with_alsa_include;
63252fi
63253
63254
63255# Check whether --with-alsa-lib was given.
63256if test "${with_alsa_lib+set}" = set; then :
63257  withval=$with_alsa_lib;
63258fi
63259
63260
63261  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63262    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63263        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63264        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63265      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63266$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63267    fi
63268    ALSA_CFLAGS=
63269    ALSA_LIBS=
63270  else
63271    ALSA_FOUND=no
63272
63273    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63274      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63275    fi
63276
63277    if test "x${with_alsa}" != x; then
63278      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63279      ALSA_CFLAGS="-I${with_alsa}/include"
63280      ALSA_FOUND=yes
63281    fi
63282    if test "x${with_alsa_include}" != x; then
63283      ALSA_CFLAGS="-I${with_alsa_include}"
63284      ALSA_FOUND=yes
63285    fi
63286    if test "x${with_alsa_lib}" != x; then
63287      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63288      ALSA_FOUND=yes
63289    fi
63290    # Do not try pkg-config if we have a sysroot set.
63291    if test "x$SYSROOT" = x; then
63292      if test "x$ALSA_FOUND" = xno; then
63293
63294pkg_failed=no
63295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63296$as_echo_n "checking for ALSA... " >&6; }
63297
63298if test -n "$ALSA_CFLAGS"; then
63299    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63300 elif test -n "$PKG_CONFIG"; then
63301    if test -n "$PKG_CONFIG" && \
63302    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63303  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63304  ac_status=$?
63305  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63306  test $ac_status = 0; }; then
63307  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63308else
63309  pkg_failed=yes
63310fi
63311 else
63312    pkg_failed=untried
63313fi
63314if test -n "$ALSA_LIBS"; then
63315    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63316 elif test -n "$PKG_CONFIG"; then
63317    if test -n "$PKG_CONFIG" && \
63318    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63319  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63320  ac_status=$?
63321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63322  test $ac_status = 0; }; then
63323  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63324else
63325  pkg_failed=yes
63326fi
63327 else
63328    pkg_failed=untried
63329fi
63330
63331
63332
63333if test $pkg_failed = yes; then
63334
63335if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63336        _pkg_short_errors_supported=yes
63337else
63338        _pkg_short_errors_supported=no
63339fi
63340        if test $_pkg_short_errors_supported = yes; then
63341	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63342        else
63343	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63344        fi
63345	# Put the nasty error message in config.log where it belongs
63346	echo "$ALSA_PKG_ERRORS" >&5
63347
63348	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63349$as_echo "no" >&6; }
63350                ALSA_FOUND=no
63351elif test $pkg_failed = untried; then
63352	ALSA_FOUND=no
63353else
63354	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63355	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63357$as_echo "yes" >&6; }
63358	ALSA_FOUND=yes
63359fi
63360      fi
63361    fi
63362    if test "x$ALSA_FOUND" = xno; then
63363      for ac_header in alsa/asoundlib.h
63364do :
63365  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63366if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63367  cat >>confdefs.h <<_ACEOF
63368#define HAVE_ALSA_ASOUNDLIB_H 1
63369_ACEOF
63370
63371            ALSA_FOUND=yes
63372            ALSA_CFLAGS=-Iignoreme
63373            ALSA_LIBS=-lasound
63374            DEFAULT_ALSA=yes
63375
63376else
63377  ALSA_FOUND=no
63378
63379fi
63380
63381done
63382
63383    fi
63384    if test "x$ALSA_FOUND" = xno; then
63385
63386  # Print a helpful message on how to acquire the necessary build dependency.
63387  # alsa is the help tag: freetype, cups, alsa etc
63388  MISSING_DEPENDENCY=alsa
63389
63390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63391    cygwin_help $MISSING_DEPENDENCY
63392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63393    msys_help $MISSING_DEPENDENCY
63394  else
63395    PKGHANDLER_COMMAND=
63396
63397    case $PKGHANDLER in
63398      apt-get)
63399        apt_help     $MISSING_DEPENDENCY ;;
63400      yum)
63401        yum_help     $MISSING_DEPENDENCY ;;
63402      brew)
63403        brew_help    $MISSING_DEPENDENCY ;;
63404      port)
63405        port_help    $MISSING_DEPENDENCY ;;
63406      pkgutil)
63407        pkgutil_help $MISSING_DEPENDENCY ;;
63408      pkgadd)
63409        pkgadd_help  $MISSING_DEPENDENCY ;;
63410    esac
63411
63412    if test "x$PKGHANDLER_COMMAND" != x; then
63413      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63414    fi
63415  fi
63416
63417      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63418    fi
63419  fi
63420
63421
63422
63423
63424
63425
63426# Check whether --with-libffi was given.
63427if test "${with_libffi+set}" = set; then :
63428  withval=$with_libffi;
63429fi
63430
63431
63432# Check whether --with-libffi-include was given.
63433if test "${with_libffi_include+set}" = set; then :
63434  withval=$with_libffi_include;
63435fi
63436
63437
63438# Check whether --with-libffi-lib was given.
63439if test "${with_libffi_lib+set}" = set; then :
63440  withval=$with_libffi_lib;
63441fi
63442
63443  # Check whether --enable-libffi-bundling was given.
63444if test "${enable_libffi_bundling+set}" = set; then :
63445  enableval=$enable_libffi_bundling;
63446fi
63447
63448
63449  if test "x$NEEDS_LIB_FFI" = xfalse; then
63450    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63451        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63452        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63453      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63454$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63455    fi
63456    LIBFFI_CFLAGS=
63457    LIBFFI_LIBS=
63458  else
63459    LIBFFI_FOUND=no
63460
63461    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63462      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63463    fi
63464
63465    if test "x${with_libffi}" != x; then
63466      LIBFFI_LIB_PATH="${with_libffi}/lib"
63467      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63468      LIBFFI_CFLAGS="-I${with_libffi}/include"
63469      LIBFFI_FOUND=yes
63470    fi
63471    if test "x${with_libffi_include}" != x; then
63472      LIBFFI_CFLAGS="-I${with_libffi_include}"
63473      LIBFFI_FOUND=yes
63474    fi
63475    if test "x${with_libffi_lib}" != x; then
63476      LIBFFI_LIB_PATH="${with_libffi_lib}"
63477      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63478      LIBFFI_FOUND=yes
63479    fi
63480    # Do not try pkg-config if we have a sysroot set.
63481    if test "x$SYSROOT" = x; then
63482      if test "x$LIBFFI_FOUND" = xno; then
63483        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63484
63485pkg_failed=no
63486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63487$as_echo_n "checking for LIBFFI... " >&6; }
63488
63489if test -n "$LIBFFI_CFLAGS"; then
63490    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63491 elif test -n "$PKG_CONFIG"; then
63492    if test -n "$PKG_CONFIG" && \
63493    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63494  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63495  ac_status=$?
63496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63497  test $ac_status = 0; }; then
63498  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63499else
63500  pkg_failed=yes
63501fi
63502 else
63503    pkg_failed=untried
63504fi
63505if test -n "$LIBFFI_LIBS"; then
63506    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63507 elif test -n "$PKG_CONFIG"; then
63508    if test -n "$PKG_CONFIG" && \
63509    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63510  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63511  ac_status=$?
63512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63513  test $ac_status = 0; }; then
63514  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63515else
63516  pkg_failed=yes
63517fi
63518 else
63519    pkg_failed=untried
63520fi
63521
63522
63523
63524if test $pkg_failed = yes; then
63525
63526if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63527        _pkg_short_errors_supported=yes
63528else
63529        _pkg_short_errors_supported=no
63530fi
63531        if test $_pkg_short_errors_supported = yes; then
63532	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63533        else
63534	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63535        fi
63536	# Put the nasty error message in config.log where it belongs
63537	echo "$LIBFFI_PKG_ERRORS" >&5
63538
63539	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63540$as_echo "no" >&6; }
63541                LIBFFI_FOUND=no
63542elif test $pkg_failed = untried; then
63543	LIBFFI_FOUND=no
63544else
63545	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63546	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63548$as_echo "yes" >&6; }
63549	LIBFFI_FOUND=yes
63550fi
63551      fi
63552    fi
63553    if test "x$LIBFFI_FOUND" = xno; then
63554      for ac_header in ffi.h
63555do :
63556  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63557if test "x$ac_cv_header_ffi_h" = xyes; then :
63558  cat >>confdefs.h <<_ACEOF
63559#define HAVE_FFI_H 1
63560_ACEOF
63561
63562            LIBFFI_FOUND=yes
63563            LIBFFI_CFLAGS=
63564            LIBFFI_LIBS=-lffi
63565
63566else
63567  LIBFFI_FOUND=no
63568
63569fi
63570
63571done
63572
63573    fi
63574    if test "x$LIBFFI_FOUND" = xno; then
63575
63576  # Print a helpful message on how to acquire the necessary build dependency.
63577  # ffi is the help tag: freetype, cups, alsa etc
63578  MISSING_DEPENDENCY=ffi
63579
63580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63581    cygwin_help $MISSING_DEPENDENCY
63582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63583    msys_help $MISSING_DEPENDENCY
63584  else
63585    PKGHANDLER_COMMAND=
63586
63587    case $PKGHANDLER in
63588      apt-get)
63589        apt_help     $MISSING_DEPENDENCY ;;
63590      yum)
63591        yum_help     $MISSING_DEPENDENCY ;;
63592      brew)
63593        brew_help    $MISSING_DEPENDENCY ;;
63594      port)
63595        port_help    $MISSING_DEPENDENCY ;;
63596      pkgutil)
63597        pkgutil_help $MISSING_DEPENDENCY ;;
63598      pkgadd)
63599        pkgadd_help  $MISSING_DEPENDENCY ;;
63600    esac
63601
63602    if test "x$PKGHANDLER_COMMAND" != x; then
63603      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63604    fi
63605  fi
63606
63607      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63608    fi
63609
63610    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63611$as_echo_n "checking if libffi works... " >&6; }
63612    ac_ext=c
63613ac_cpp='$CPP $CPPFLAGS'
63614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63616ac_compiler_gnu=$ac_cv_c_compiler_gnu
63617
63618    OLD_CFLAGS="$CFLAGS"
63619    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63620    OLD_LIBS="$LIBS"
63621    LIBS="$LIBS $LIBFFI_LIBS"
63622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63623/* end confdefs.h.  */
63624#include <ffi.h>
63625int
63626main ()
63627{
63628
63629          ffi_call(NULL, NULL, NULL, NULL);
63630          return 0;
63631
63632  ;
63633  return 0;
63634}
63635_ACEOF
63636if ac_fn_c_try_link "$LINENO"; then :
63637  LIBFFI_WORKS=yes
63638else
63639  LIBFFI_WORKS=no
63640
63641fi
63642rm -f core conftest.err conftest.$ac_objext \
63643    conftest$ac_exeext conftest.$ac_ext
63644    CFLAGS="$OLD_CFLAGS"
63645    LIBS="$OLD_LIBS"
63646    ac_ext=cpp
63647ac_cpp='$CXXCPP $CPPFLAGS'
63648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63651
63652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63653$as_echo "$LIBFFI_WORKS" >&6; }
63654
63655    if test "x$LIBFFI_WORKS" = xno; then
63656
63657  # Print a helpful message on how to acquire the necessary build dependency.
63658  # ffi is the help tag: freetype, cups, alsa etc
63659  MISSING_DEPENDENCY=ffi
63660
63661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63662    cygwin_help $MISSING_DEPENDENCY
63663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63664    msys_help $MISSING_DEPENDENCY
63665  else
63666    PKGHANDLER_COMMAND=
63667
63668    case $PKGHANDLER in
63669      apt-get)
63670        apt_help     $MISSING_DEPENDENCY ;;
63671      yum)
63672        yum_help     $MISSING_DEPENDENCY ;;
63673      brew)
63674        brew_help    $MISSING_DEPENDENCY ;;
63675      port)
63676        port_help    $MISSING_DEPENDENCY ;;
63677      pkgutil)
63678        pkgutil_help $MISSING_DEPENDENCY ;;
63679      pkgadd)
63680        pkgadd_help  $MISSING_DEPENDENCY ;;
63681    esac
63682
63683    if test "x$PKGHANDLER_COMMAND" != x; then
63684      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63685    fi
63686  fi
63687
63688      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63689    fi
63690
63691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63692$as_echo_n "checking if libffi should be bundled... " >&6; }
63693    if test "x$enable_libffi_bundling" = "x"; then
63694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63695$as_echo "no" >&6; }
63696      ENABLE_LIBFFI_BUNDLING=false
63697    elif  test "x$enable_libffi_bundling" = "xno"; then
63698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63699$as_echo "no, forced" >&6; }
63700      ENABLE_LIBFFI_BUNDLING=false
63701    elif  test "x$enable_libffi_bundling" = "xyes"; then
63702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63703$as_echo "yes, forced" >&6; }
63704      ENABLE_LIBFFI_BUNDLING=true
63705    else
63706      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63707    fi
63708
63709    # Find the libffi.so.X to bundle
63710    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63712$as_echo_n "checking for libffi lib file location... " >&6; }
63713      if test "x${LIBFFI_LIB_PATH}" != x; then
63714        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63715          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63716        else
63717          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63718        fi
63719      else
63720        # If we don't have an explicit path, look in a few obvious places
63721        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63722          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63723            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63724          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63725            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63726          else
63727            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63728          fi
63729        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63730          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63731            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63732          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63733            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63734          else
63735            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63736          fi
63737        else
63738          # Fallback on the default /usr/lib dir
63739          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63740            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63741          else
63742            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63743          fi
63744        fi
63745      fi
63746      # Make sure the wildcard is evaluated
63747      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63749$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63750    fi
63751  fi
63752
63753
63754
63755
63756
63757
63758
63759  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63760    # Extract the first word of "llvm-config", so it can be a program name with args.
63761set dummy llvm-config; ac_word=$2
63762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63763$as_echo_n "checking for $ac_word... " >&6; }
63764if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63765  $as_echo_n "(cached) " >&6
63766else
63767  if test -n "$LLVM_CONFIG"; then
63768  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63769else
63770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63771for as_dir in $PATH
63772do
63773  IFS=$as_save_IFS
63774  test -z "$as_dir" && as_dir=.
63775    for ac_exec_ext in '' $ac_executable_extensions; do
63776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63777    ac_cv_prog_LLVM_CONFIG="llvm-config"
63778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63779    break 2
63780  fi
63781done
63782  done
63783IFS=$as_save_IFS
63784
63785fi
63786fi
63787LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63788if test -n "$LLVM_CONFIG"; then
63789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63790$as_echo "$LLVM_CONFIG" >&6; }
63791else
63792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63793$as_echo "no" >&6; }
63794fi
63795
63796
63797
63798    if test "x$LLVM_CONFIG" != xllvm-config; then
63799      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63800    fi
63801
63802    llvm_components="jit mcjit engine nativecodegen native"
63803    unset LLVM_CFLAGS
63804    for flag in $("$LLVM_CONFIG" --cxxflags); do
63805      if echo "${flag}" | grep -q '^-[ID]'; then
63806        if test "${flag}" != "-D_DEBUG" ; then
63807          if test "${LLVM_CFLAGS}" != "" ; then
63808            LLVM_CFLAGS="${LLVM_CFLAGS} "
63809          fi
63810          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63811        fi
63812      fi
63813    done
63814    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63815    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63816
63817    unset LLVM_LDFLAGS
63818    for flag in $("${LLVM_CONFIG}" --ldflags); do
63819      if echo "${flag}" | grep -q '^-L'; then
63820        if test "${LLVM_LDFLAGS}" != ""; then
63821          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63822        fi
63823        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63824      fi
63825    done
63826
63827    unset LLVM_LIBS
63828    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63829      if echo "${flag}" | grep -q '^-l'; then
63830        if test "${LLVM_LIBS}" != ""; then
63831          LLVM_LIBS="${LLVM_LIBS} "
63832        fi
63833        LLVM_LIBS="${LLVM_LIBS}${flag}"
63834      fi
63835    done
63836
63837    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63838    # always properly detect -ltinfo
63839    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63840
63841
63842
63843
63844  fi
63845
63846
63847
63848# Check whether --with-libjpeg was given.
63849if test "${with_libjpeg+set}" = set; then :
63850  withval=$with_libjpeg;
63851fi
63852
63853
63854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63855$as_echo_n "checking for which libjpeg to use... " >&6; }
63856  # default is bundled
63857  DEFAULT_LIBJPEG=bundled
63858  # if user didn't specify, use DEFAULT_LIBJPEG
63859  if test "x${with_libjpeg}" = "x"; then
63860    with_libjpeg=${DEFAULT_LIBJPEG}
63861  fi
63862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63863$as_echo "${with_libjpeg}" >&6; }
63864
63865  if test "x${with_libjpeg}" = "xbundled"; then
63866    USE_EXTERNAL_LIBJPEG=false
63867  elif test "x${with_libjpeg}" = "xsystem"; then
63868    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63869if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63870
63871else
63872   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63873fi
63874
63875
63876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63877$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63878if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63879  $as_echo_n "(cached) " >&6
63880else
63881  ac_check_lib_save_LIBS=$LIBS
63882LIBS="-ljpeg  $LIBS"
63883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63884/* end confdefs.h.  */
63885
63886/* Override any GCC internal prototype to avoid an error.
63887   Use char because int might match the return type of a GCC
63888   builtin and then its argument prototype would still apply.  */
63889#ifdef __cplusplus
63890extern "C"
63891#endif
63892char jpeg_CreateDecompress ();
63893int
63894main ()
63895{
63896return jpeg_CreateDecompress ();
63897  ;
63898  return 0;
63899}
63900_ACEOF
63901if ac_fn_cxx_try_link "$LINENO"; then :
63902  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63903else
63904  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63905fi
63906rm -f core conftest.err conftest.$ac_objext \
63907    conftest$ac_exeext conftest.$ac_ext
63908LIBS=$ac_check_lib_save_LIBS
63909fi
63910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63911$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63912if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63913  cat >>confdefs.h <<_ACEOF
63914#define HAVE_LIBJPEG 1
63915_ACEOF
63916
63917  LIBS="-ljpeg $LIBS"
63918
63919else
63920   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63921fi
63922
63923
63924    USE_EXTERNAL_LIBJPEG=true
63925  else
63926    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63927  fi
63928
63929
63930
63931
63932
63933# Check whether --with-giflib was given.
63934if test "${with_giflib+set}" = set; then :
63935  withval=$with_giflib;
63936fi
63937
63938
63939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63940$as_echo_n "checking for which giflib to use... " >&6; }
63941  # default is bundled
63942  DEFAULT_GIFLIB=bundled
63943  # if user didn't specify, use DEFAULT_GIFLIB
63944  if test "x${with_giflib}" = "x"; then
63945    with_giflib=${DEFAULT_GIFLIB}
63946  fi
63947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63948$as_echo "${with_giflib}" >&6; }
63949
63950  if test "x${with_giflib}" = "xbundled"; then
63951    USE_EXTERNAL_LIBGIF=false
63952  elif test "x${with_giflib}" = "xsystem"; then
63953    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63954if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63955
63956else
63957   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63958fi
63959
63960
63961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63962$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63963if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63964  $as_echo_n "(cached) " >&6
63965else
63966  ac_check_lib_save_LIBS=$LIBS
63967LIBS="-lgif  $LIBS"
63968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63969/* end confdefs.h.  */
63970
63971/* Override any GCC internal prototype to avoid an error.
63972   Use char because int might match the return type of a GCC
63973   builtin and then its argument prototype would still apply.  */
63974#ifdef __cplusplus
63975extern "C"
63976#endif
63977char DGifGetCode ();
63978int
63979main ()
63980{
63981return DGifGetCode ();
63982  ;
63983  return 0;
63984}
63985_ACEOF
63986if ac_fn_cxx_try_link "$LINENO"; then :
63987  ac_cv_lib_gif_DGifGetCode=yes
63988else
63989  ac_cv_lib_gif_DGifGetCode=no
63990fi
63991rm -f core conftest.err conftest.$ac_objext \
63992    conftest$ac_exeext conftest.$ac_ext
63993LIBS=$ac_check_lib_save_LIBS
63994fi
63995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63996$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63997if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63998  cat >>confdefs.h <<_ACEOF
63999#define HAVE_LIBGIF 1
64000_ACEOF
64001
64002  LIBS="-lgif $LIBS"
64003
64004else
64005   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64006fi
64007
64008
64009    USE_EXTERNAL_LIBGIF=true
64010  else
64011    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64012  fi
64013
64014
64015
64016
64017
64018# Check whether --with-libpng was given.
64019if test "${with_libpng+set}" = set; then :
64020  withval=$with_libpng;
64021fi
64022
64023
64024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64025$as_echo_n "checking for which libpng to use... " >&6; }
64026
64027  # default is bundled
64028  DEFAULT_LIBPNG=bundled
64029  # if user didn't specify, use DEFAULT_LIBPNG
64030  if test "x${with_libpng}" = "x"; then
64031    with_libpng=${DEFAULT_LIBPNG}
64032  fi
64033
64034  if test "x${with_libpng}" = "xbundled"; then
64035    USE_EXTERNAL_LIBPNG=false
64036    PNG_CFLAGS=""
64037    PNG_LIBS=""
64038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64039$as_echo "bundled" >&6; }
64040  elif test "x${with_libpng}" = "xsystem"; then
64041
64042pkg_failed=no
64043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64044$as_echo_n "checking for PNG... " >&6; }
64045
64046if test -n "$PNG_CFLAGS"; then
64047    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64048 elif test -n "$PKG_CONFIG"; then
64049    if test -n "$PKG_CONFIG" && \
64050    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64051  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64052  ac_status=$?
64053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64054  test $ac_status = 0; }; then
64055  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64056else
64057  pkg_failed=yes
64058fi
64059 else
64060    pkg_failed=untried
64061fi
64062if test -n "$PNG_LIBS"; then
64063    pkg_cv_PNG_LIBS="$PNG_LIBS"
64064 elif test -n "$PKG_CONFIG"; then
64065    if test -n "$PKG_CONFIG" && \
64066    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64067  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64068  ac_status=$?
64069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64070  test $ac_status = 0; }; then
64071  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64072else
64073  pkg_failed=yes
64074fi
64075 else
64076    pkg_failed=untried
64077fi
64078
64079
64080
64081if test $pkg_failed = yes; then
64082
64083if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64084        _pkg_short_errors_supported=yes
64085else
64086        _pkg_short_errors_supported=no
64087fi
64088        if test $_pkg_short_errors_supported = yes; then
64089	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64090        else
64091	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64092        fi
64093	# Put the nasty error message in config.log where it belongs
64094	echo "$PNG_PKG_ERRORS" >&5
64095
64096	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64097$as_echo "no" >&6; }
64098                LIBPNG_FOUND=no
64099elif test $pkg_failed = untried; then
64100	LIBPNG_FOUND=no
64101else
64102	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64103	PNG_LIBS=$pkg_cv_PNG_LIBS
64104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64105$as_echo "yes" >&6; }
64106	LIBPNG_FOUND=yes
64107fi
64108    if test "x${LIBPNG_FOUND}" = "xyes"; then
64109      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64110      USE_EXTERNAL_LIBPNG=true
64111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64112$as_echo "system" >&6; }
64113    else
64114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64115$as_echo "system not found" >&6; }
64116      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64117    fi
64118  else
64119    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64120  fi
64121
64122
64123
64124
64125
64126
64127
64128# Check whether --with-zlib was given.
64129if test "${with_zlib+set}" = set; then :
64130  withval=$with_zlib;
64131fi
64132
64133
64134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64135$as_echo_n "checking for compress in -lz... " >&6; }
64136if ${ac_cv_lib_z_compress+:} false; then :
64137  $as_echo_n "(cached) " >&6
64138else
64139  ac_check_lib_save_LIBS=$LIBS
64140LIBS="-lz  $LIBS"
64141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64142/* end confdefs.h.  */
64143
64144/* Override any GCC internal prototype to avoid an error.
64145   Use char because int might match the return type of a GCC
64146   builtin and then its argument prototype would still apply.  */
64147#ifdef __cplusplus
64148extern "C"
64149#endif
64150char compress ();
64151int
64152main ()
64153{
64154return compress ();
64155  ;
64156  return 0;
64157}
64158_ACEOF
64159if ac_fn_cxx_try_link "$LINENO"; then :
64160  ac_cv_lib_z_compress=yes
64161else
64162  ac_cv_lib_z_compress=no
64163fi
64164rm -f core conftest.err conftest.$ac_objext \
64165    conftest$ac_exeext conftest.$ac_ext
64166LIBS=$ac_check_lib_save_LIBS
64167fi
64168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64169$as_echo "$ac_cv_lib_z_compress" >&6; }
64170if test "x$ac_cv_lib_z_compress" = xyes; then :
64171   ZLIB_FOUND=yes
64172else
64173   ZLIB_FOUND=no
64174fi
64175
64176
64177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64178$as_echo_n "checking for which zlib to use... " >&6; }
64179
64180  DEFAULT_ZLIB=system
64181  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64182    # On windows default is bundled...on others default is system
64183    DEFAULT_ZLIB=bundled
64184  fi
64185
64186  if test "x${ZLIB_FOUND}" != "xyes"; then
64187    # If we don't find any system...set default to bundled
64188    DEFAULT_ZLIB=bundled
64189  fi
64190
64191  # If user didn't specify, use DEFAULT_ZLIB
64192  if test "x${with_zlib}" = "x"; then
64193    with_zlib=${DEFAULT_ZLIB}
64194  fi
64195
64196  if test "x${with_zlib}" = "xbundled"; then
64197    USE_EXTERNAL_LIBZ=false
64198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64199$as_echo "bundled" >&6; }
64200  elif test "x${with_zlib}" = "xsystem"; then
64201    if test "x${ZLIB_FOUND}" = "xyes"; then
64202      USE_EXTERNAL_LIBZ=true
64203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64204$as_echo "system" >&6; }
64205    else
64206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64207$as_echo "system not found" >&6; }
64208      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64209    fi
64210  else
64211    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64212  fi
64213
64214
64215
64216
64217
64218# Check whether --with-lcms was given.
64219if test "${with_lcms+set}" = set; then :
64220  withval=$with_lcms;
64221fi
64222
64223
64224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64225$as_echo_n "checking for which lcms to use... " >&6; }
64226
64227  DEFAULT_LCMS=bundled
64228  # If user didn't specify, use DEFAULT_LCMS
64229  if test "x${with_lcms}" = "x"; then
64230    with_lcms=${DEFAULT_LCMS}
64231  fi
64232
64233  if test "x${with_lcms}" = "xbundled"; then
64234    USE_EXTERNAL_LCMS=false
64235    LCMS_CFLAGS=""
64236    LCMS_LIBS=""
64237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64238$as_echo "bundled" >&6; }
64239  elif test "x${with_lcms}" = "xsystem"; then
64240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64241$as_echo "system" >&6; }
64242
64243pkg_failed=no
64244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64245$as_echo_n "checking for LCMS... " >&6; }
64246
64247if test -n "$LCMS_CFLAGS"; then
64248    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64249 elif test -n "$PKG_CONFIG"; then
64250    if test -n "$PKG_CONFIG" && \
64251    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64252  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64253  ac_status=$?
64254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64255  test $ac_status = 0; }; then
64256  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64257else
64258  pkg_failed=yes
64259fi
64260 else
64261    pkg_failed=untried
64262fi
64263if test -n "$LCMS_LIBS"; then
64264    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64265 elif test -n "$PKG_CONFIG"; then
64266    if test -n "$PKG_CONFIG" && \
64267    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64268  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64269  ac_status=$?
64270  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64271  test $ac_status = 0; }; then
64272  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64273else
64274  pkg_failed=yes
64275fi
64276 else
64277    pkg_failed=untried
64278fi
64279
64280
64281
64282if test $pkg_failed = yes; then
64283
64284if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64285        _pkg_short_errors_supported=yes
64286else
64287        _pkg_short_errors_supported=no
64288fi
64289        if test $_pkg_short_errors_supported = yes; then
64290	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64291        else
64292	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64293        fi
64294	# Put the nasty error message in config.log where it belongs
64295	echo "$LCMS_PKG_ERRORS" >&5
64296
64297	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64298$as_echo "no" >&6; }
64299                LCMS_FOUND=no
64300elif test $pkg_failed = untried; then
64301	LCMS_FOUND=no
64302else
64303	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64304	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64306$as_echo "yes" >&6; }
64307	LCMS_FOUND=yes
64308fi
64309    if test "x${LCMS_FOUND}" = "xyes"; then
64310      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64311      USE_EXTERNAL_LCMS=true
64312    else
64313      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64314    fi
64315  else
64316    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64317  fi
64318
64319
64320
64321
64322
64323
64324
64325
64326
64327
64328
64329
64330
64331  # Setup libm (the maths library)
64332  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64334$as_echo_n "checking for cos in -lm... " >&6; }
64335if ${ac_cv_lib_m_cos+:} false; then :
64336  $as_echo_n "(cached) " >&6
64337else
64338  ac_check_lib_save_LIBS=$LIBS
64339LIBS="-lm  $LIBS"
64340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64341/* end confdefs.h.  */
64342
64343/* Override any GCC internal prototype to avoid an error.
64344   Use char because int might match the return type of a GCC
64345   builtin and then its argument prototype would still apply.  */
64346#ifdef __cplusplus
64347extern "C"
64348#endif
64349char cos ();
64350int
64351main ()
64352{
64353return cos ();
64354  ;
64355  return 0;
64356}
64357_ACEOF
64358if ac_fn_cxx_try_link "$LINENO"; then :
64359  ac_cv_lib_m_cos=yes
64360else
64361  ac_cv_lib_m_cos=no
64362fi
64363rm -f core conftest.err conftest.$ac_objext \
64364    conftest$ac_exeext conftest.$ac_ext
64365LIBS=$ac_check_lib_save_LIBS
64366fi
64367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64368$as_echo "$ac_cv_lib_m_cos" >&6; }
64369if test "x$ac_cv_lib_m_cos" = xyes; then :
64370  cat >>confdefs.h <<_ACEOF
64371#define HAVE_LIBM 1
64372_ACEOF
64373
64374  LIBS="-lm $LIBS"
64375
64376else
64377
64378        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64379$as_echo "$as_me: Maths library was not found" >&6;}
64380
64381fi
64382
64383    LIBM="-lm"
64384  else
64385    LIBM=""
64386  fi
64387
64388
64389  # Setup libdl (for dynamic library loading)
64390  save_LIBS="$LIBS"
64391  LIBS=""
64392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64393$as_echo_n "checking for dlopen in -ldl... " >&6; }
64394if ${ac_cv_lib_dl_dlopen+:} false; then :
64395  $as_echo_n "(cached) " >&6
64396else
64397  ac_check_lib_save_LIBS=$LIBS
64398LIBS="-ldl  $LIBS"
64399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64400/* end confdefs.h.  */
64401
64402/* Override any GCC internal prototype to avoid an error.
64403   Use char because int might match the return type of a GCC
64404   builtin and then its argument prototype would still apply.  */
64405#ifdef __cplusplus
64406extern "C"
64407#endif
64408char dlopen ();
64409int
64410main ()
64411{
64412return dlopen ();
64413  ;
64414  return 0;
64415}
64416_ACEOF
64417if ac_fn_cxx_try_link "$LINENO"; then :
64418  ac_cv_lib_dl_dlopen=yes
64419else
64420  ac_cv_lib_dl_dlopen=no
64421fi
64422rm -f core conftest.err conftest.$ac_objext \
64423    conftest$ac_exeext conftest.$ac_ext
64424LIBS=$ac_check_lib_save_LIBS
64425fi
64426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64427$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64428if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64429  cat >>confdefs.h <<_ACEOF
64430#define HAVE_LIBDL 1
64431_ACEOF
64432
64433  LIBS="-ldl $LIBS"
64434
64435fi
64436
64437  LIBDL="$LIBS"
64438
64439  LIBS="$save_LIBS"
64440
64441  # Deprecated libraries, keep the flags for backwards compatibility
64442  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64443
64444
64445# Check whether --with-dxsdk was given.
64446if test "${with_dxsdk+set}" = set; then :
64447  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64448$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64449fi
64450
64451
64452
64453
64454# Check whether --with-dxsdk-lib was given.
64455if test "${with_dxsdk_lib+set}" = set; then :
64456  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64457$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64458fi
64459
64460
64461
64462
64463# Check whether --with-dxsdk-include was given.
64464if test "${with_dxsdk_include+set}" = set; then :
64465  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64466$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64467fi
64468
64469
64470  fi
64471
64472  # Control if libzip can use mmap. Available for purposes of overriding.
64473  LIBZIP_CAN_USE_MMAP=true
64474
64475
64476
64477  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64478    # Find the root of the Solaris Studio installation from the compiler path
64479    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64480    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64482$as_echo_n "checking for libstlport.so.1... " >&6; }
64483    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64484      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64485      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64486    fi
64487    if test -f "$STLPORT_LIB"; then
64488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64489$as_echo "yes, $STLPORT_LIB" >&6; }
64490
64491  # Only process if variable expands to non-empty
64492
64493  if test "x$STLPORT_LIB" != x; then
64494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64495
64496  # Input might be given as Windows format, start by converting to
64497  # unix format.
64498  path="$STLPORT_LIB"
64499  new_path=`$CYGPATH -u "$path"`
64500
64501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64504  # "foo.exe" is OK but "foo" is an error.
64505  #
64506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64507  # It is also a way to make sure we got the proper file name for the real test later on.
64508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64509  if test "x$test_shortpath" = x; then
64510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64511$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64512    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64513  fi
64514
64515  # Call helper function which possibly converts this using DOS-style short mode.
64516  # If so, the updated path is stored in $new_path.
64517
64518  input_path="$new_path"
64519  # Check if we need to convert this using DOS-style short mode. If the path
64520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64521  # take no chances and rewrite it.
64522  # Note: m4 eats our [], so we need to use [ and ] instead.
64523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64524  if test "x$has_forbidden_chars" != x; then
64525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64529      # Going to short mode and back again did indeed matter. Since short mode is
64530      # case insensitive, let's make it lowercase to improve readability.
64531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64532      # Now convert it back to Unix-style (cygpath)
64533      input_path=`$CYGPATH -u "$shortmode_path"`
64534      new_path="$input_path"
64535    fi
64536  fi
64537
64538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64539  if test "x$test_cygdrive_prefix" = x; then
64540    # As a simple fix, exclude /usr/bin since it's not a real path.
64541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64543      # a path prefixed by /cygdrive for fixpath to work.
64544      new_path="$CYGWIN_ROOT_PATH$input_path"
64545    fi
64546  fi
64547
64548
64549  if test "x$path" != "x$new_path"; then
64550    STLPORT_LIB="$new_path"
64551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64552$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64553  fi
64554
64555    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64556
64557  path="$STLPORT_LIB"
64558  has_colon=`$ECHO $path | $GREP ^.:`
64559  new_path="$path"
64560  if test "x$has_colon" = x; then
64561    # Not in mixed or Windows style, start by that.
64562    new_path=`cmd //c echo $path`
64563  fi
64564
64565
64566  input_path="$new_path"
64567  # Check if we need to convert this using DOS-style short mode. If the path
64568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64569  # take no chances and rewrite it.
64570  # Note: m4 eats our [], so we need to use [ and ] instead.
64571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64572  if test "x$has_forbidden_chars" != x; then
64573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64575  fi
64576
64577
64578  windows_path="$new_path"
64579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64580    unix_path=`$CYGPATH -u "$windows_path"`
64581    new_path="$unix_path"
64582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64584    new_path="$unix_path"
64585  fi
64586
64587  if test "x$path" != "x$new_path"; then
64588    STLPORT_LIB="$new_path"
64589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64590$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64591  fi
64592
64593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64595
64596    else
64597      # We're on a unix platform. Hooray! :)
64598      path="$STLPORT_LIB"
64599      has_space=`$ECHO "$path" | $GREP " "`
64600      if test "x$has_space" != x; then
64601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64602$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64603        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64604      fi
64605
64606      # Use eval to expand a potential ~
64607      eval path="$path"
64608      if test ! -f "$path" && test ! -d "$path"; then
64609        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64610      fi
64611
64612      if test -d "$path"; then
64613        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64614      else
64615        dir="`$DIRNAME "$path"`"
64616        base="`$BASENAME "$path"`"
64617        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64618      fi
64619    fi
64620  fi
64621
64622    else
64623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64624$as_echo "no, not found at $STLPORT_LIB" >&6; }
64625      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64626    fi
64627
64628  fi
64629
64630
64631
64632# Check whether --with-libelf was given.
64633if test "${with_libelf+set}" = set; then :
64634  withval=$with_libelf;
64635fi
64636
64637
64638# Check whether --with-libelf-include was given.
64639if test "${with_libelf_include+set}" = set; then :
64640  withval=$with_libelf_include;
64641fi
64642
64643
64644# Check whether --with-libelf-lib was given.
64645if test "${with_libelf_lib+set}" = set; then :
64646  withval=$with_libelf_lib;
64647fi
64648
64649
64650  if test "x$ENABLE_AOT" = xfalse; then
64651    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64652        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64653        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64654      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64655$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64656    fi
64657    LIBELF_CFLAGS=
64658    LIBELF_LIBS=
64659  else
64660    LIBELF_FOUND=no
64661
64662    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64663      ENABLE_AOT="false"
64664      if test "x${enable_aot}" = xyes; then
64665        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64666      fi
64667    else
64668      if test "x${with_libelf}" != x; then
64669        ELF_LIBS="-L${with_libelf}/lib -lelf"
64670        ELF_CFLAGS="-I${with_libelf}/include"
64671        LIBELF_FOUND=yes
64672      fi
64673      if test "x${with_libelf_include}" != x; then
64674        ELF_CFLAGS="-I${with_libelf_include}"
64675        LIBELF_FOUND=yes
64676      fi
64677      if test "x${with_libelf_lib}" != x; then
64678        ELF_LIBS="-L${with_libelf_lib} -lelf"
64679        LIBELF_FOUND=yes
64680      fi
64681      # Do not try pkg-config if we have a sysroot set.
64682      if test "x$SYSROOT" = x; then
64683        if test "x$LIBELF_FOUND" = xno; then
64684          # Figure out ELF_CFLAGS and ELF_LIBS
64685
64686pkg_failed=no
64687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64688$as_echo_n "checking for ELF... " >&6; }
64689
64690if test -n "$ELF_CFLAGS"; then
64691    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64692 elif test -n "$PKG_CONFIG"; then
64693    if test -n "$PKG_CONFIG" && \
64694    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64695  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64696  ac_status=$?
64697  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64698  test $ac_status = 0; }; then
64699  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64700else
64701  pkg_failed=yes
64702fi
64703 else
64704    pkg_failed=untried
64705fi
64706if test -n "$ELF_LIBS"; then
64707    pkg_cv_ELF_LIBS="$ELF_LIBS"
64708 elif test -n "$PKG_CONFIG"; then
64709    if test -n "$PKG_CONFIG" && \
64710    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64711  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64712  ac_status=$?
64713  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64714  test $ac_status = 0; }; then
64715  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64716else
64717  pkg_failed=yes
64718fi
64719 else
64720    pkg_failed=untried
64721fi
64722
64723
64724
64725if test $pkg_failed = yes; then
64726
64727if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64728        _pkg_short_errors_supported=yes
64729else
64730        _pkg_short_errors_supported=no
64731fi
64732        if test $_pkg_short_errors_supported = yes; then
64733	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64734        else
64735	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64736        fi
64737	# Put the nasty error message in config.log where it belongs
64738	echo "$ELF_PKG_ERRORS" >&5
64739
64740	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64741$as_echo "no" >&6; }
64742                LIBELF_FOUND=no
64743elif test $pkg_failed = untried; then
64744	LIBELF_FOUND=no
64745else
64746	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64747	ELF_LIBS=$pkg_cv_ELF_LIBS
64748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64749$as_echo "yes" >&6; }
64750	LIBELF_FOUND=yes
64751fi
64752        fi
64753      fi
64754      if test "x$LIBELF_FOUND" = xno; then
64755        for ac_header in libelf.h
64756do :
64757  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64758if test "x$ac_cv_header_libelf_h" = xyes; then :
64759  cat >>confdefs.h <<_ACEOF
64760#define HAVE_LIBELF_H 1
64761_ACEOF
64762
64763              LIBELF_FOUND=yes
64764              ELF_CFLAGS=
64765              ELF_LIBS=-lelf
64766
64767else
64768  LIBELF_FOUND=no
64769
64770fi
64771
64772done
64773
64774      fi
64775      if test "x$LIBELF_FOUND" = xno; then
64776        ENABLE_AOT="false"
64777
64778  # Print a helpful message on how to acquire the necessary build dependency.
64779  # elf is the help tag: freetype, cups, alsa etc
64780  MISSING_DEPENDENCY=elf
64781
64782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64783    cygwin_help $MISSING_DEPENDENCY
64784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64785    msys_help $MISSING_DEPENDENCY
64786  else
64787    PKGHANDLER_COMMAND=
64788
64789    case $PKGHANDLER in
64790      apt-get)
64791        apt_help     $MISSING_DEPENDENCY ;;
64792      yum)
64793        yum_help     $MISSING_DEPENDENCY ;;
64794      brew)
64795        brew_help    $MISSING_DEPENDENCY ;;
64796      port)
64797        port_help    $MISSING_DEPENDENCY ;;
64798      pkgutil)
64799        pkgutil_help $MISSING_DEPENDENCY ;;
64800      pkgadd)
64801        pkgadd_help  $MISSING_DEPENDENCY ;;
64802    esac
64803
64804    if test "x$PKGHANDLER_COMMAND" != x; then
64805      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64806    fi
64807  fi
64808
64809        if test "x${enable_aot}" = xyes; then
64810          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64811        else
64812          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64813$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64814        fi
64815      else
64816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64817$as_echo_n "checking if libelf works... " >&6; }
64818        ac_ext=c
64819ac_cpp='$CPP $CPPFLAGS'
64820ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64821ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64822ac_compiler_gnu=$ac_cv_c_compiler_gnu
64823
64824        OLD_CFLAGS="$CFLAGS"
64825        CFLAGS="$CFLAGS $ELF_CFLAGS"
64826        OLD_LIBS="$LIBS"
64827        LIBS="$LIBS $ELF_LIBS"
64828        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64829/* end confdefs.h.  */
64830#include <libelf.h>
64831int
64832main ()
64833{
64834
64835              elf_version(0);
64836              return 0;
64837
64838  ;
64839  return 0;
64840}
64841_ACEOF
64842if ac_fn_c_try_link "$LINENO"; then :
64843  LIBELF_WORKS=yes
64844else
64845  LIBELF_WORKS=no
64846
64847fi
64848rm -f core conftest.err conftest.$ac_objext \
64849    conftest$ac_exeext conftest.$ac_ext
64850        CFLAGS="$OLD_CFLAGS"
64851        LIBS="$OLD_LIBS"
64852        ac_ext=cpp
64853ac_cpp='$CXXCPP $CPPFLAGS'
64854ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64855ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64856ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64857
64858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64859$as_echo "$LIBELF_WORKS" >&6; }
64860
64861        if test "x$LIBELF_WORKS" = xno; then
64862          ENABLE_AOT="false"
64863
64864  # Print a helpful message on how to acquire the necessary build dependency.
64865  # elf is the help tag: freetype, cups, alsa etc
64866  MISSING_DEPENDENCY=elf
64867
64868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64869    cygwin_help $MISSING_DEPENDENCY
64870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64871    msys_help $MISSING_DEPENDENCY
64872  else
64873    PKGHANDLER_COMMAND=
64874
64875    case $PKGHANDLER in
64876      apt-get)
64877        apt_help     $MISSING_DEPENDENCY ;;
64878      yum)
64879        yum_help     $MISSING_DEPENDENCY ;;
64880      brew)
64881        brew_help    $MISSING_DEPENDENCY ;;
64882      port)
64883        port_help    $MISSING_DEPENDENCY ;;
64884      pkgutil)
64885        pkgutil_help $MISSING_DEPENDENCY ;;
64886      pkgadd)
64887        pkgadd_help  $MISSING_DEPENDENCY ;;
64888    esac
64889
64890    if test "x$PKGHANDLER_COMMAND" != x; then
64891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64892    fi
64893  fi
64894
64895          if test "x$enable_aot" = "xyes"; then
64896            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64897          else
64898            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64899$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64900          fi
64901        fi
64902      fi
64903    fi
64904  fi
64905
64906
64907
64908
64909
64910
64911
64912
64913
64914
64915
64916
64917
64918
64919
64920
64921
64922
64923# Hotspot setup depends on lib checks (AOT needs libelf).
64924
64925
64926  # The user can in some cases supply additional jvm features. For the custom
64927  # variant, this defines the entire variant.
64928
64929# Check whether --with-jvm-features was given.
64930if test "${with_jvm_features+set}" = set; then :
64931  withval=$with_jvm_features;
64932fi
64933
64934  if test "x$with_jvm_features" != x; then
64935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64936$as_echo_n "checking additional JVM features... " >&6; }
64937    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64939$as_echo "$JVM_FEATURES" >&6; }
64940  fi
64941
64942  # Override hotspot cpu definitions for ARM platforms
64943  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64944    HOTSPOT_TARGET_CPU=arm_32
64945    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64946    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64947    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64948  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64949    HOTSPOT_TARGET_CPU=arm_64
64950    HOTSPOT_TARGET_CPU_ARCH=arm
64951    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64952    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64953  fi
64954
64955  # Verify that dependencies are met for explicitly set features.
64956  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64957    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64958  fi
64959
64960  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64961    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64962  fi
64963
64964  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64965    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64966  fi
64967
64968  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64969    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64970  fi
64971
64972  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64973    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64974  fi
64975
64976  # Turn on additional features based on other parts of configure
64977  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64978    JVM_FEATURES="$JVM_FEATURES dtrace"
64979  else
64980    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64981      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64982    fi
64983  fi
64984
64985  if test "x$STATIC_BUILD" = "xtrue"; then
64986    JVM_FEATURES="$JVM_FEATURES static-build"
64987  else
64988    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64989      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64990    fi
64991  fi
64992
64993  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64994    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64995      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64996    fi
64997  fi
64998
64999  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65000    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65001      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65002    fi
65003  fi
65004
65005  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65006  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65007     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65008     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65009    JVM_FEATURES_jvmci="jvmci"
65010  else
65011    JVM_FEATURES_jvmci=""
65012  fi
65013
65014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65015$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65016  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65018$as_echo "yes, forced" >&6; }
65019    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65020      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65021    fi
65022    INCLUDE_GRAAL="true"
65023  else
65024    # By default enable graal build where AOT is available
65025    if test "x$ENABLE_AOT" = "xtrue"; then
65026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65027$as_echo "yes" >&6; }
65028      JVM_FEATURES_graal="graal"
65029      INCLUDE_GRAAL="true"
65030    else
65031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65032$as_echo "no" >&6; }
65033      JVM_FEATURES_graal=""
65034      INCLUDE_GRAAL="false"
65035    fi
65036  fi
65037
65038
65039
65040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65041$as_echo_n "checking if aot should be enabled... " >&6; }
65042  if test "x$ENABLE_AOT" = "xtrue"; then
65043    if test "x$enable_aot" = "xyes"; then
65044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65045$as_echo "yes, forced" >&6; }
65046    else
65047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65048$as_echo "yes" >&6; }
65049    fi
65050    JVM_FEATURES_aot="aot"
65051  else
65052    if test "x$enable_aot" = "xno"; then
65053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65054$as_echo "no, forced" >&6; }
65055    else
65056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65057$as_echo "no" >&6; }
65058    fi
65059    JVM_FEATURES_aot=""
65060  fi
65061
65062  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65063    # Default to use link time optimizations on minimal on arm
65064    JVM_FEATURES_link_time_opt="link-time-opt"
65065  else
65066    JVM_FEATURES_link_time_opt=""
65067  fi
65068
65069  # All variants but minimal (and custom) get these features
65070  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65071
65072  # Enable features depending on variant.
65073  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65074  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65075  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65076  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65077  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65078  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65079  JVM_FEATURES_custom="$JVM_FEATURES"
65080
65081
65082
65083
65084
65085
65086
65087
65088
65089  # Used for verification of Makefiles by check-jvm-feature
65090
65091
65092  # We don't support --with-jvm-interpreter anymore, use zero instead.
65093
65094
65095# Check whether --with-jvm-interpreter was given.
65096if test "${with_jvm_interpreter+set}" = set; then :
65097  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65098$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65099fi
65100
65101
65102
65103
65104###############################################################################
65105#
65106# We need to do some final tweaking, when everything else is done.
65107#
65108###############################################################################
65109
65110
65111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65112$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65113
65114  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65115    ENABLE_INTREE_EC=true
65116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65117$as_echo "yes" >&6; }
65118  else
65119    ENABLE_INTREE_EC=false
65120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65121$as_echo "no" >&6; }
65122  fi
65123
65124
65125
65126
65127  # Check whether --enable-jtreg-failure-handler was given.
65128if test "${enable_jtreg_failure_handler+set}" = set; then :
65129  enableval=$enable_jtreg_failure_handler;
65130fi
65131
65132
65133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65134$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65135
65136  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65137    if test "x$JT_HOME" = "x"; then
65138      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65139    else
65140      BUILD_FAILURE_HANDLER=true
65141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65142$as_echo "yes, forced" >&6; }
65143    fi
65144  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65145    BUILD_FAILURE_HANDLER=false
65146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65147$as_echo "no, forced" >&6; }
65148  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65149      || test "x$enable_jtreg_failure_handler" = "x"; then
65150    if test "x$JT_HOME" = "x"; then
65151      BUILD_FAILURE_HANDLER=false
65152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65153$as_echo "no, missing jtreg" >&6; }
65154    else
65155      BUILD_FAILURE_HANDLER=true
65156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65157$as_echo "yes, jtreg present" >&6; }
65158    fi
65159  else
65160    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65161  fi
65162
65163
65164
65165
65166  # Check whether --enable-generate-classlist was given.
65167if test "${enable_generate_classlist+set}" = set; then :
65168  enableval=$enable_generate_classlist;
65169fi
65170
65171
65172  # Check if it's likely that it's possible to generate the classlist. Depending
65173  # on exact jvm configuration it could be possible anyway.
65174  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65175    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65176  else
65177    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65178  fi
65179
65180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65181$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65182  if test "x$enable_generate_classlist" = "xyes"; then
65183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65184$as_echo "yes, forced" >&6; }
65185    ENABLE_GENERATE_CLASSLIST="true"
65186    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65187      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65188$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65189    fi
65190  elif test "x$enable_generate_classlist" = "xno"; then
65191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65192$as_echo "no, forced" >&6; }
65193    ENABLE_GENERATE_CLASSLIST="false"
65194  elif test "x$enable_generate_classlist" = "x"; then
65195    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65197$as_echo "yes" >&6; }
65198      ENABLE_GENERATE_CLASSLIST="true"
65199    else
65200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65201$as_echo "no" >&6; }
65202      ENABLE_GENERATE_CLASSLIST="false"
65203    fi
65204  else
65205    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65206  fi
65207
65208
65209
65210
65211###############################################################################
65212#
65213# Configure parts of the build that only affect the build performance,
65214# not the result.
65215#
65216###############################################################################
65217
65218
65219  # How many cores do we have on this build system?
65220
65221# Check whether --with-num-cores was given.
65222if test "${with_num_cores+set}" = set; then :
65223  withval=$with_num_cores;
65224fi
65225
65226  if test "x$with_num_cores" = x; then
65227    # The number of cores were not specified, try to probe them.
65228
65229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65230$as_echo_n "checking for number of cores... " >&6; }
65231  NUM_CORES=1
65232  FOUND_CORES=no
65233
65234  if test -f /proc/cpuinfo; then
65235    # Looks like a Linux (or cygwin) system
65236    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65237    FOUND_CORES=yes
65238  elif test -x /usr/sbin/psrinfo; then
65239    # Looks like a Solaris system
65240    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65241    FOUND_CORES=yes
65242  elif test -x /usr/sbin/sysctl; then
65243    # Looks like a MacOSX system
65244    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65245    FOUND_CORES=yes
65246  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65247    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65248    FOUND_CORES=yes
65249  elif test -n "$NUMBER_OF_PROCESSORS"; then
65250    # On windows, look in the env
65251    NUM_CORES=$NUMBER_OF_PROCESSORS
65252    FOUND_CORES=yes
65253  fi
65254
65255  if test "x$FOUND_CORES" = xyes; then
65256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65257$as_echo "$NUM_CORES" >&6; }
65258  else
65259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65260$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65262$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65263  fi
65264
65265  else
65266    NUM_CORES=$with_num_cores
65267  fi
65268
65269
65270
65271  # How much memory do we have on this build system?
65272
65273# Check whether --with-memory-size was given.
65274if test "${with_memory_size+set}" = set; then :
65275  withval=$with_memory_size;
65276fi
65277
65278  if test "x$with_memory_size" = x; then
65279    # The memory size was not specified, try to probe it.
65280
65281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65282$as_echo_n "checking for memory size... " >&6; }
65283  # Default to 1024 MB
65284  MEMORY_SIZE=1024
65285  FOUND_MEM=no
65286
65287  if test -f /proc/meminfo; then
65288    # Looks like a Linux (or cygwin) system
65289    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65290    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65291    FOUND_MEM=yes
65292  elif test -x /usr/sbin/prtconf; then
65293    # Looks like a Solaris or AIX system
65294    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65295    FOUND_MEM=yes
65296  elif test -x /usr/sbin/sysctl; then
65297    # Looks like a MacOSX system
65298    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65299    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65300    FOUND_MEM=yes
65301  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65302    # Windows, but without cygwin
65303    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65304    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65305    FOUND_MEM=yes
65306  fi
65307
65308  if test "x$FOUND_MEM" = xyes; then
65309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65310$as_echo "$MEMORY_SIZE MB" >&6; }
65311  else
65312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65313$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65314    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65315$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65316  fi
65317
65318  else
65319    MEMORY_SIZE=$with_memory_size
65320  fi
65321
65322
65323
65324  # Provide a decent default number of parallel jobs for make depending on
65325  # number of cores, amount of memory and machine architecture.
65326
65327# Check whether --with-jobs was given.
65328if test "${with_jobs+set}" = set; then :
65329  withval=$with_jobs;
65330fi
65331
65332  if test "x$with_jobs" = x; then
65333    # Number of jobs was not specified, calculate.
65334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65335$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65336    # Approximate memory in GB.
65337    memory_gb=`expr $MEMORY_SIZE / 1024`
65338    # Pick the lowest of memory in gb and number of cores.
65339    if test "$memory_gb" -lt "$NUM_CORES"; then
65340      JOBS="$memory_gb"
65341    else
65342      JOBS="$NUM_CORES"
65343    fi
65344    if test "$JOBS" -eq "0"; then
65345      JOBS=1
65346    fi
65347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65348$as_echo "$JOBS" >&6; }
65349  else
65350    JOBS=$with_jobs
65351  fi
65352
65353
65354
65355  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65356
65357# Check whether --with-test-jobs was given.
65358if test "${with_test_jobs+set}" = set; then :
65359  withval=$with_test_jobs;
65360fi
65361
65362  if test "x$with_test_jobs" = x; then
65363      TEST_JOBS=0
65364  else
65365      TEST_JOBS=$with_test_jobs
65366  fi
65367
65368
65369
65370# Setup arguments for the boot jdk (after cores and memory have been setup)
65371
65372  ##############################################################################
65373  #
65374  # Specify jvm options for anything that is run with the Boot JDK.
65375  # Not all JVM:s accept the same arguments on the command line.
65376  #
65377
65378# Check whether --with-boot-jdk-jvmargs was given.
65379if test "${with_boot_jdk_jvmargs+set}" = set; then :
65380  withval=$with_boot_jdk_jvmargs;
65381fi
65382
65383
65384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65385$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65386
65387  # Disable special log output when a debug build is used as Boot JDK...
65388
65389  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65390  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65391  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65392  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65393  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65394  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65395    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65396    JVM_ARG_OK=true
65397  else
65398    $ECHO "Arg failed:" >&5
65399    $ECHO "$OUTPUT" >&5
65400    JVM_ARG_OK=false
65401  fi
65402
65403
65404  # Force en-US environment
65405
65406  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65407  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65408  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65409  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65410  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65411  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65412    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65413    JVM_ARG_OK=true
65414  else
65415    $ECHO "Arg failed:" >&5
65416    $ECHO "$OUTPUT" >&5
65417    JVM_ARG_OK=false
65418  fi
65419
65420
65421  # Apply user provided options.
65422
65423  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65424  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65425  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65426  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65427  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65428  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65429    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65430    JVM_ARG_OK=true
65431  else
65432    $ECHO "Arg failed:" >&5
65433    $ECHO "$OUTPUT" >&5
65434    JVM_ARG_OK=false
65435  fi
65436
65437
65438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65439$as_echo "$boot_jdk_jvmargs" >&6; }
65440
65441  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65442  JAVA_FLAGS=$boot_jdk_jvmargs
65443
65444
65445
65446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65447$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65448
65449  # Starting amount of heap memory.
65450
65451  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65452  $ECHO "Command: $JAVA -Xms64M -version" >&5
65453  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65454  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65455  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65456  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65457    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65458    JVM_ARG_OK=true
65459  else
65460    $ECHO "Arg failed:" >&5
65461    $ECHO "$OUTPUT" >&5
65462    JVM_ARG_OK=false
65463  fi
65464
65465  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65466
65467  # Maximum amount of heap memory and stack size.
65468  JVM_HEAP_LIMIT_32="1024"
65469  # Running a 64 bit JVM allows for and requires a bigger heap
65470  JVM_HEAP_LIMIT_64="1600"
65471  STACK_SIZE_32=768
65472  STACK_SIZE_64=1536
65473  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65474  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65475    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65476  fi
65477  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65478    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65479  fi
65480  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65481    JVM_HEAP_LIMIT_32=512
65482    JVM_HEAP_LIMIT_64=512
65483  fi
65484
65485  if test "x$BOOT_JDK_BITS" = "x32"; then
65486    STACK_SIZE=$STACK_SIZE_32
65487    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65488  else
65489    STACK_SIZE=$STACK_SIZE_64
65490    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65491  fi
65492
65493  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65494  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65495  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65496  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65497  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65498  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65499    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65500    JVM_ARG_OK=true
65501  else
65502    $ECHO "Arg failed:" >&5
65503    $ECHO "$OUTPUT" >&5
65504    JVM_ARG_OK=false
65505  fi
65506
65507
65508  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65509  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65510  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65511  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65512  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65513  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65514    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65515    JVM_ARG_OK=true
65516  else
65517    $ECHO "Arg failed:" >&5
65518    $ECHO "$OUTPUT" >&5
65519    JVM_ARG_OK=false
65520  fi
65521
65522
65523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65524$as_echo "$boot_jdk_jvmargs_big" >&6; }
65525
65526  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65527
65528
65529  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65530    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65531    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65532  else
65533    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65534    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65535  fi
65536  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65537  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65539$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65541$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65542
65543
65544  # By default, the main javac compilations use big
65545  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65546
65547
65548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65549$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65550
65551  # Use serial gc for small short lived tools if possible
65552
65553  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65554  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65555  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65556  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65557  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65558  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65559    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65560    JVM_ARG_OK=true
65561  else
65562    $ECHO "Arg failed:" >&5
65563    $ECHO "$OUTPUT" >&5
65564    JVM_ARG_OK=false
65565  fi
65566
65567
65568  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65569  $ECHO "Command: $JAVA -Xms32M -version" >&5
65570  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65571  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65572  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65573  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65574    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65575    JVM_ARG_OK=true
65576  else
65577    $ECHO "Arg failed:" >&5
65578    $ECHO "$OUTPUT" >&5
65579    JVM_ARG_OK=false
65580  fi
65581
65582
65583  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65584  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65585  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65586  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65587  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65588  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65589    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65590    JVM_ARG_OK=true
65591  else
65592    $ECHO "Arg failed:" >&5
65593    $ECHO "$OUTPUT" >&5
65594    JVM_ARG_OK=false
65595  fi
65596
65597
65598  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65599  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65600  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65601  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65602  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65603  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65604    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65605    JVM_ARG_OK=true
65606  else
65607    $ECHO "Arg failed:" >&5
65608    $ECHO "$OUTPUT" >&5
65609    JVM_ARG_OK=false
65610  fi
65611
65612
65613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65614$as_echo "$boot_jdk_jvmargs_small" >&6; }
65615
65616  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65617
65618
65619  JAVA_TOOL_FLAGS_SMALL=""
65620  for f in $JAVA_FLAGS_SMALL; do
65621    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65622  done
65623
65624
65625
65626# Setup smart javac (after cores and memory have been setup)
65627
65628
65629# Check whether --with-sjavac-server-java was given.
65630if test "${with_sjavac_server_java+set}" = set; then :
65631  withval=$with_sjavac_server_java;
65632fi
65633
65634
65635  if test "x$with_sjavac_server_java" != x; then
65636    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65637    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65638    if test "x$FOUND_VERSION" = x; then
65639      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65640    fi
65641  else
65642    SJAVAC_SERVER_JAVA="$JAVA"
65643  fi
65644
65645
65646  if test "$MEMORY_SIZE" -gt "3000"; then
65647
65648  $ECHO "Check if jvm arg is ok: -d64" >&5
65649  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65650  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65651  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65652  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65653  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65654    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65655    JVM_ARG_OK=true
65656  else
65657    $ECHO "Arg failed:" >&5
65658    $ECHO "$OUTPUT" >&5
65659    JVM_ARG_OK=false
65660  fi
65661
65662    if test "$JVM_ARG_OK" = true; then
65663      JVM_64BIT=true
65664      JVM_ARG_OK=false
65665    fi
65666  fi
65667
65668  MX_VALUE=`expr $MEMORY_SIZE / 2`
65669  if test "$JVM_64BIT" = true; then
65670    # Set ms lower than mx since more than one instance of the server might
65671    # get launched at the same time before they figure out which instance won.
65672    MS_VALUE=512
65673    if test "$MX_VALUE" -gt "2048"; then
65674      MX_VALUE=2048
65675    fi
65676  else
65677    MS_VALUE=256
65678    if test "$MX_VALUE" -gt "1500"; then
65679      MX_VALUE=1500
65680    fi
65681  fi
65682  if test "$MX_VALUE" -lt "512"; then
65683    MX_VALUE=512
65684  fi
65685
65686  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65687  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65688  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65689  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65690  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65691  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65692    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65693    JVM_ARG_OK=true
65694  else
65695    $ECHO "Arg failed:" >&5
65696    $ECHO "$OUTPUT" >&5
65697    JVM_ARG_OK=false
65698  fi
65699
65700
65701
65702  # Check whether --enable-sjavac was given.
65703if test "${enable_sjavac+set}" = set; then :
65704  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65705else
65706  ENABLE_SJAVAC="no"
65707fi
65708
65709  if test "x$JVM_ARG_OK" = "xfalse"; then
65710    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65711$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65712    ENABLE_SJAVAC="no"
65713  fi
65714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65715$as_echo_n "checking whether to use sjavac... " >&6; }
65716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65717$as_echo "$ENABLE_SJAVAC" >&6; }
65718
65719
65720  # Check whether --enable-javac-server was given.
65721if test "${enable_javac_server+set}" = set; then :
65722  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65723else
65724  ENABLE_JAVAC_SERVER="yes"
65725fi
65726
65727  if test "x$JVM_ARG_OK" = "xfalse"; then
65728    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65729$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65730    ENABLE_JAVAC_SERVER="no"
65731  fi
65732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65733$as_echo_n "checking whether to use javac server... " >&6; }
65734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65735$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65736
65737
65738  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65739    # When using a server javac, the small client instances do not need much
65740    # resources.
65741    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65742  fi
65743
65744
65745# Setup use of icecc if requested
65746
65747  # Check whether --enable-icecc was given.
65748if test "${enable_icecc+set}" = set; then :
65749  enableval=$enable_icecc;
65750fi
65751
65752
65753  if test "x${enable_icecc}" = "xyes"; then
65754
65755
65756
65757  # Publish this variable in the help.
65758
65759
65760  if [ -z "${ICECC_CMD+x}" ]; then
65761    # The variable is not set by user, try to locate tool using the code snippet
65762    for ac_prog in icecc
65763do
65764  # Extract the first word of "$ac_prog", so it can be a program name with args.
65765set dummy $ac_prog; ac_word=$2
65766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65767$as_echo_n "checking for $ac_word... " >&6; }
65768if ${ac_cv_path_ICECC_CMD+:} false; then :
65769  $as_echo_n "(cached) " >&6
65770else
65771  case $ICECC_CMD in
65772  [\\/]* | ?:[\\/]*)
65773  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65774  ;;
65775  *)
65776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65777for as_dir in $PATH
65778do
65779  IFS=$as_save_IFS
65780  test -z "$as_dir" && as_dir=.
65781    for ac_exec_ext in '' $ac_executable_extensions; do
65782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65783    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65785    break 2
65786  fi
65787done
65788  done
65789IFS=$as_save_IFS
65790
65791  ;;
65792esac
65793fi
65794ICECC_CMD=$ac_cv_path_ICECC_CMD
65795if test -n "$ICECC_CMD"; then
65796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65797$as_echo "$ICECC_CMD" >&6; }
65798else
65799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65800$as_echo "no" >&6; }
65801fi
65802
65803
65804  test -n "$ICECC_CMD" && break
65805done
65806
65807  else
65808    # The variable is set, but is it from the command line or the environment?
65809
65810    # Try to remove the string !ICECC_CMD! from our list.
65811    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65812    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65813      # If it failed, the variable was not from the command line. Ignore it,
65814      # but warn the user (except for BASH, which is always set by the calling BASH).
65815      if test "xICECC_CMD" != xBASH; then
65816        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65817$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65818      fi
65819      # Try to locate tool using the code snippet
65820      for ac_prog in icecc
65821do
65822  # Extract the first word of "$ac_prog", so it can be a program name with args.
65823set dummy $ac_prog; ac_word=$2
65824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65825$as_echo_n "checking for $ac_word... " >&6; }
65826if ${ac_cv_path_ICECC_CMD+:} false; then :
65827  $as_echo_n "(cached) " >&6
65828else
65829  case $ICECC_CMD in
65830  [\\/]* | ?:[\\/]*)
65831  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65832  ;;
65833  *)
65834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65835for as_dir in $PATH
65836do
65837  IFS=$as_save_IFS
65838  test -z "$as_dir" && as_dir=.
65839    for ac_exec_ext in '' $ac_executable_extensions; do
65840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65841    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65843    break 2
65844  fi
65845done
65846  done
65847IFS=$as_save_IFS
65848
65849  ;;
65850esac
65851fi
65852ICECC_CMD=$ac_cv_path_ICECC_CMD
65853if test -n "$ICECC_CMD"; then
65854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65855$as_echo "$ICECC_CMD" >&6; }
65856else
65857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65858$as_echo "no" >&6; }
65859fi
65860
65861
65862  test -n "$ICECC_CMD" && break
65863done
65864
65865    else
65866      # If it succeeded, then it was overridden by the user. We will use it
65867      # for the tool.
65868
65869      # First remove it from the list of overridden variables, so we can test
65870      # for unknown variables in the end.
65871      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65872
65873      # Check if we try to supply an empty value
65874      if test "x$ICECC_CMD" = x; then
65875        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65876$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65877        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65878$as_echo_n "checking for ICECC_CMD... " >&6; }
65879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65880$as_echo "disabled" >&6; }
65881      else
65882        # Check if the provided tool contains a complete path.
65883        tool_specified="$ICECC_CMD"
65884        tool_basename="${tool_specified##*/}"
65885        if test "x$tool_basename" = "x$tool_specified"; then
65886          # A command without a complete path is provided, search $PATH.
65887          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65888$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65889          # Extract the first word of "$tool_basename", so it can be a program name with args.
65890set dummy $tool_basename; ac_word=$2
65891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65892$as_echo_n "checking for $ac_word... " >&6; }
65893if ${ac_cv_path_ICECC_CMD+:} false; then :
65894  $as_echo_n "(cached) " >&6
65895else
65896  case $ICECC_CMD in
65897  [\\/]* | ?:[\\/]*)
65898  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65899  ;;
65900  *)
65901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65902for as_dir in $PATH
65903do
65904  IFS=$as_save_IFS
65905  test -z "$as_dir" && as_dir=.
65906    for ac_exec_ext in '' $ac_executable_extensions; do
65907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65908    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65910    break 2
65911  fi
65912done
65913  done
65914IFS=$as_save_IFS
65915
65916  ;;
65917esac
65918fi
65919ICECC_CMD=$ac_cv_path_ICECC_CMD
65920if test -n "$ICECC_CMD"; then
65921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65922$as_echo "$ICECC_CMD" >&6; }
65923else
65924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65925$as_echo "no" >&6; }
65926fi
65927
65928
65929          if test "x$ICECC_CMD" = x; then
65930            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65931          fi
65932        else
65933          # Otherwise we believe it is a complete path. Use it as it is.
65934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65935$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65936          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65937$as_echo_n "checking for ICECC_CMD... " >&6; }
65938          if test ! -x "$tool_specified"; then
65939            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65940$as_echo "not found" >&6; }
65941            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65942          fi
65943          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65944$as_echo "$tool_specified" >&6; }
65945        fi
65946      fi
65947    fi
65948
65949  fi
65950
65951
65952
65953  if test "x$ICECC_CMD" = x; then
65954    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65955  fi
65956
65957
65958    old_path="$PATH"
65959
65960    # Look for icecc-create-env in some known places
65961    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65962
65963
65964
65965  # Publish this variable in the help.
65966
65967
65968  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65969    # The variable is not set by user, try to locate tool using the code snippet
65970    for ac_prog in icecc-create-env
65971do
65972  # Extract the first word of "$ac_prog", so it can be a program name with args.
65973set dummy $ac_prog; ac_word=$2
65974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65975$as_echo_n "checking for $ac_word... " >&6; }
65976if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65977  $as_echo_n "(cached) " >&6
65978else
65979  case $ICECC_CREATE_ENV in
65980  [\\/]* | ?:[\\/]*)
65981  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65982  ;;
65983  *)
65984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65985for as_dir in $PATH
65986do
65987  IFS=$as_save_IFS
65988  test -z "$as_dir" && as_dir=.
65989    for ac_exec_ext in '' $ac_executable_extensions; do
65990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65991    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65993    break 2
65994  fi
65995done
65996  done
65997IFS=$as_save_IFS
65998
65999  ;;
66000esac
66001fi
66002ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66003if test -n "$ICECC_CREATE_ENV"; then
66004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66005$as_echo "$ICECC_CREATE_ENV" >&6; }
66006else
66007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66008$as_echo "no" >&6; }
66009fi
66010
66011
66012  test -n "$ICECC_CREATE_ENV" && break
66013done
66014
66015  else
66016    # The variable is set, but is it from the command line or the environment?
66017
66018    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66021      # If it failed, the variable was not from the command line. Ignore it,
66022      # but warn the user (except for BASH, which is always set by the calling BASH).
66023      if test "xICECC_CREATE_ENV" != xBASH; then
66024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66025$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66026      fi
66027      # Try to locate tool using the code snippet
66028      for ac_prog in icecc-create-env
66029do
66030  # Extract the first word of "$ac_prog", so it can be a program name with args.
66031set dummy $ac_prog; ac_word=$2
66032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66033$as_echo_n "checking for $ac_word... " >&6; }
66034if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66035  $as_echo_n "(cached) " >&6
66036else
66037  case $ICECC_CREATE_ENV in
66038  [\\/]* | ?:[\\/]*)
66039  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66040  ;;
66041  *)
66042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66043for as_dir in $PATH
66044do
66045  IFS=$as_save_IFS
66046  test -z "$as_dir" && as_dir=.
66047    for ac_exec_ext in '' $ac_executable_extensions; do
66048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66049    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66051    break 2
66052  fi
66053done
66054  done
66055IFS=$as_save_IFS
66056
66057  ;;
66058esac
66059fi
66060ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66061if test -n "$ICECC_CREATE_ENV"; then
66062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66063$as_echo "$ICECC_CREATE_ENV" >&6; }
66064else
66065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66066$as_echo "no" >&6; }
66067fi
66068
66069
66070  test -n "$ICECC_CREATE_ENV" && break
66071done
66072
66073    else
66074      # If it succeeded, then it was overridden by the user. We will use it
66075      # for the tool.
66076
66077      # First remove it from the list of overridden variables, so we can test
66078      # for unknown variables in the end.
66079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66080
66081      # Check if we try to supply an empty value
66082      if test "x$ICECC_CREATE_ENV" = x; then
66083        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66084$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66086$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66088$as_echo "disabled" >&6; }
66089      else
66090        # Check if the provided tool contains a complete path.
66091        tool_specified="$ICECC_CREATE_ENV"
66092        tool_basename="${tool_specified##*/}"
66093        if test "x$tool_basename" = "x$tool_specified"; then
66094          # A command without a complete path is provided, search $PATH.
66095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66096$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66097          # Extract the first word of "$tool_basename", so it can be a program name with args.
66098set dummy $tool_basename; ac_word=$2
66099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66100$as_echo_n "checking for $ac_word... " >&6; }
66101if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66102  $as_echo_n "(cached) " >&6
66103else
66104  case $ICECC_CREATE_ENV in
66105  [\\/]* | ?:[\\/]*)
66106  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66107  ;;
66108  *)
66109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66110for as_dir in $PATH
66111do
66112  IFS=$as_save_IFS
66113  test -z "$as_dir" && as_dir=.
66114    for ac_exec_ext in '' $ac_executable_extensions; do
66115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66116    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66118    break 2
66119  fi
66120done
66121  done
66122IFS=$as_save_IFS
66123
66124  ;;
66125esac
66126fi
66127ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66128if test -n "$ICECC_CREATE_ENV"; then
66129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66130$as_echo "$ICECC_CREATE_ENV" >&6; }
66131else
66132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66133$as_echo "no" >&6; }
66134fi
66135
66136
66137          if test "x$ICECC_CREATE_ENV" = x; then
66138            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66139          fi
66140        else
66141          # Otherwise we believe it is a complete path. Use it as it is.
66142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66143$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66144          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66145$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66146          if test ! -x "$tool_specified"; then
66147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66148$as_echo "not found" >&6; }
66149            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66150          fi
66151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66152$as_echo "$tool_specified" >&6; }
66153        fi
66154      fi
66155    fi
66156
66157  fi
66158
66159
66160
66161  if test "x$ICECC_CREATE_ENV" = x; then
66162    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66163  fi
66164
66165
66166    # Use icecc-create-env to create a minimal compilation environment that can
66167    # be sent to the other hosts in the icecream cluster.
66168    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66169    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66170    # Older versions of icecc does not have the --gcc parameter
66171    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66172      icecc_gcc_arg="--gcc"
66173    fi
66174    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66175
66176  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66177      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66178          ${icecc_create_env_log} 2>&1 )
66179  if test "$?" != "0"; then
66180    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66181$as_echo "$as_me: icecc-create-env output:" >&6;}
66182    cat \
66183          ${icecc_create_env_log}
66184    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66185  fi
66186
66187    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66188      # For clang, the icecc compilerwrapper is needed. It usually resides next
66189      # to icecc-create-env.
66190
66191
66192
66193  # Publish this variable in the help.
66194
66195
66196  if [ -z "${ICECC_WRAPPER+x}" ]; then
66197    # The variable is not set by user, try to locate tool using the code snippet
66198    for ac_prog in compilerwrapper
66199do
66200  # Extract the first word of "$ac_prog", so it can be a program name with args.
66201set dummy $ac_prog; ac_word=$2
66202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66203$as_echo_n "checking for $ac_word... " >&6; }
66204if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66205  $as_echo_n "(cached) " >&6
66206else
66207  case $ICECC_WRAPPER in
66208  [\\/]* | ?:[\\/]*)
66209  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66210  ;;
66211  *)
66212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66213for as_dir in $PATH
66214do
66215  IFS=$as_save_IFS
66216  test -z "$as_dir" && as_dir=.
66217    for ac_exec_ext in '' $ac_executable_extensions; do
66218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66219    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66221    break 2
66222  fi
66223done
66224  done
66225IFS=$as_save_IFS
66226
66227  ;;
66228esac
66229fi
66230ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66231if test -n "$ICECC_WRAPPER"; then
66232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66233$as_echo "$ICECC_WRAPPER" >&6; }
66234else
66235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66236$as_echo "no" >&6; }
66237fi
66238
66239
66240  test -n "$ICECC_WRAPPER" && break
66241done
66242
66243  else
66244    # The variable is set, but is it from the command line or the environment?
66245
66246    # Try to remove the string !ICECC_WRAPPER! from our list.
66247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66249      # If it failed, the variable was not from the command line. Ignore it,
66250      # but warn the user (except for BASH, which is always set by the calling BASH).
66251      if test "xICECC_WRAPPER" != xBASH; then
66252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66253$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66254      fi
66255      # Try to locate tool using the code snippet
66256      for ac_prog in compilerwrapper
66257do
66258  # Extract the first word of "$ac_prog", so it can be a program name with args.
66259set dummy $ac_prog; ac_word=$2
66260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66261$as_echo_n "checking for $ac_word... " >&6; }
66262if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66263  $as_echo_n "(cached) " >&6
66264else
66265  case $ICECC_WRAPPER in
66266  [\\/]* | ?:[\\/]*)
66267  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66268  ;;
66269  *)
66270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66271for as_dir in $PATH
66272do
66273  IFS=$as_save_IFS
66274  test -z "$as_dir" && as_dir=.
66275    for ac_exec_ext in '' $ac_executable_extensions; do
66276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66277    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66279    break 2
66280  fi
66281done
66282  done
66283IFS=$as_save_IFS
66284
66285  ;;
66286esac
66287fi
66288ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66289if test -n "$ICECC_WRAPPER"; then
66290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66291$as_echo "$ICECC_WRAPPER" >&6; }
66292else
66293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66294$as_echo "no" >&6; }
66295fi
66296
66297
66298  test -n "$ICECC_WRAPPER" && break
66299done
66300
66301    else
66302      # If it succeeded, then it was overridden by the user. We will use it
66303      # for the tool.
66304
66305      # First remove it from the list of overridden variables, so we can test
66306      # for unknown variables in the end.
66307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66308
66309      # Check if we try to supply an empty value
66310      if test "x$ICECC_WRAPPER" = x; then
66311        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66312$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66314$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66316$as_echo "disabled" >&6; }
66317      else
66318        # Check if the provided tool contains a complete path.
66319        tool_specified="$ICECC_WRAPPER"
66320        tool_basename="${tool_specified##*/}"
66321        if test "x$tool_basename" = "x$tool_specified"; then
66322          # A command without a complete path is provided, search $PATH.
66323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66324$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66325          # Extract the first word of "$tool_basename", so it can be a program name with args.
66326set dummy $tool_basename; ac_word=$2
66327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66328$as_echo_n "checking for $ac_word... " >&6; }
66329if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66330  $as_echo_n "(cached) " >&6
66331else
66332  case $ICECC_WRAPPER in
66333  [\\/]* | ?:[\\/]*)
66334  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66335  ;;
66336  *)
66337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66338for as_dir in $PATH
66339do
66340  IFS=$as_save_IFS
66341  test -z "$as_dir" && as_dir=.
66342    for ac_exec_ext in '' $ac_executable_extensions; do
66343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66344    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66346    break 2
66347  fi
66348done
66349  done
66350IFS=$as_save_IFS
66351
66352  ;;
66353esac
66354fi
66355ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66356if test -n "$ICECC_WRAPPER"; then
66357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66358$as_echo "$ICECC_WRAPPER" >&6; }
66359else
66360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66361$as_echo "no" >&6; }
66362fi
66363
66364
66365          if test "x$ICECC_WRAPPER" = x; then
66366            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66367          fi
66368        else
66369          # Otherwise we believe it is a complete path. Use it as it is.
66370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66371$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66372          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66373$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66374          if test ! -x "$tool_specified"; then
66375            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66376$as_echo "not found" >&6; }
66377            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66378          fi
66379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66380$as_echo "$tool_specified" >&6; }
66381        fi
66382      fi
66383    fi
66384
66385  fi
66386
66387
66388
66389  if test "x$ICECC_WRAPPER" = x; then
66390    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66391  fi
66392
66393
66394
66395  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66396      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66397  if test "$?" != "0"; then
66398    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66399$as_echo "$as_me: icecc-create-env output:" >&6;}
66400    cat ${icecc_create_env_log}
66401    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66402  fi
66403
66404    else
66405      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66406    fi
66407    PATH="$old_path"
66408    # The bundle with the compiler gets a name based on checksums. Parse log file
66409    # to find it.
66410    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66411    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66412    if test ! -f ${ICECC_ENV_BUNDLE}; then
66413      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66414    fi
66415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66416$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66418$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66419    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66420
66421    if test "x${COMPILE_TYPE}" = "xcross"; then
66422      # If cross compiling, create a separate env package for the build compiler
66423      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66424      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66425      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66426
66427  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66428      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66429            ${icecc_create_env_log_build} 2>&1 )
66430  if test "$?" != "0"; then
66431    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66432$as_echo "$as_me: icecc-create-env output:" >&6;}
66433    cat \
66434            ${icecc_create_env_log_build}
66435    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66436  fi
66437
66438      elif test "x${BUILD_CC##*/}" = "xclang"; then
66439
66440  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66441      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66442  if test "$?" != "0"; then
66443    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66444$as_echo "$as_me: icecc-create-env output:" >&6;}
66445    cat ${icecc_create_env_log_build}
66446    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66447  fi
66448
66449      else
66450        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66451      fi
66452      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66453      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66454      if test ! -f ${ICECC_ENV_BUNDLE}; then
66455        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66456      fi
66457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66458$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66460$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66461      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66462          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66463    else
66464      BUILD_ICECC="${ICECC}"
66465    fi
66466
66467
66468  fi
66469
66470
66471# Can the C/C++ compiler use precompiled headers?
66472
66473
66474  ###############################################################################
66475  #
66476  # Can the C/C++ compiler use precompiled headers?
66477  #
66478  # Check whether --enable-precompiled-headers was given.
66479if test "${enable_precompiled_headers+set}" = set; then :
66480  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66481else
66482  ENABLE_PRECOMPH=yes
66483fi
66484
66485
66486  USE_PRECOMPILED_HEADER=true
66487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66488$as_echo_n "checking If precompiled header is enabled... " >&6; }
66489  if test "x$ENABLE_PRECOMPH" = xno; then
66490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66491$as_echo "no, forced" >&6; }
66492    USE_PRECOMPILED_HEADER=false
66493  elif test "x$ICECC" != "x"; then
66494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66495$as_echo "no, does not work effectively with icecc" >&6; }
66496    USE_PRECOMPILED_HEADER=false
66497  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66499$as_echo "no, does not work with Solaris Studio" >&6; }
66500    USE_PRECOMPILED_HEADER=false
66501  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66503$as_echo "no, does not work with xlc" >&6; }
66504    USE_PRECOMPILED_HEADER=false
66505  else
66506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66507$as_echo "yes" >&6; }
66508  fi
66509
66510  if test "x$ENABLE_PRECOMPH" = xyes; then
66511    # Check that the compiler actually supports precomp headers.
66512    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66514$as_echo_n "checking that precompiled headers work... " >&6; }
66515      echo "int alfa();" > conftest.h
66516      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66517      if test ! -f conftest.hpp.gch; then
66518        USE_PRECOMPILED_HEADER=false
66519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66520$as_echo "no" >&6; }
66521      else
66522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66523$as_echo "yes" >&6; }
66524      fi
66525      $RM conftest.h conftest.hpp.gch
66526    fi
66527  fi
66528
66529
66530
66531
66532# Setup use of ccache, if available
66533
66534  # Check whether --enable-ccache was given.
66535if test "${enable_ccache+set}" = set; then :
66536  enableval=$enable_ccache;
66537fi
66538
66539
66540  CCACHE_STATUS=
66541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66542$as_echo_n "checking is ccache enabled... " >&6; }
66543  if test "x$enable_ccache" = xyes; then
66544    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66546$as_echo "yes" >&6; }
66547      OLD_PATH="$PATH"
66548      if test "x$TOOLCHAIN_PATH" != x; then
66549        PATH=$TOOLCHAIN_PATH:$PATH
66550      fi
66551
66552
66553
66554  # Publish this variable in the help.
66555
66556
66557  if [ -z "${CCACHE+x}" ]; then
66558    # The variable is not set by user, try to locate tool using the code snippet
66559    for ac_prog in ccache
66560do
66561  # Extract the first word of "$ac_prog", so it can be a program name with args.
66562set dummy $ac_prog; ac_word=$2
66563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66564$as_echo_n "checking for $ac_word... " >&6; }
66565if ${ac_cv_path_CCACHE+:} false; then :
66566  $as_echo_n "(cached) " >&6
66567else
66568  case $CCACHE in
66569  [\\/]* | ?:[\\/]*)
66570  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66571  ;;
66572  *)
66573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66574for as_dir in $PATH
66575do
66576  IFS=$as_save_IFS
66577  test -z "$as_dir" && as_dir=.
66578    for ac_exec_ext in '' $ac_executable_extensions; do
66579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66580    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66582    break 2
66583  fi
66584done
66585  done
66586IFS=$as_save_IFS
66587
66588  ;;
66589esac
66590fi
66591CCACHE=$ac_cv_path_CCACHE
66592if test -n "$CCACHE"; then
66593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66594$as_echo "$CCACHE" >&6; }
66595else
66596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66597$as_echo "no" >&6; }
66598fi
66599
66600
66601  test -n "$CCACHE" && break
66602done
66603
66604  else
66605    # The variable is set, but is it from the command line or the environment?
66606
66607    # Try to remove the string !CCACHE! from our list.
66608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66610      # If it failed, the variable was not from the command line. Ignore it,
66611      # but warn the user (except for BASH, which is always set by the calling BASH).
66612      if test "xCCACHE" != xBASH; then
66613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66614$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66615      fi
66616      # Try to locate tool using the code snippet
66617      for ac_prog in ccache
66618do
66619  # Extract the first word of "$ac_prog", so it can be a program name with args.
66620set dummy $ac_prog; ac_word=$2
66621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66622$as_echo_n "checking for $ac_word... " >&6; }
66623if ${ac_cv_path_CCACHE+:} false; then :
66624  $as_echo_n "(cached) " >&6
66625else
66626  case $CCACHE in
66627  [\\/]* | ?:[\\/]*)
66628  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66629  ;;
66630  *)
66631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66632for as_dir in $PATH
66633do
66634  IFS=$as_save_IFS
66635  test -z "$as_dir" && as_dir=.
66636    for ac_exec_ext in '' $ac_executable_extensions; do
66637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66638    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66640    break 2
66641  fi
66642done
66643  done
66644IFS=$as_save_IFS
66645
66646  ;;
66647esac
66648fi
66649CCACHE=$ac_cv_path_CCACHE
66650if test -n "$CCACHE"; then
66651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66652$as_echo "$CCACHE" >&6; }
66653else
66654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66655$as_echo "no" >&6; }
66656fi
66657
66658
66659  test -n "$CCACHE" && break
66660done
66661
66662    else
66663      # If it succeeded, then it was overridden by the user. We will use it
66664      # for the tool.
66665
66666      # First remove it from the list of overridden variables, so we can test
66667      # for unknown variables in the end.
66668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66669
66670      # Check if we try to supply an empty value
66671      if test "x$CCACHE" = x; then
66672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66673$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66675$as_echo_n "checking for CCACHE... " >&6; }
66676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66677$as_echo "disabled" >&6; }
66678      else
66679        # Check if the provided tool contains a complete path.
66680        tool_specified="$CCACHE"
66681        tool_basename="${tool_specified##*/}"
66682        if test "x$tool_basename" = "x$tool_specified"; then
66683          # A command without a complete path is provided, search $PATH.
66684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66685$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66686          # Extract the first word of "$tool_basename", so it can be a program name with args.
66687set dummy $tool_basename; ac_word=$2
66688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66689$as_echo_n "checking for $ac_word... " >&6; }
66690if ${ac_cv_path_CCACHE+:} false; then :
66691  $as_echo_n "(cached) " >&6
66692else
66693  case $CCACHE in
66694  [\\/]* | ?:[\\/]*)
66695  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66696  ;;
66697  *)
66698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66699for as_dir in $PATH
66700do
66701  IFS=$as_save_IFS
66702  test -z "$as_dir" && as_dir=.
66703    for ac_exec_ext in '' $ac_executable_extensions; do
66704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66705    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66707    break 2
66708  fi
66709done
66710  done
66711IFS=$as_save_IFS
66712
66713  ;;
66714esac
66715fi
66716CCACHE=$ac_cv_path_CCACHE
66717if test -n "$CCACHE"; then
66718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66719$as_echo "$CCACHE" >&6; }
66720else
66721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66722$as_echo "no" >&6; }
66723fi
66724
66725
66726          if test "x$CCACHE" = x; then
66727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66728          fi
66729        else
66730          # Otherwise we believe it is a complete path. Use it as it is.
66731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66732$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66734$as_echo_n "checking for CCACHE... " >&6; }
66735          if test ! -x "$tool_specified"; then
66736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66737$as_echo "not found" >&6; }
66738            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66739          fi
66740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66741$as_echo "$tool_specified" >&6; }
66742        fi
66743      fi
66744    fi
66745
66746  fi
66747
66748
66749
66750  if test "x$CCACHE" = x; then
66751    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66752  fi
66753
66754
66755      PATH="$OLD_PATH"
66756      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66757      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66758    else
66759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66760$as_echo "no" >&6; }
66761      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66762$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66763    fi
66764  elif test "x$enable_ccache" = xno; then
66765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66766$as_echo "no, explicitly disabled" >&6; }
66767    CCACHE_STATUS="Disabled"
66768  elif test "x$enable_ccache" = x; then
66769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66770$as_echo "no" >&6; }
66771  else
66772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66773$as_echo "unknown" >&6; }
66774    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66775  fi
66776
66777
66778
66779# Check whether --with-ccache-dir was given.
66780if test "${with_ccache_dir+set}" = set; then :
66781  withval=$with_ccache_dir;
66782fi
66783
66784
66785  if test "x$with_ccache_dir" != x; then
66786    # When using a non home ccache directory, assume the use is to share ccache files
66787    # with other users. Thus change the umask.
66788    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66789    if test "x$CCACHE" = x; then
66790      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66791$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66792    fi
66793  fi
66794
66795  if test "x$CCACHE" != x; then
66796
66797  if test "x$CCACHE" != x; then
66798    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66799      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66800          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66801      if test "x$HAS_BAD_CCACHE" != "x"; then
66802        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66803      fi
66804    fi
66805    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66806      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66807          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66808      if test "x$HAS_BAD_CCACHE" != "x"; then
66809        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66810      fi
66811      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66812$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66813      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66814      PUSHED_FLAGS="$CXXFLAGS"
66815      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66816      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66817/* end confdefs.h.  */
66818
66819int
66820main ()
66821{
66822
66823  ;
66824  return 0;
66825}
66826_ACEOF
66827if ac_fn_cxx_try_compile "$LINENO"; then :
66828  CC_KNOWS_CCACHE_TRICK=yes
66829else
66830  CC_KNOWS_CCACHE_TRICK=no
66831fi
66832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66833      CXXFLAGS="$PUSHED_FLAGS"
66834      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66836$as_echo "yes" >&6; }
66837        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66838
66839        CCACHE_SLOPPINESS=pch_defines,time_macros
66840      else
66841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66842$as_echo "no" >&6; }
66843        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66844      fi
66845    fi
66846
66847    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66848        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66849
66850    if test "x$SET_CCACHE_DIR" != x; then
66851      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66852      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66853    fi
66854  fi
66855
66856  fi
66857
66858
66859###############################################################################
66860#
66861# And now the finish...
66862#
66863###############################################################################
66864
66865# Check for some common pitfalls
66866
66867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66868    file_to_test="$SRC_ROOT/LICENSE"
66869    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66870      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
66871    fi
66872  fi
66873
66874
66875  # Did user specify any unknown variables?
66876
66877  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66878    # Replace the separating ! with spaces before presenting for end user.
66879    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66880    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66881$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66882  fi
66883
66884
66885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66886$as_echo_n "checking if build directory is on local disk... " >&6; }
66887
66888  # df -l lists only local disks; if the given directory is not found then
66889  # a non-zero exit code is given
66890  if test "x$DF" = x; then
66891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66892      # msys does not have df; use Windows "net use" instead.
66893      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66894      if test "x$IS_NETWORK_DISK" = x; then
66895        OUTPUT_DIR_IS_LOCAL="yes"
66896      else
66897        OUTPUT_DIR_IS_LOCAL="no"
66898      fi
66899    else
66900      # No df here, say it's local
66901      OUTPUT_DIR_IS_LOCAL="yes"
66902    fi
66903  else
66904    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66905      OUTPUT_DIR_IS_LOCAL="yes"
66906    else
66907      OUTPUT_DIR_IS_LOCAL="no"
66908    fi
66909  fi
66910
66911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66912$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66913
66914
66915
66916  # Check if the user has any old-style ALT_ variables set.
66917  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66918
66919  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66920  # Since we can't properly handle the dependencies for this, warn the user about the situation
66921  if test -e $OUTPUT_ROOT/spec.gmk; then
66922    IS_RECONFIGURE=yes
66923  else
66924    IS_RECONFIGURE=no
66925  fi
66926
66927
66928# At the end, call the custom hook. (Dummy macro if no custom sources available)
66929
66930
66931# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66932
66933  # Keep feature lists sorted and free of duplicates
66934  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66935  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66936  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66937  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66938  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66939  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66940  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66941
66942  # Validate features
66943  for variant in $JVM_VARIANTS; do
66944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66945$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66946    features_var_name=JVM_FEATURES_$variant
66947    JVM_FEATURES_TO_TEST=${!features_var_name}
66948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66949$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66950    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66951    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66952    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66953    if test "x$INVALID_FEATURES" != x; then
66954      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66955    fi
66956  done
66957
66958
66959# We're messing a bit with internal autoconf variables to put the config.status
66960# in the output directory instead of the current directory.
66961CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66962
66963# Create the actual output files. Now the main work of configure is done.
66964cat >confcache <<\_ACEOF
66965# This file is a shell script that caches the results of configure
66966# tests run on this system so they can be shared between configure
66967# scripts and configure runs, see configure's option --config-cache.
66968# It is not useful on other systems.  If it contains results you don't
66969# want to keep, you may remove or edit it.
66970#
66971# config.status only pays attention to the cache file if you give it
66972# the --recheck option to rerun configure.
66973#
66974# `ac_cv_env_foo' variables (set or unset) will be overridden when
66975# loading this file, other *unset* `ac_cv_foo' will be assigned the
66976# following values.
66977
66978_ACEOF
66979
66980# The following way of writing the cache mishandles newlines in values,
66981# but we know of no workaround that is simple, portable, and efficient.
66982# So, we kill variables containing newlines.
66983# Ultrix sh set writes to stderr and can't be redirected directly,
66984# and sets the high bit in the cache file unless we assign to the vars.
66985(
66986  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66987    eval ac_val=\$$ac_var
66988    case $ac_val in #(
66989    *${as_nl}*)
66990      case $ac_var in #(
66991      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66992$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66993      esac
66994      case $ac_var in #(
66995      _ | IFS | as_nl) ;; #(
66996      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66997      *) { eval $ac_var=; unset $ac_var;} ;;
66998      esac ;;
66999    esac
67000  done
67001
67002  (set) 2>&1 |
67003    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67004    *${as_nl}ac_space=\ *)
67005      # `set' does not quote correctly, so add quotes: double-quote
67006      # substitution turns \\\\ into \\, and sed turns \\ into \.
67007      sed -n \
67008	"s/'/'\\\\''/g;
67009	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67010      ;; #(
67011    *)
67012      # `set' quotes correctly as required by POSIX, so do not add quotes.
67013      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67014      ;;
67015    esac |
67016    sort
67017) |
67018  sed '
67019     /^ac_cv_env_/b end
67020     t clear
67021     :clear
67022     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67023     t end
67024     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67025     :end' >>confcache
67026if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67027  if test -w "$cache_file"; then
67028    if test "x$cache_file" != "x/dev/null"; then
67029      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67030$as_echo "$as_me: updating cache $cache_file" >&6;}
67031      if test ! -f "$cache_file" || test -h "$cache_file"; then
67032	cat confcache >"$cache_file"
67033      else
67034        case $cache_file in #(
67035        */* | ?:*)
67036	  mv -f confcache "$cache_file"$$ &&
67037	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67038        *)
67039	  mv -f confcache "$cache_file" ;;
67040	esac
67041      fi
67042    fi
67043  else
67044    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67045$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67046  fi
67047fi
67048rm -f confcache
67049
67050test "x$prefix" = xNONE && prefix=$ac_default_prefix
67051# Let make expand exec_prefix.
67052test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67053
67054# Transform confdefs.h into DEFS.
67055# Protect against shell expansion while executing Makefile rules.
67056# Protect against Makefile macro expansion.
67057#
67058# If the first sed substitution is executed (which looks for macros that
67059# take arguments), then branch to the quote section.  Otherwise,
67060# look for a macro that doesn't take arguments.
67061ac_script='
67062:mline
67063/\\$/{
67064 N
67065 s,\\\n,,
67066 b mline
67067}
67068t clear
67069:clear
67070s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67071t quote
67072s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67073t quote
67074b any
67075:quote
67076s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67077s/\[/\\&/g
67078s/\]/\\&/g
67079s/\$/$$/g
67080H
67081:any
67082${
67083	g
67084	s/^\n//
67085	s/\n/ /g
67086	p
67087}
67088'
67089DEFS=`sed -n "$ac_script" confdefs.h`
67090
67091
67092ac_libobjs=
67093ac_ltlibobjs=
67094U=
67095for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67096  # 1. Remove the extension, and $U if already installed.
67097  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67098  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67099  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67100  #    will be set to the directory where LIBOBJS objects are built.
67101  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67102  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67103done
67104LIBOBJS=$ac_libobjs
67105
67106LTLIBOBJS=$ac_ltlibobjs
67107
67108
67109
67110: "${CONFIG_STATUS=./config.status}"
67111ac_write_fail=0
67112ac_clean_files_save=$ac_clean_files
67113ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67114{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67115$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67116as_write_fail=0
67117cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67118#! $SHELL
67119# Generated by $as_me.
67120# Run this file to recreate the current configuration.
67121# Compiler output produced by configure, useful for debugging
67122# configure, is in config.log if it exists.
67123
67124debug=false
67125ac_cs_recheck=false
67126ac_cs_silent=false
67127
67128SHELL=\${CONFIG_SHELL-$SHELL}
67129export SHELL
67130_ASEOF
67131cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67132## -------------------- ##
67133## M4sh Initialization. ##
67134## -------------------- ##
67135
67136# Be more Bourne compatible
67137DUALCASE=1; export DUALCASE # for MKS sh
67138if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67139  emulate sh
67140  NULLCMD=:
67141  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67142  # is contrary to our usage.  Disable this feature.
67143  alias -g '${1+"$@"}'='"$@"'
67144  setopt NO_GLOB_SUBST
67145else
67146  case `(set -o) 2>/dev/null` in #(
67147  *posix*) :
67148    set -o posix ;; #(
67149  *) :
67150     ;;
67151esac
67152fi
67153
67154
67155as_nl='
67156'
67157export as_nl
67158# Printing a long string crashes Solaris 7 /usr/bin/printf.
67159as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67160as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67161as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67162# Prefer a ksh shell builtin over an external printf program on Solaris,
67163# but without wasting forks for bash or zsh.
67164if test -z "$BASH_VERSION$ZSH_VERSION" \
67165    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67166  as_echo='print -r --'
67167  as_echo_n='print -rn --'
67168elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67169  as_echo='printf %s\n'
67170  as_echo_n='printf %s'
67171else
67172  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67173    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67174    as_echo_n='/usr/ucb/echo -n'
67175  else
67176    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67177    as_echo_n_body='eval
67178      arg=$1;
67179      case $arg in #(
67180      *"$as_nl"*)
67181	expr "X$arg" : "X\\(.*\\)$as_nl";
67182	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67183      esac;
67184      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67185    '
67186    export as_echo_n_body
67187    as_echo_n='sh -c $as_echo_n_body as_echo'
67188  fi
67189  export as_echo_body
67190  as_echo='sh -c $as_echo_body as_echo'
67191fi
67192
67193# The user is always right.
67194if test "${PATH_SEPARATOR+set}" != set; then
67195  PATH_SEPARATOR=:
67196  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67197    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67198      PATH_SEPARATOR=';'
67199  }
67200fi
67201
67202
67203# IFS
67204# We need space, tab and new line, in precisely that order.  Quoting is
67205# there to prevent editors from complaining about space-tab.
67206# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67207# splitting by setting IFS to empty value.)
67208IFS=" ""	$as_nl"
67209
67210# Find who we are.  Look in the path if we contain no directory separator.
67211as_myself=
67212case $0 in #((
67213  *[\\/]* ) as_myself=$0 ;;
67214  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67215for as_dir in $PATH
67216do
67217  IFS=$as_save_IFS
67218  test -z "$as_dir" && as_dir=.
67219    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67220  done
67221IFS=$as_save_IFS
67222
67223     ;;
67224esac
67225# We did not find ourselves, most probably we were run as `sh COMMAND'
67226# in which case we are not to be found in the path.
67227if test "x$as_myself" = x; then
67228  as_myself=$0
67229fi
67230if test ! -f "$as_myself"; then
67231  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67232  exit 1
67233fi
67234
67235# Unset variables that we do not need and which cause bugs (e.g. in
67236# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67237# suppresses any "Segmentation fault" message there.  '((' could
67238# trigger a bug in pdksh 5.2.14.
67239for as_var in BASH_ENV ENV MAIL MAILPATH
67240do eval test x\${$as_var+set} = xset \
67241  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67242done
67243PS1='$ '
67244PS2='> '
67245PS4='+ '
67246
67247# NLS nuisances.
67248LC_ALL=C
67249export LC_ALL
67250LANGUAGE=C
67251export LANGUAGE
67252
67253# CDPATH.
67254(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67255
67256
67257# as_fn_error STATUS ERROR [LINENO LOG_FD]
67258# ----------------------------------------
67259# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67260# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67261# script with STATUS, using 1 if that was 0.
67262as_fn_error ()
67263{
67264  as_status=$1; test $as_status -eq 0 && as_status=1
67265  if test "$4"; then
67266    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67267    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67268  fi
67269  $as_echo "$as_me: error: $2" >&2
67270  as_fn_exit $as_status
67271} # as_fn_error
67272
67273
67274# as_fn_set_status STATUS
67275# -----------------------
67276# Set $? to STATUS, without forking.
67277as_fn_set_status ()
67278{
67279  return $1
67280} # as_fn_set_status
67281
67282# as_fn_exit STATUS
67283# -----------------
67284# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67285as_fn_exit ()
67286{
67287  set +e
67288  as_fn_set_status $1
67289  exit $1
67290} # as_fn_exit
67291
67292# as_fn_unset VAR
67293# ---------------
67294# Portably unset VAR.
67295as_fn_unset ()
67296{
67297  { eval $1=; unset $1;}
67298}
67299as_unset=as_fn_unset
67300# as_fn_append VAR VALUE
67301# ----------------------
67302# Append the text in VALUE to the end of the definition contained in VAR. Take
67303# advantage of any shell optimizations that allow amortized linear growth over
67304# repeated appends, instead of the typical quadratic growth present in naive
67305# implementations.
67306if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67307  eval 'as_fn_append ()
67308  {
67309    eval $1+=\$2
67310  }'
67311else
67312  as_fn_append ()
67313  {
67314    eval $1=\$$1\$2
67315  }
67316fi # as_fn_append
67317
67318# as_fn_arith ARG...
67319# ------------------
67320# Perform arithmetic evaluation on the ARGs, and store the result in the
67321# global $as_val. Take advantage of shells that can avoid forks. The arguments
67322# must be portable across $(()) and expr.
67323if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67324  eval 'as_fn_arith ()
67325  {
67326    as_val=$(( $* ))
67327  }'
67328else
67329  as_fn_arith ()
67330  {
67331    as_val=`expr "$@" || test $? -eq 1`
67332  }
67333fi # as_fn_arith
67334
67335
67336if expr a : '\(a\)' >/dev/null 2>&1 &&
67337   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67338  as_expr=expr
67339else
67340  as_expr=false
67341fi
67342
67343if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67344  as_basename=basename
67345else
67346  as_basename=false
67347fi
67348
67349if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67350  as_dirname=dirname
67351else
67352  as_dirname=false
67353fi
67354
67355as_me=`$as_basename -- "$0" ||
67356$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67357	 X"$0" : 'X\(//\)$' \| \
67358	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67359$as_echo X/"$0" |
67360    sed '/^.*\/\([^/][^/]*\)\/*$/{
67361	    s//\1/
67362	    q
67363	  }
67364	  /^X\/\(\/\/\)$/{
67365	    s//\1/
67366	    q
67367	  }
67368	  /^X\/\(\/\).*/{
67369	    s//\1/
67370	    q
67371	  }
67372	  s/.*/./; q'`
67373
67374# Avoid depending upon Character Ranges.
67375as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67376as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67377as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67378as_cr_digits='0123456789'
67379as_cr_alnum=$as_cr_Letters$as_cr_digits
67380
67381ECHO_C= ECHO_N= ECHO_T=
67382case `echo -n x` in #(((((
67383-n*)
67384  case `echo 'xy\c'` in
67385  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67386  xy)  ECHO_C='\c';;
67387  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67388       ECHO_T='	';;
67389  esac;;
67390*)
67391  ECHO_N='-n';;
67392esac
67393
67394rm -f conf$$ conf$$.exe conf$$.file
67395if test -d conf$$.dir; then
67396  rm -f conf$$.dir/conf$$.file
67397else
67398  rm -f conf$$.dir
67399  mkdir conf$$.dir 2>/dev/null
67400fi
67401if (echo >conf$$.file) 2>/dev/null; then
67402  if ln -s conf$$.file conf$$ 2>/dev/null; then
67403    as_ln_s='ln -s'
67404    # ... but there are two gotchas:
67405    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67406    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67407    # In both cases, we have to default to `cp -pR'.
67408    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67409      as_ln_s='cp -pR'
67410  elif ln conf$$.file conf$$ 2>/dev/null; then
67411    as_ln_s=ln
67412  else
67413    as_ln_s='cp -pR'
67414  fi
67415else
67416  as_ln_s='cp -pR'
67417fi
67418rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67419rmdir conf$$.dir 2>/dev/null
67420
67421
67422# as_fn_mkdir_p
67423# -------------
67424# Create "$as_dir" as a directory, including parents if necessary.
67425as_fn_mkdir_p ()
67426{
67427
67428  case $as_dir in #(
67429  -*) as_dir=./$as_dir;;
67430  esac
67431  test -d "$as_dir" || eval $as_mkdir_p || {
67432    as_dirs=
67433    while :; do
67434      case $as_dir in #(
67435      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67436      *) as_qdir=$as_dir;;
67437      esac
67438      as_dirs="'$as_qdir' $as_dirs"
67439      as_dir=`$as_dirname -- "$as_dir" ||
67440$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67441	 X"$as_dir" : 'X\(//\)[^/]' \| \
67442	 X"$as_dir" : 'X\(//\)$' \| \
67443	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67444$as_echo X"$as_dir" |
67445    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67446	    s//\1/
67447	    q
67448	  }
67449	  /^X\(\/\/\)[^/].*/{
67450	    s//\1/
67451	    q
67452	  }
67453	  /^X\(\/\/\)$/{
67454	    s//\1/
67455	    q
67456	  }
67457	  /^X\(\/\).*/{
67458	    s//\1/
67459	    q
67460	  }
67461	  s/.*/./; q'`
67462      test -d "$as_dir" && break
67463    done
67464    test -z "$as_dirs" || eval "mkdir $as_dirs"
67465  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67466
67467
67468} # as_fn_mkdir_p
67469if mkdir -p . 2>/dev/null; then
67470  as_mkdir_p='mkdir -p "$as_dir"'
67471else
67472  test -d ./-p && rmdir ./-p
67473  as_mkdir_p=false
67474fi
67475
67476
67477# as_fn_executable_p FILE
67478# -----------------------
67479# Test if FILE is an executable regular file.
67480as_fn_executable_p ()
67481{
67482  test -f "$1" && test -x "$1"
67483} # as_fn_executable_p
67484as_test_x='test -x'
67485as_executable_p=as_fn_executable_p
67486
67487# Sed expression to map a string onto a valid CPP name.
67488as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67489
67490# Sed expression to map a string onto a valid variable name.
67491as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67492
67493
67494exec 6>&1
67495## ----------------------------------- ##
67496## Main body of $CONFIG_STATUS script. ##
67497## ----------------------------------- ##
67498_ASEOF
67499test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67500
67501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67502# Save the log message, to keep $0 and so on meaningful, and to
67503# report actual input values of CONFIG_FILES etc. instead of their
67504# values after options handling.
67505ac_log="
67506This file was extended by OpenJDK $as_me jdk9, which was
67507generated by GNU Autoconf 2.69.  Invocation command line was
67508
67509  CONFIG_FILES    = $CONFIG_FILES
67510  CONFIG_HEADERS  = $CONFIG_HEADERS
67511  CONFIG_LINKS    = $CONFIG_LINKS
67512  CONFIG_COMMANDS = $CONFIG_COMMANDS
67513  $ $0 $@
67514
67515on `(hostname || uname -n) 2>/dev/null | sed 1q`
67516"
67517
67518_ACEOF
67519
67520case $ac_config_files in *"
67521"*) set x $ac_config_files; shift; ac_config_files=$*;;
67522esac
67523
67524
67525
67526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67527# Files that config.status was made for.
67528config_files="$ac_config_files"
67529
67530_ACEOF
67531
67532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67533ac_cs_usage="\
67534\`$as_me' instantiates files and other configuration actions
67535from templates according to the current configuration.  Unless the files
67536and actions are specified as TAGs, all are instantiated by default.
67537
67538Usage: $0 [OPTION]... [TAG]...
67539
67540  -h, --help       print this help, then exit
67541  -V, --version    print version number and configuration settings, then exit
67542      --config     print configuration, then exit
67543  -q, --quiet, --silent
67544                   do not print progress messages
67545  -d, --debug      don't remove temporary files
67546      --recheck    update $as_me by reconfiguring in the same conditions
67547      --file=FILE[:TEMPLATE]
67548                   instantiate the configuration file FILE
67549
67550Configuration files:
67551$config_files
67552
67553Report bugs to <build-dev@openjdk.java.net>.
67554OpenJDK home page: <http://openjdk.java.net>."
67555
67556_ACEOF
67557cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67558ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67559ac_cs_version="\\
67560OpenJDK config.status jdk9
67561configured by $0, generated by GNU Autoconf 2.69,
67562  with options \\"\$ac_cs_config\\"
67563
67564Copyright (C) 2012 Free Software Foundation, Inc.
67565This config.status script is free software; the Free Software Foundation
67566gives unlimited permission to copy, distribute and modify it."
67567
67568ac_pwd='$ac_pwd'
67569srcdir='$srcdir'
67570AWK='$AWK'
67571test -n "\$AWK" || AWK=awk
67572_ACEOF
67573
67574cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67575# The default lists apply if the user does not specify any file.
67576ac_need_defaults=:
67577while test $# != 0
67578do
67579  case $1 in
67580  --*=?*)
67581    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67582    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67583    ac_shift=:
67584    ;;
67585  --*=)
67586    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67587    ac_optarg=
67588    ac_shift=:
67589    ;;
67590  *)
67591    ac_option=$1
67592    ac_optarg=$2
67593    ac_shift=shift
67594    ;;
67595  esac
67596
67597  case $ac_option in
67598  # Handling of the options.
67599  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67600    ac_cs_recheck=: ;;
67601  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67602    $as_echo "$ac_cs_version"; exit ;;
67603  --config | --confi | --conf | --con | --co | --c )
67604    $as_echo "$ac_cs_config"; exit ;;
67605  --debug | --debu | --deb | --de | --d | -d )
67606    debug=: ;;
67607  --file | --fil | --fi | --f )
67608    $ac_shift
67609    case $ac_optarg in
67610    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67611    '') as_fn_error $? "missing file argument" ;;
67612    esac
67613    as_fn_append CONFIG_FILES " '$ac_optarg'"
67614    ac_need_defaults=false;;
67615  --he | --h |  --help | --hel | -h )
67616    $as_echo "$ac_cs_usage"; exit ;;
67617  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67618  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67619    ac_cs_silent=: ;;
67620
67621  # This is an error.
67622  -*) as_fn_error $? "unrecognized option: \`$1'
67623Try \`$0 --help' for more information." ;;
67624
67625  *) as_fn_append ac_config_targets " $1"
67626     ac_need_defaults=false ;;
67627
67628  esac
67629  shift
67630done
67631
67632ac_configure_extra_args=
67633
67634if $ac_cs_silent; then
67635  exec 6>/dev/null
67636  ac_configure_extra_args="$ac_configure_extra_args --silent"
67637fi
67638
67639_ACEOF
67640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67641if \$ac_cs_recheck; then
67642  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67643  shift
67644  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67645  CONFIG_SHELL='$SHELL'
67646  export CONFIG_SHELL
67647  exec "\$@"
67648fi
67649
67650_ACEOF
67651cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67652exec 5>>config.log
67653{
67654  echo
67655  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67656## Running $as_me. ##
67657_ASBOX
67658  $as_echo "$ac_log"
67659} >&5
67660
67661_ACEOF
67662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67663_ACEOF
67664
67665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67666
67667# Handling of arguments.
67668for ac_config_target in $ac_config_targets
67669do
67670  case $ac_config_target in
67671    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67672    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67673    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67674    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67675    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67676
67677  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67678  esac
67679done
67680
67681
67682# If the user did not use the arguments to specify the items to instantiate,
67683# then the envvar interface is used.  Set only those that are not.
67684# We use the long form for the default assignment because of an extremely
67685# bizarre bug on SunOS 4.1.3.
67686if $ac_need_defaults; then
67687  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67688fi
67689
67690# Have a temporary directory for convenience.  Make it in the build tree
67691# simply because there is no reason against having it here, and in addition,
67692# creating and moving files from /tmp can sometimes cause problems.
67693# Hook for its removal unless debugging.
67694# Note that there is a small window in which the directory will not be cleaned:
67695# after its creation but before its name has been assigned to `$tmp'.
67696$debug ||
67697{
67698  tmp= ac_tmp=
67699  trap 'exit_status=$?
67700  : "${ac_tmp:=$tmp}"
67701  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67702' 0
67703  trap 'as_fn_exit 1' 1 2 13 15
67704}
67705# Create a (secure) tmp directory for tmp files.
67706
67707{
67708  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67709  test -d "$tmp"
67710}  ||
67711{
67712  tmp=./conf$$-$RANDOM
67713  (umask 077 && mkdir "$tmp")
67714} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67715ac_tmp=$tmp
67716
67717# Set up the scripts for CONFIG_FILES section.
67718# No need to generate them if there are no CONFIG_FILES.
67719# This happens for instance with `./config.status config.h'.
67720if test -n "$CONFIG_FILES"; then
67721
67722
67723ac_cr=`echo X | tr X '\015'`
67724# On cygwin, bash can eat \r inside `` if the user requested igncr.
67725# But we know of no other shell where ac_cr would be empty at this
67726# point, so we can use a bashism as a fallback.
67727if test "x$ac_cr" = x; then
67728  eval ac_cr=\$\'\\r\'
67729fi
67730ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67731if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67732  ac_cs_awk_cr='\\r'
67733else
67734  ac_cs_awk_cr=$ac_cr
67735fi
67736
67737echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67738_ACEOF
67739
67740
67741{
67742  echo "cat >conf$$subs.awk <<_ACEOF" &&
67743  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67744  echo "_ACEOF"
67745} >conf$$subs.sh ||
67746  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67747ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67748ac_delim='%!_!# '
67749for ac_last_try in false false false false false :; do
67750  . ./conf$$subs.sh ||
67751    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67752
67753  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67754  if test $ac_delim_n = $ac_delim_num; then
67755    break
67756  elif $ac_last_try; then
67757    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67758  else
67759    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67760  fi
67761done
67762rm -f conf$$subs.sh
67763
67764cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67765cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67766_ACEOF
67767sed -n '
67768h
67769s/^/S["/; s/!.*/"]=/
67770p
67771g
67772s/^[^!]*!//
67773:repl
67774t repl
67775s/'"$ac_delim"'$//
67776t delim
67777:nl
67778h
67779s/\(.\{148\}\)..*/\1/
67780t more1
67781s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67782p
67783n
67784b repl
67785:more1
67786s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67787p
67788g
67789s/.\{148\}//
67790t nl
67791:delim
67792h
67793s/\(.\{148\}\)..*/\1/
67794t more2
67795s/["\\]/\\&/g; s/^/"/; s/$/"/
67796p
67797b
67798:more2
67799s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67800p
67801g
67802s/.\{148\}//
67803t delim
67804' <conf$$subs.awk | sed '
67805/^[^""]/{
67806  N
67807  s/\n//
67808}
67809' >>$CONFIG_STATUS || ac_write_fail=1
67810rm -f conf$$subs.awk
67811cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67812_ACAWK
67813cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67814  for (key in S) S_is_set[key] = 1
67815  FS = ""
67816
67817}
67818{
67819  line = $ 0
67820  nfields = split(line, field, "@")
67821  substed = 0
67822  len = length(field[1])
67823  for (i = 2; i < nfields; i++) {
67824    key = field[i]
67825    keylen = length(key)
67826    if (S_is_set[key]) {
67827      value = S[key]
67828      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67829      len += length(value) + length(field[++i])
67830      substed = 1
67831    } else
67832      len += 1 + keylen
67833  }
67834
67835  print line
67836}
67837
67838_ACAWK
67839_ACEOF
67840cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67841if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67842  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67843else
67844  cat
67845fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67846  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67847_ACEOF
67848
67849# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67850# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67851# trailing colons and then remove the whole line if VPATH becomes empty
67852# (actually we leave an empty line to preserve line numbers).
67853if test "x$srcdir" = x.; then
67854  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67855h
67856s///
67857s/^/:/
67858s/[	 ]*$/:/
67859s/:\$(srcdir):/:/g
67860s/:\${srcdir}:/:/g
67861s/:@srcdir@:/:/g
67862s/^:*//
67863s/:*$//
67864x
67865s/\(=[	 ]*\).*/\1/
67866G
67867s/\n//
67868s/^[^=]*=[	 ]*$//
67869}'
67870fi
67871
67872cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67873fi # test -n "$CONFIG_FILES"
67874
67875
67876eval set X "  :F $CONFIG_FILES      "
67877shift
67878for ac_tag
67879do
67880  case $ac_tag in
67881  :[FHLC]) ac_mode=$ac_tag; continue;;
67882  esac
67883  case $ac_mode$ac_tag in
67884  :[FHL]*:*);;
67885  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67886  :[FH]-) ac_tag=-:-;;
67887  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67888  esac
67889  ac_save_IFS=$IFS
67890  IFS=:
67891  set x $ac_tag
67892  IFS=$ac_save_IFS
67893  shift
67894  ac_file=$1
67895  shift
67896
67897  case $ac_mode in
67898  :L) ac_source=$1;;
67899  :[FH])
67900    ac_file_inputs=
67901    for ac_f
67902    do
67903      case $ac_f in
67904      -) ac_f="$ac_tmp/stdin";;
67905      *) # Look for the file first in the build tree, then in the source tree
67906	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67907	 # because $ac_f cannot contain `:'.
67908	 test -f "$ac_f" ||
67909	   case $ac_f in
67910	   [\\/$]*) false;;
67911	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67912	   esac ||
67913	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67914      esac
67915      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67916      as_fn_append ac_file_inputs " '$ac_f'"
67917    done
67918
67919    # Let's still pretend it is `configure' which instantiates (i.e., don't
67920    # use $as_me), people would be surprised to read:
67921    #    /* config.h.  Generated by config.status.  */
67922    configure_input='Generated from '`
67923	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67924	`' by configure.'
67925    if test x"$ac_file" != x-; then
67926      configure_input="$ac_file.  $configure_input"
67927      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67928$as_echo "$as_me: creating $ac_file" >&6;}
67929    fi
67930    # Neutralize special characters interpreted by sed in replacement strings.
67931    case $configure_input in #(
67932    *\&* | *\|* | *\\* )
67933       ac_sed_conf_input=`$as_echo "$configure_input" |
67934       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67935    *) ac_sed_conf_input=$configure_input;;
67936    esac
67937
67938    case $ac_tag in
67939    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67940      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67941    esac
67942    ;;
67943  esac
67944
67945  ac_dir=`$as_dirname -- "$ac_file" ||
67946$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67947	 X"$ac_file" : 'X\(//\)[^/]' \| \
67948	 X"$ac_file" : 'X\(//\)$' \| \
67949	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67950$as_echo X"$ac_file" |
67951    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67952	    s//\1/
67953	    q
67954	  }
67955	  /^X\(\/\/\)[^/].*/{
67956	    s//\1/
67957	    q
67958	  }
67959	  /^X\(\/\/\)$/{
67960	    s//\1/
67961	    q
67962	  }
67963	  /^X\(\/\).*/{
67964	    s//\1/
67965	    q
67966	  }
67967	  s/.*/./; q'`
67968  as_dir="$ac_dir"; as_fn_mkdir_p
67969  ac_builddir=.
67970
67971case "$ac_dir" in
67972.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67973*)
67974  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67975  # A ".." for each directory in $ac_dir_suffix.
67976  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67977  case $ac_top_builddir_sub in
67978  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67979  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67980  esac ;;
67981esac
67982ac_abs_top_builddir=$ac_pwd
67983ac_abs_builddir=$ac_pwd$ac_dir_suffix
67984# for backward compatibility:
67985ac_top_builddir=$ac_top_build_prefix
67986
67987case $srcdir in
67988  .)  # We are building in place.
67989    ac_srcdir=.
67990    ac_top_srcdir=$ac_top_builddir_sub
67991    ac_abs_top_srcdir=$ac_pwd ;;
67992  [\\/]* | ?:[\\/]* )  # Absolute name.
67993    ac_srcdir=$srcdir$ac_dir_suffix;
67994    ac_top_srcdir=$srcdir
67995    ac_abs_top_srcdir=$srcdir ;;
67996  *) # Relative name.
67997    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67998    ac_top_srcdir=$ac_top_build_prefix$srcdir
67999    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68000esac
68001ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68002
68003
68004  case $ac_mode in
68005  :F)
68006  #
68007  # CONFIG_FILE
68008  #
68009
68010_ACEOF
68011
68012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68013# If the template does not know about datarootdir, expand it.
68014# FIXME: This hack should be removed a few years after 2.60.
68015ac_datarootdir_hack=; ac_datarootdir_seen=
68016ac_sed_dataroot='
68017/datarootdir/ {
68018  p
68019  q
68020}
68021/@datadir@/p
68022/@docdir@/p
68023/@infodir@/p
68024/@localedir@/p
68025/@mandir@/p'
68026case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68027*datarootdir*) ac_datarootdir_seen=yes;;
68028*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68029  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68030$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68031_ACEOF
68032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68033  ac_datarootdir_hack='
68034  s&@datadir@&$datadir&g
68035  s&@docdir@&$docdir&g
68036  s&@infodir@&$infodir&g
68037  s&@localedir@&$localedir&g
68038  s&@mandir@&$mandir&g
68039  s&\\\${datarootdir}&$datarootdir&g' ;;
68040esac
68041_ACEOF
68042
68043# Neutralize VPATH when `$srcdir' = `.'.
68044# Shell code in configure.ac might set extrasub.
68045# FIXME: do we really want to maintain this feature?
68046cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68047ac_sed_extra="$ac_vpsub
68048$extrasub
68049_ACEOF
68050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68051:t
68052/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68053s|@configure_input@|$ac_sed_conf_input|;t t
68054s&@top_builddir@&$ac_top_builddir_sub&;t t
68055s&@top_build_prefix@&$ac_top_build_prefix&;t t
68056s&@srcdir@&$ac_srcdir&;t t
68057s&@abs_srcdir@&$ac_abs_srcdir&;t t
68058s&@top_srcdir@&$ac_top_srcdir&;t t
68059s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68060s&@builddir@&$ac_builddir&;t t
68061s&@abs_builddir@&$ac_abs_builddir&;t t
68062s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68063$ac_datarootdir_hack
68064"
68065eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68066  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68067
68068test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68069  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68070  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68071      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68072  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68073which seems to be undefined.  Please make sure it is defined" >&5
68074$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68075which seems to be undefined.  Please make sure it is defined" >&2;}
68076
68077  rm -f "$ac_tmp/stdin"
68078  case $ac_file in
68079  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68080  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68081  esac \
68082  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68083 ;;
68084
68085
68086
68087  esac
68088
68089done # for ac_tag
68090
68091
68092as_fn_exit 0
68093_ACEOF
68094ac_clean_files=$ac_clean_files_save
68095
68096test $ac_write_fail = 0 ||
68097  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68098
68099
68100# configure is writing to config.log, and then calls config.status.
68101# config.status does its own redirection, appending to config.log.
68102# Unfortunately, on DOS this fails, as config.log is still kept open
68103# by configure, so config.status won't be able to write to it; its
68104# output is simply discarded.  So we exec the FD to /dev/null,
68105# effectively closing config.log, so it can be properly (re)opened and
68106# appended to by config.status.  When coming back to configure, we
68107# need to make the FD available again.
68108if test "$no_create" != yes; then
68109  ac_cs_success=:
68110  ac_config_status_args=
68111  test "$silent" = yes &&
68112    ac_config_status_args="$ac_config_status_args --quiet"
68113  exec 5>/dev/null
68114  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68115  exec 5>>config.log
68116  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68117  # would make configure fail if this is the last instruction.
68118  $ac_cs_success || as_fn_exit 1
68119fi
68120if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68121  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68122$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68123fi
68124
68125
68126# After AC_OUTPUT, we need to do final work
68127
68128
68129  # Try to move config.log (generated by autoconf) to the configure-support directory.
68130  if test -e ./config.log; then
68131    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68132  fi
68133
68134  # Rotate our log file (configure.log)
68135  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68136    $RM -f "$OUTPUT_ROOT/configure.log.old"
68137  fi
68138  if test -e "$OUTPUT_ROOT/configure.log"; then
68139    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68140  fi
68141
68142  # Move configure.log from current directory to the build output root
68143  if test -e ./configure.log; then
68144    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68145  fi
68146
68147  # Make the compare script executable
68148  $CHMOD +x $OUTPUT_ROOT/compare.sh
68149
68150
68151# Finally output some useful information to the user
68152
68153  # Finally output some useful information to the user
68154
68155  printf "\n"
68156  printf "====================================================\n"
68157  if test "x$no_create" != "xyes"; then
68158    if test "x$IS_RECONFIGURE" != "xyes"; then
68159      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68160    else
68161      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68162    fi
68163  else
68164    if test "x$IS_RECONFIGURE" != "xyes"; then
68165      printf "A configuration has been successfully checked but not created\n"
68166    else
68167      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68168    fi
68169  fi
68170  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68171    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68172  else
68173    printf "using default settings.\n"
68174  fi
68175
68176  printf "\n"
68177  printf "Configuration summary:\n"
68178  printf "* Debug level:    $DEBUG_LEVEL\n"
68179  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68180  printf "* JDK variant:    $JDK_VARIANT\n"
68181  printf "* JVM variants:   $JVM_VARIANTS\n"
68182  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68183  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68184
68185  printf "\n"
68186  printf "Tools summary:\n"
68187  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68188    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68189  fi
68190  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68191  if test "x$TOOLCHAIN_VERSION" != "x"; then
68192    print_version=" $TOOLCHAIN_VERSION"
68193  fi
68194  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68195  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68196  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68197
68198  printf "\n"
68199  printf "Build performance summary:\n"
68200  printf "* Cores to use:   $JOBS\n"
68201  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68202  if test "x$CCACHE_STATUS" != "x"; then
68203    printf "* ccache status:  $CCACHE_STATUS\n"
68204  fi
68205  printf "\n"
68206
68207  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68208    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68209    printf "will result in longer build times.\n"
68210    printf "\n"
68211  fi
68212
68213  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68214    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68215    printf "These are not respected, and will be ignored. It is recommended\n"
68216    printf "that you clean your environment. The following variables are set:\n"
68217    printf "$FOUND_ALT_VARIABLES\n"
68218    printf "\n"
68219  fi
68220
68221  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68222    printf "WARNING: Your build output directory is not on a local disk.\n"
68223    printf "This will severely degrade build performance!\n"
68224    printf "It is recommended that you create an output directory on a local disk,\n"
68225    printf "and run the configure script again from that directory.\n"
68226    printf "\n"
68227  fi
68228
68229  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68230    printf "WARNING: The result of this configuration has overridden an older\n"
68231    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68232    printf "proper build. Failure to do so might result in strange build problems.\n"
68233    printf "\n"
68234  fi
68235
68236  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68237    printf "WARNING: The result of this configuration was not saved.\n"
68238    printf "You should run without '--no-create | -n' to create the configuration.\n"
68239    printf "\n"
68240  fi
68241
68242
68243
68244  # Locate config.log.
68245  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68246    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68247  elif test -e "./config.log"; then
68248    CONFIG_LOG_PATH="."
68249  fi
68250
68251  if test -e "$CONFIG_LOG_PATH/config.log"; then
68252    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68253    if test $? -eq 0; then
68254      printf "The following warnings were produced. Repeated here for convenience:\n"
68255      # We must quote sed expression (using []) to stop m4 from eating the [].
68256      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68257      printf "\n"
68258    fi
68259  fi
68260
68261