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_LICENSE
692FREETYPE_BUNDLE_LIB_PATH
693FREETYPE_LIBS
694FREETYPE_CFLAGS
695CUPS_CFLAGS
696X_EXTRA_LIBS
697X_LIBS
698X_PRE_LIBS
699X_CFLAGS
700XMKMF
701MSVCP_DLL
702MSVCR_DLL
703LIBCXX
704FIXPATH_DETACH_FLAG
705FIXPATH
706BUILD_GTEST
707ENABLE_AOT
708GCOV_ENABLED
709ZIP_EXTERNAL_DEBUG_SYMBOLS
710COPY_DEBUG_SYMBOLS
711COMPILE_WITH_DEBUG_SYMBOLS
712CFLAGS_WARNINGS_ARE_ERRORS
713BUILD_CC_DISABLE_WARNING_PREFIX
714DISABLE_WARNING_PREFIX
715WARNINGS_AS_ERRORS
716COMPILER_SUPPORTS_TARGET_BITS_FLAG
717LDFLAGS_TESTEXE
718LDFLAGS_TESTLIB
719CXXFLAGS_TESTEXE
720CXXFLAGS_TESTLIB
721CFLAGS_TESTEXE
722CFLAGS_TESTLIB
723OPENJDK_BUILD_JVM_LIBS
724OPENJDK_BUILD_JVM_ASFLAGS
725OPENJDK_BUILD_JVM_LDFLAGS
726OPENJDK_BUILD_JVM_CFLAGS
727OPENJDK_BUILD_LDFLAGS_HASH_STYLE
728OPENJDK_BUILD_LDFLAGS_CXX_JDK
729OPENJDK_BUILD_JDKEXE_LIBS
730OPENJDK_BUILD_JDKLIB_LIBS
731OPENJDK_BUILD_LDFLAGS_JDKEXE
732OPENJDK_BUILD_LDFLAGS_JDKLIB
733OPENJDK_BUILD_CXXFLAGS_JDKEXE
734OPENJDK_BUILD_CXXFLAGS_JDKLIB
735OPENJDK_BUILD_CFLAGS_JDKEXE
736OPENJDK_BUILD_CFLAGS_JDKLIB
737OPENJDK_BUILD_CXXSTD_CXXFLAG
738JVM_LIBS
739JVM_ASFLAGS
740JVM_LDFLAGS
741JVM_CFLAGS
742LDFLAGS_HASH_STYLE
743LDFLAGS_CXX_JDK
744JDKEXE_LIBS
745JDKLIB_LIBS
746LDFLAGS_JDKEXE
747LDFLAGS_JDKLIB
748CXXFLAGS_JDKEXE
749CXXFLAGS_JDKLIB
750CFLAGS_JDKEXE
751CFLAGS_JDKLIB
752MACOSX_VERSION_MIN
753CXXSTD_CXXFLAG
754JDK_ARCH_ABI_PROP_NAME
755CXX_O_FLAG_SIZE
756CXX_O_FLAG_NONE
757CXX_O_FLAG_DEBUG
758CXX_O_FLAG_NORM
759CXX_O_FLAG_HI
760CXX_O_FLAG_HIGHEST
761CXX_O_FLAG_HIGHEST_JVM
762C_O_FLAG_SIZE
763C_O_FLAG_NONE
764C_O_FLAG_DEBUG
765C_O_FLAG_NORM
766C_O_FLAG_HI
767C_O_FLAG_HIGHEST
768C_O_FLAG_HIGHEST_JVM
769JVM_CFLAGS_SYMBOLS
770CXXFLAGS_DEBUG_SYMBOLS
771CFLAGS_DEBUG_SYMBOLS
772CXX_FLAG_DEPS
773C_FLAG_DEPS
774SHARED_LIBRARY_FLAGS
775SET_SHARED_LIBRARY_MAPFILE
776SET_SHARED_LIBRARY_NAME
777SET_SHARED_LIBRARY_ORIGIN
778SET_EXECUTABLE_ORIGIN
779CXX_FLAG_REORDER
780C_FLAG_REORDER
781JVM_RCFLAGS
782RC_FLAGS
783AR_OUT_OPTION
784LD_OUT_OPTION
785EXE_OUT_OPTION
786CC_OUT_OPTION
787STRIPFLAGS
788ARFLAGS
789COMPILER_BINDCMD_FILE_FLAG
790COMPILER_COMMAND_FILE_FLAG
791COMPILER_TARGET_BITS_FLAG
792JT_HOME
793JTREGEXE
794HOTSPOT_TOOLCHAIN_TYPE
795USING_BROKEN_SUSE_LD
796PACKAGE_PATH
797BUILD_AS
798BUILD_LDCXX
799BUILD_LD
800BUILD_STRIP
801BUILD_OBJCOPY
802BUILD_AR
803BUILD_NM
804BUILD_CXX
805BUILD_CC
806BUILD_SYSROOT_LDFLAGS
807BUILD_SYSROOT_CFLAGS
808ac_ct_OBJDUMP
809OBJDUMP
810ac_ct_OBJCOPY
811OBJCOPY
812ac_ct_NM
813ac_ct_STRIP
814GNM
815NM
816STRIP
817MSBUILD
818DUMPBIN
819RC
820MT
821LIPO
822ac_ct_AR
823AR
824AS
825LDCXX
826LD
827CXXCPP
828CPP
829CXX_VERSION_NUMBER
830CC_VERSION_NUMBER
831ac_ct_CXX
832CXXFLAGS
833CXX
834TOOLCHAIN_PATH_CXX
835POTENTIAL_CXX
836OBJEXT
837EXEEXT
838ac_ct_CC
839CPPFLAGS
840LDFLAGS
841CFLAGS
842CC
843TOOLCHAIN_PATH_CC
844POTENTIAL_CC
845TOOLCHAIN_VERSION
846VS_LIB
847VS_INCLUDE
848VS_PATH
849CYGWIN_LINK
850SYSROOT_LDFLAGS
851SYSROOT_CFLAGS
852EXTRA_LDFLAGS
853EXTRA_CXXFLAGS
854EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_MAN
867IMPORT_MODULES_LEGAL
868IMPORT_MODULES_CONF
869IMPORT_MODULES_LIBS
870IMPORT_MODULES_CMDS
871IMPORT_MODULES_CLASSES
872BUILD_OUTPUT
873JDK_TOPDIR
874NASHORN_TOPDIR
875HOTSPOT_TOPDIR
876JAXWS_TOPDIR
877JAXP_TOPDIR
878CORBA_TOPDIR
879LANGTOOLS_TOPDIR
880EXTERNAL_BUILDJDK
881BUILD_JDK
882CREATE_BUILDJDK
883JLINK
884JMOD
885JAVAC_FLAGS
886BOOT_JDK_MODULAR
887BOOT_JDK_SOURCETARGET
888JARSIGNER
889JAR
890JAVAH
891JAVAC
892JAVA
893BOOT_JDK
894JAVA_CHECK
895JAVAC_CHECK
896VERSION_IS_GA
897VERSION_SHORT
898VERSION_STRING
899VERSION_NUMBER_FOUR_POSITIONS
900VERSION_NUMBER
901VERSION_OPT
902VERSION_BUILD
903VERSION_PRE
904VERSION_PATCH
905VERSION_SECURITY
906VERSION_MINOR
907VERSION_MAJOR
908MACOSX_BUNDLE_ID_BASE
909MACOSX_BUNDLE_NAME_BASE
910HOTSPOT_VM_DISTRO
911COMPANY_NAME
912JDK_RC_PLATFORM_NAME
913PRODUCT_SUFFIX
914PRODUCT_NAME
915LAUNCHER_NAME
916JLINK_KEEP_PACKAGED_MODULES
917COPYRIGHT_YEAR
918COMPRESS_JARS
919INCLUDE_SA
920UNLIMITED_CRYPTO
921CACERTS_FILE
922ENABLE_FULL_DOCS
923ENABLE_HEADLESS_ONLY
924DEFAULT_MAKE_TARGET
925OS_VERSION_MICRO
926OS_VERSION_MINOR
927OS_VERSION_MAJOR
928PKG_CONFIG
929BASH_ARGS
930SETFILE
931CODESIGN
932XATTR
933DSYMUTIL
934IS_GNU_TIME
935PATCH
936DTRACE
937TIME
938STAT
939HG
940DOT
941READELF
942OTOOL
943LDD
944ZIPEXE
945UNZIP
946TAR_SUPPORTS_TRANSFORM
947TAR_INCLUDE_PARAM
948TAR_CREATE_EXTRA_PARAM
949TAR_TYPE
950FIND_DELETE
951OUTPUT_SYNC
952OUTPUT_SYNC_SUPPORTED
953CHECK_TOOLSDIR_MAKE
954CHECK_TOOLSDIR_GMAKE
955CHECK_MAKE
956CHECK_GMAKE
957MAKE
958PKGHANDLER
959CONFIGURESUPPORT_OUTPUTDIR
960OUTPUT_ROOT
961CONF_NAME
962SPEC
963SDKROOT
964XCODEBUILD
965JVM_VARIANT_MAIN
966VALID_JVM_VARIANTS
967JVM_VARIANTS
968DEBUG_LEVEL
969HOTSPOT_DEBUG_LEVEL
970JDK_VARIANT
971USERNAME
972CANONICAL_TOPDIR
973ORIGINAL_TOPDIR
974TOPDIR
975PATH_SEP
976HOTSPOT_BUILD_CPU_DEFINE
977HOTSPOT_BUILD_CPU_ARCH
978HOTSPOT_BUILD_CPU
979HOTSPOT_BUILD_OS_TYPE
980HOTSPOT_BUILD_OS
981OPENJDK_BUILD_BUNDLE_PLATFORM
982OPENJDK_BUILD_OS_EXPORT_DIR
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LEGACY_LIB
986OPENJDK_BUILD_CPU_LEGACY
987HOTSPOT_TARGET_CPU_DEFINE
988HOTSPOT_TARGET_CPU_ARCH
989HOTSPOT_TARGET_CPU
990HOTSPOT_TARGET_OS_TYPE
991HOTSPOT_TARGET_OS
992DEFINE_CROSS_COMPILE_ARCH
993OPENJDK_TARGET_BUNDLE_PLATFORM
994OPENJDK_TARGET_OS_EXPORT_DIR
995OPENJDK_TARGET_CPU_OSARCH
996OPENJDK_TARGET_CPU_ISADIR
997OPENJDK_TARGET_CPU_LEGACY_LIB
998OPENJDK_TARGET_CPU_LEGACY
999RELEASE_FILE_OS_ARCH
1000RELEASE_FILE_OS_NAME
1001OPENJDK_MODULE_TARGET_PLATFORM
1002COMPILE_TYPE
1003OPENJDK_TARGET_CPU_ENDIAN
1004OPENJDK_TARGET_CPU_BITS
1005OPENJDK_TARGET_CPU_ARCH
1006OPENJDK_TARGET_CPU
1007OPENJDK_TARGET_OS_ENV
1008OPENJDK_TARGET_OS_TYPE
1009OPENJDK_TARGET_OS
1010OPENJDK_BUILD_CPU_ENDIAN
1011OPENJDK_BUILD_CPU_BITS
1012OPENJDK_BUILD_CPU_ARCH
1013OPENJDK_BUILD_CPU
1014OPENJDK_BUILD_OS_ENV
1015OPENJDK_BUILD_OS_TYPE
1016OPENJDK_BUILD_OS
1017OPENJDK_BUILD_AUTOCONF_NAME
1018OPENJDK_TARGET_AUTOCONF_NAME
1019target_os
1020target_vendor
1021target_cpu
1022target
1023host_os
1024host_vendor
1025host_cpu
1026host
1027build_os
1028build_vendor
1029build_cpu
1030build
1031PANDOC
1032NICE
1033CPIO
1034DF
1035READLINK
1036CYGPATH
1037SED
1038FGREP
1039EGREP
1040GREP
1041AWK
1042XARGS
1043WHICH
1044WC
1045UNIQ
1046UNAME
1047TR
1048TOUCH
1049TEE
1050TAR
1051TAIL
1052SORT
1053SH
1054RMDIR
1055RM
1056PRINTF
1057NAWK
1058MV
1059MKTEMP
1060MKDIR
1061LS
1062LN
1063GZIP
1064GUNZIP
1065HEAD
1066FIND
1067FILE
1068EXPR
1069ECHO
1070DIRNAME
1071DIFF
1072DATE
1073CUT
1074CP
1075COMM
1076CMP
1077CHMOD
1078CAT
1079BASH
1080BASENAME
1081DATE_WHEN_CONFIGURED
1082ORIGINAL_PATH
1083CONFIGURE_COMMAND_LINE
1084target_alias
1085host_alias
1086build_alias
1087LIBS
1088ECHO_T
1089ECHO_N
1090ECHO_C
1091DEFS
1092mandir
1093localedir
1094libdir
1095psdir
1096pdfdir
1097dvidir
1098htmldir
1099infodir
1100docdir
1101oldincludedir
1102includedir
1103localstatedir
1104sharedstatedir
1105sysconfdir
1106datadir
1107datarootdir
1108libexecdir
1109sbindir
1110bindir
1111program_transform_name
1112prefix
1113exec_prefix
1114PACKAGE_URL
1115PACKAGE_BUGREPORT
1116PACKAGE_STRING
1117PACKAGE_VERSION
1118PACKAGE_TARNAME
1119PACKAGE_NAME
1120PATH_SEPARATOR
1121SHELL'
1122ac_subst_files=''
1123ac_user_opts='
1124enable_option_checking
1125with_target_bits
1126enable_openjdk_only
1127with_custom_make_dir
1128with_jdk_variant
1129enable_debug
1130with_debug_level
1131with_jvm_variants
1132with_cpu_port
1133with_devkit
1134with_sys_root
1135with_sysroot
1136with_tools_dir
1137with_toolchain_path
1138with_extra_path
1139with_sdk_name
1140with_conf_name
1141with_output_sync
1142with_default_make_target
1143enable_headless_only
1144enable_full_docs
1145with_cacerts_file
1146enable_unlimited_crypto
1147with_copyright_year
1148enable_keep_packaged_modules
1149with_milestone
1150with_update_version
1151with_user_release_suffix
1152with_build_number
1153with_version_string
1154with_version_pre
1155with_version_opt
1156with_version_build
1157with_version_major
1158with_version_minor
1159with_version_security
1160with_version_patch
1161with_boot_jdk
1162with_build_jdk
1163with_add_source_root
1164with_override_source_root
1165with_adds_and_overrides
1166with_override_langtools
1167with_override_corba
1168with_override_jaxp
1169with_override_jaxws
1170with_override_hotspot
1171with_override_nashorn
1172with_override_jdk
1173with_import_hotspot
1174with_import_modules
1175enable_static_build
1176with_toolchain_type
1177with_extra_cflags
1178with_extra_cxxflags
1179with_extra_ldflags
1180with_toolchain_version
1181with_build_devkit
1182with_jtreg
1183with_abi_profile
1184enable_warnings_as_errors
1185with_native_debug_symbols
1186enable_debug_symbols
1187enable_zip_debug_info
1188enable_native_coverage
1189enable_dtrace
1190enable_aot
1191enable_hotspot_gtest
1192with_stdc__lib
1193with_msvcr_dll
1194with_msvcp_dll
1195with_x
1196with_cups
1197with_cups_include
1198with_freetype
1199with_freetype_include
1200with_freetype_lib
1201with_freetype_src
1202enable_freetype_bundling
1203with_freetype_license
1204with_alsa
1205with_alsa_include
1206with_alsa_lib
1207with_libffi
1208with_libffi_include
1209with_libffi_lib
1210enable_libffi_bundling
1211with_libjpeg
1212with_giflib
1213with_libpng
1214with_zlib
1215with_lcms
1216with_dxsdk
1217with_dxsdk_lib
1218with_dxsdk_include
1219with_libelf
1220with_libelf_include
1221with_libelf_lib
1222with_jvm_features
1223with_jvm_interpreter
1224enable_jtreg_failure_handler
1225enable_generate_classlist
1226with_num_cores
1227with_memory_size
1228with_jobs
1229with_test_jobs
1230with_boot_jdk_jvmargs
1231with_sjavac_server_java
1232enable_sjavac
1233enable_javac_server
1234enable_icecc
1235enable_precompiled_headers
1236enable_ccache
1237with_ccache_dir
1238'
1239      ac_precious_vars='build_alias
1240host_alias
1241target_alias
1242BASENAME
1243BASH
1244CAT
1245CHMOD
1246CMP
1247COMM
1248CP
1249CUT
1250DATE
1251DIFF
1252DIRNAME
1253ECHO
1254EXPR
1255FILE
1256FIND
1257HEAD
1258GUNZIP
1259GZIP
1260LN
1261LS
1262MKDIR
1263MKTEMP
1264MV
1265NAWK
1266PRINTF
1267RM
1268RMDIR
1269SH
1270SORT
1271TAIL
1272TAR
1273TEE
1274TOUCH
1275TR
1276UNAME
1277UNIQ
1278WC
1279WHICH
1280XARGS
1281AWK
1282GREP
1283EGREP
1284FGREP
1285SED
1286CYGPATH
1287READLINK
1288DF
1289CPIO
1290NICE
1291PANDOC
1292MAKE
1293UNZIP
1294ZIPEXE
1295LDD
1296OTOOL
1297READELF
1298DOT
1299HG
1300STAT
1301TIME
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ELF_CFLAGS
1351ELF_LIBS
1352ICECC_CMD
1353ICECC_CREATE_ENV
1354ICECC_WRAPPER
1355CCACHE'
1356
1357
1358# Initialize some variables set by options.
1359ac_init_help=
1360ac_init_version=false
1361ac_unrecognized_opts=
1362ac_unrecognized_sep=
1363# The variables have the same names as the options, with
1364# dashes changed to underlines.
1365cache_file=/dev/null
1366exec_prefix=NONE
1367no_create=
1368no_recursion=
1369prefix=NONE
1370program_prefix=NONE
1371program_suffix=NONE
1372program_transform_name=s,x,x,
1373silent=
1374site=
1375srcdir=
1376verbose=
1377x_includes=NONE
1378x_libraries=NONE
1379
1380# Installation directory options.
1381# These are left unexpanded so users can "make install exec_prefix=/foo"
1382# and all the variables that are supposed to be based on exec_prefix
1383# by default will actually change.
1384# Use braces instead of parens because sh, perl, etc. also accept them.
1385# (The list follows the same order as the GNU Coding Standards.)
1386bindir='${exec_prefix}/bin'
1387sbindir='${exec_prefix}/sbin'
1388libexecdir='${exec_prefix}/libexec'
1389datarootdir='${prefix}/share'
1390datadir='${datarootdir}'
1391sysconfdir='${prefix}/etc'
1392sharedstatedir='${prefix}/com'
1393localstatedir='${prefix}/var'
1394includedir='${prefix}/include'
1395oldincludedir='/usr/include'
1396docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1397infodir='${datarootdir}/info'
1398htmldir='${docdir}'
1399dvidir='${docdir}'
1400pdfdir='${docdir}'
1401psdir='${docdir}'
1402libdir='${exec_prefix}/lib'
1403localedir='${datarootdir}/locale'
1404mandir='${datarootdir}/man'
1405
1406ac_prev=
1407ac_dashdash=
1408for ac_option
1409do
1410  # If the previous option needs an argument, assign it.
1411  if test -n "$ac_prev"; then
1412    eval $ac_prev=\$ac_option
1413    ac_prev=
1414    continue
1415  fi
1416
1417  case $ac_option in
1418  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1419  *=)   ac_optarg= ;;
1420  *)    ac_optarg=yes ;;
1421  esac
1422
1423  # Accept the important Cygnus configure options, so we can diagnose typos.
1424
1425  case $ac_dashdash$ac_option in
1426  --)
1427    ac_dashdash=yes ;;
1428
1429  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1430    ac_prev=bindir ;;
1431  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1432    bindir=$ac_optarg ;;
1433
1434  -build | --build | --buil | --bui | --bu)
1435    ac_prev=build_alias ;;
1436  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1437    build_alias=$ac_optarg ;;
1438
1439  -cache-file | --cache-file | --cache-fil | --cache-fi \
1440  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1441    ac_prev=cache_file ;;
1442  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1443  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1444    cache_file=$ac_optarg ;;
1445
1446  --config-cache | -C)
1447    cache_file=config.cache ;;
1448
1449  -datadir | --datadir | --datadi | --datad)
1450    ac_prev=datadir ;;
1451  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1452    datadir=$ac_optarg ;;
1453
1454  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1455  | --dataroo | --dataro | --datar)
1456    ac_prev=datarootdir ;;
1457  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1458  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1459    datarootdir=$ac_optarg ;;
1460
1461  -disable-* | --disable-*)
1462    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1463    # Reject names that are not valid shell variable names.
1464    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1465      as_fn_error $? "invalid feature name: $ac_useropt"
1466    ac_useropt_orig=$ac_useropt
1467    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1468    case $ac_user_opts in
1469      *"
1470"enable_$ac_useropt"
1471"*) ;;
1472      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1473	 ac_unrecognized_sep=', ';;
1474    esac
1475    eval enable_$ac_useropt=no ;;
1476
1477  -docdir | --docdir | --docdi | --doc | --do)
1478    ac_prev=docdir ;;
1479  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1480    docdir=$ac_optarg ;;
1481
1482  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1483    ac_prev=dvidir ;;
1484  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1485    dvidir=$ac_optarg ;;
1486
1487  -enable-* | --enable-*)
1488    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1489    # Reject names that are not valid shell variable names.
1490    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1491      as_fn_error $? "invalid feature name: $ac_useropt"
1492    ac_useropt_orig=$ac_useropt
1493    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1494    case $ac_user_opts in
1495      *"
1496"enable_$ac_useropt"
1497"*) ;;
1498      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1499	 ac_unrecognized_sep=', ';;
1500    esac
1501    eval enable_$ac_useropt=\$ac_optarg ;;
1502
1503  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1504  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1505  | --exec | --exe | --ex)
1506    ac_prev=exec_prefix ;;
1507  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1508  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1509  | --exec=* | --exe=* | --ex=*)
1510    exec_prefix=$ac_optarg ;;
1511
1512  -gas | --gas | --ga | --g)
1513    # Obsolete; use --with-gas.
1514    with_gas=yes ;;
1515
1516  -help | --help | --hel | --he | -h)
1517    ac_init_help=long ;;
1518  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1519    ac_init_help=recursive ;;
1520  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1521    ac_init_help=short ;;
1522
1523  -host | --host | --hos | --ho)
1524    ac_prev=host_alias ;;
1525  -host=* | --host=* | --hos=* | --ho=*)
1526    host_alias=$ac_optarg ;;
1527
1528  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1529    ac_prev=htmldir ;;
1530  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1531  | --ht=*)
1532    htmldir=$ac_optarg ;;
1533
1534  -includedir | --includedir | --includedi | --included | --include \
1535  | --includ | --inclu | --incl | --inc)
1536    ac_prev=includedir ;;
1537  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1538  | --includ=* | --inclu=* | --incl=* | --inc=*)
1539    includedir=$ac_optarg ;;
1540
1541  -infodir | --infodir | --infodi | --infod | --info | --inf)
1542    ac_prev=infodir ;;
1543  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1544    infodir=$ac_optarg ;;
1545
1546  -libdir | --libdir | --libdi | --libd)
1547    ac_prev=libdir ;;
1548  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1549    libdir=$ac_optarg ;;
1550
1551  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1552  | --libexe | --libex | --libe)
1553    ac_prev=libexecdir ;;
1554  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1555  | --libexe=* | --libex=* | --libe=*)
1556    libexecdir=$ac_optarg ;;
1557
1558  -localedir | --localedir | --localedi | --localed | --locale)
1559    ac_prev=localedir ;;
1560  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1561    localedir=$ac_optarg ;;
1562
1563  -localstatedir | --localstatedir | --localstatedi | --localstated \
1564  | --localstate | --localstat | --localsta | --localst | --locals)
1565    ac_prev=localstatedir ;;
1566  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1567  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1568    localstatedir=$ac_optarg ;;
1569
1570  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1571    ac_prev=mandir ;;
1572  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1573    mandir=$ac_optarg ;;
1574
1575  -nfp | --nfp | --nf)
1576    # Obsolete; use --without-fp.
1577    with_fp=no ;;
1578
1579  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1580  | --no-cr | --no-c | -n)
1581    no_create=yes ;;
1582
1583  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1584  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1585    no_recursion=yes ;;
1586
1587  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1588  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1589  | --oldin | --oldi | --old | --ol | --o)
1590    ac_prev=oldincludedir ;;
1591  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1592  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1593  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1594    oldincludedir=$ac_optarg ;;
1595
1596  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1597    ac_prev=prefix ;;
1598  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1599    prefix=$ac_optarg ;;
1600
1601  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1602  | --program-pre | --program-pr | --program-p)
1603    ac_prev=program_prefix ;;
1604  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1605  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1606    program_prefix=$ac_optarg ;;
1607
1608  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1609  | --program-suf | --program-su | --program-s)
1610    ac_prev=program_suffix ;;
1611  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1612  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1613    program_suffix=$ac_optarg ;;
1614
1615  -program-transform-name | --program-transform-name \
1616  | --program-transform-nam | --program-transform-na \
1617  | --program-transform-n | --program-transform- \
1618  | --program-transform | --program-transfor \
1619  | --program-transfo | --program-transf \
1620  | --program-trans | --program-tran \
1621  | --progr-tra | --program-tr | --program-t)
1622    ac_prev=program_transform_name ;;
1623  -program-transform-name=* | --program-transform-name=* \
1624  | --program-transform-nam=* | --program-transform-na=* \
1625  | --program-transform-n=* | --program-transform-=* \
1626  | --program-transform=* | --program-transfor=* \
1627  | --program-transfo=* | --program-transf=* \
1628  | --program-trans=* | --program-tran=* \
1629  | --progr-tra=* | --program-tr=* | --program-t=*)
1630    program_transform_name=$ac_optarg ;;
1631
1632  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1633    ac_prev=pdfdir ;;
1634  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1635    pdfdir=$ac_optarg ;;
1636
1637  -psdir | --psdir | --psdi | --psd | --ps)
1638    ac_prev=psdir ;;
1639  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1640    psdir=$ac_optarg ;;
1641
1642  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1643  | -silent | --silent | --silen | --sile | --sil)
1644    silent=yes ;;
1645
1646  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1647    ac_prev=sbindir ;;
1648  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1649  | --sbi=* | --sb=*)
1650    sbindir=$ac_optarg ;;
1651
1652  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1653  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1654  | --sharedst | --shareds | --shared | --share | --shar \
1655  | --sha | --sh)
1656    ac_prev=sharedstatedir ;;
1657  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1658  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1659  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1660  | --sha=* | --sh=*)
1661    sharedstatedir=$ac_optarg ;;
1662
1663  -site | --site | --sit)
1664    ac_prev=site ;;
1665  -site=* | --site=* | --sit=*)
1666    site=$ac_optarg ;;
1667
1668  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1669    ac_prev=srcdir ;;
1670  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1671    srcdir=$ac_optarg ;;
1672
1673  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1674  | --syscon | --sysco | --sysc | --sys | --sy)
1675    ac_prev=sysconfdir ;;
1676  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1677  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1678    sysconfdir=$ac_optarg ;;
1679
1680  -target | --target | --targe | --targ | --tar | --ta | --t)
1681    ac_prev=target_alias ;;
1682  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1683    target_alias=$ac_optarg ;;
1684
1685  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1686    verbose=yes ;;
1687
1688  -version | --version | --versio | --versi | --vers | -V)
1689    ac_init_version=: ;;
1690
1691  -with-* | --with-*)
1692    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1693    # Reject names that are not valid shell variable names.
1694    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1695      as_fn_error $? "invalid package name: $ac_useropt"
1696    ac_useropt_orig=$ac_useropt
1697    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1698    case $ac_user_opts in
1699      *"
1700"with_$ac_useropt"
1701"*) ;;
1702      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1703	 ac_unrecognized_sep=', ';;
1704    esac
1705    eval with_$ac_useropt=\$ac_optarg ;;
1706
1707  -without-* | --without-*)
1708    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1709    # Reject names that are not valid shell variable names.
1710    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1711      as_fn_error $? "invalid package name: $ac_useropt"
1712    ac_useropt_orig=$ac_useropt
1713    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1714    case $ac_user_opts in
1715      *"
1716"with_$ac_useropt"
1717"*) ;;
1718      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1719	 ac_unrecognized_sep=', ';;
1720    esac
1721    eval with_$ac_useropt=no ;;
1722
1723  --x)
1724    # Obsolete; use --with-x.
1725    with_x=yes ;;
1726
1727  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1728  | --x-incl | --x-inc | --x-in | --x-i)
1729    ac_prev=x_includes ;;
1730  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1731  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1732    x_includes=$ac_optarg ;;
1733
1734  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1735  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1736    ac_prev=x_libraries ;;
1737  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1738  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1739    x_libraries=$ac_optarg ;;
1740
1741  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1742Try \`$0 --help' for more information"
1743    ;;
1744
1745  *=*)
1746    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1747    # Reject names that are not valid shell variable names.
1748    case $ac_envvar in #(
1749      '' | [0-9]* | *[!_$as_cr_alnum]* )
1750      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1751    esac
1752    eval $ac_envvar=\$ac_optarg
1753    export $ac_envvar ;;
1754
1755  *)
1756    # FIXME: should be removed in autoconf 3.0.
1757    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1758    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1759      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1760    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1761    ;;
1762
1763  esac
1764done
1765
1766if test -n "$ac_prev"; then
1767  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1768  as_fn_error $? "missing argument to $ac_option"
1769fi
1770
1771if test -n "$ac_unrecognized_opts"; then
1772  case $enable_option_checking in
1773    no) ;;
1774    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1775    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1776  esac
1777fi
1778
1779# Check all directory arguments for consistency.
1780for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1781		datadir sysconfdir sharedstatedir localstatedir includedir \
1782		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1783		libdir localedir mandir
1784do
1785  eval ac_val=\$$ac_var
1786  # Remove trailing slashes.
1787  case $ac_val in
1788    */ )
1789      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1790      eval $ac_var=\$ac_val;;
1791  esac
1792  # Be sure to have absolute directory names.
1793  case $ac_val in
1794    [\\/$]* | ?:[\\/]* )  continue;;
1795    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1796  esac
1797  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1798done
1799
1800# There might be people who depend on the old broken behavior: `$host'
1801# used to hold the argument of --host etc.
1802# FIXME: To remove some day.
1803build=$build_alias
1804host=$host_alias
1805target=$target_alias
1806
1807# FIXME: To remove some day.
1808if test "x$host_alias" != x; then
1809  if test "x$build_alias" = x; then
1810    cross_compiling=maybe
1811  elif test "x$build_alias" != "x$host_alias"; then
1812    cross_compiling=yes
1813  fi
1814fi
1815
1816ac_tool_prefix=
1817test -n "$host_alias" && ac_tool_prefix=$host_alias-
1818
1819test "$silent" = yes && exec 6>/dev/null
1820
1821
1822ac_pwd=`pwd` && test -n "$ac_pwd" &&
1823ac_ls_di=`ls -di .` &&
1824ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1825  as_fn_error $? "working directory cannot be determined"
1826test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1827  as_fn_error $? "pwd does not report name of working directory"
1828
1829
1830# Find the source files, if location was not specified.
1831if test -z "$srcdir"; then
1832  ac_srcdir_defaulted=yes
1833  # Try the directory containing this script, then the parent directory.
1834  ac_confdir=`$as_dirname -- "$as_myself" ||
1835$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1836	 X"$as_myself" : 'X\(//\)[^/]' \| \
1837	 X"$as_myself" : 'X\(//\)$' \| \
1838	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1839$as_echo X"$as_myself" |
1840    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1841	    s//\1/
1842	    q
1843	  }
1844	  /^X\(\/\/\)[^/].*/{
1845	    s//\1/
1846	    q
1847	  }
1848	  /^X\(\/\/\)$/{
1849	    s//\1/
1850	    q
1851	  }
1852	  /^X\(\/\).*/{
1853	    s//\1/
1854	    q
1855	  }
1856	  s/.*/./; q'`
1857  srcdir=$ac_confdir
1858  if test ! -r "$srcdir/$ac_unique_file"; then
1859    srcdir=..
1860  fi
1861else
1862  ac_srcdir_defaulted=no
1863fi
1864if test ! -r "$srcdir/$ac_unique_file"; then
1865  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1866  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1867fi
1868ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1869ac_abs_confdir=`(
1870	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1871	pwd)`
1872# When building in place, set srcdir=.
1873if test "$ac_abs_confdir" = "$ac_pwd"; then
1874  srcdir=.
1875fi
1876# Remove unnecessary trailing slashes from srcdir.
1877# Double slashes in file names in object file debugging info
1878# mess up M-x gdb in Emacs.
1879case $srcdir in
1880*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1881esac
1882for ac_var in $ac_precious_vars; do
1883  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_env_${ac_var}_value=\$${ac_var}
1885  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1886  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1887done
1888
1889#
1890# Report the --help message.
1891#
1892if test "$ac_init_help" = "long"; then
1893  # Omit some internal or obsolete options to make the list less imposing.
1894  # This message is too long to be a string in the A/UX 3.1 sh.
1895  cat <<_ACEOF
1896\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1897
1898Usage: $0 [OPTION]... [VAR=VALUE]...
1899
1900To assign environment variables (e.g., CC, CFLAGS...), specify them as
1901VAR=VALUE.  See below for descriptions of some of the useful variables.
1902
1903Defaults for the options are specified in brackets.
1904
1905Configuration:
1906  -h, --help              display this help and exit
1907      --help=short        display options specific to this package
1908      --help=recursive    display the short help of all the included packages
1909  -V, --version           display version information and exit
1910  -q, --quiet, --silent   do not print \`checking ...' messages
1911      --cache-file=FILE   cache test results in FILE [disabled]
1912  -C, --config-cache      alias for \`--cache-file=config.cache'
1913  -n, --no-create         do not create output files
1914      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1915
1916Installation directories:
1917  --prefix=PREFIX         install architecture-independent files in PREFIX
1918                          [$ac_default_prefix]
1919  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1920                          [PREFIX]
1921
1922By default, \`make install' will install all the files in
1923\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1924an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1925for instance \`--prefix=\$HOME'.
1926
1927For better control, use the options below.
1928
1929Fine tuning of the installation directories:
1930  --bindir=DIR            user executables [EPREFIX/bin]
1931  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1932  --libexecdir=DIR        program executables [EPREFIX/libexec]
1933  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1934  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1935  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1936  --libdir=DIR            object code libraries [EPREFIX/lib]
1937  --includedir=DIR        C header files [PREFIX/include]
1938  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1939  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1940  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1941  --infodir=DIR           info documentation [DATAROOTDIR/info]
1942  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1943  --mandir=DIR            man documentation [DATAROOTDIR/man]
1944  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1945  --htmldir=DIR           html documentation [DOCDIR]
1946  --dvidir=DIR            dvi documentation [DOCDIR]
1947  --pdfdir=DIR            pdf documentation [DOCDIR]
1948  --psdir=DIR             ps documentation [DOCDIR]
1949_ACEOF
1950
1951  cat <<\_ACEOF
1952
1953X features:
1954  --x-includes=DIR    X include files are in DIR
1955  --x-libraries=DIR   X library files are in DIR
1956
1957System types:
1958  --build=BUILD     configure for building on BUILD [guessed]
1959  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1960  --target=TARGET   configure for building compilers for TARGET [HOST]
1961_ACEOF
1962fi
1963
1964if test -n "$ac_init_help"; then
1965  case $ac_init_help in
1966     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1967   esac
1968  cat <<\_ACEOF
1969
1970Optional Features:
1971  --disable-option-checking  ignore unrecognized --enable/--with options
1972  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1973  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1974  --enable-openjdk-only   suppress building custom source even if present
1975                          [disabled]
1976  --enable-debug          set the debug level to fastdebug (shorthand for
1977                          --with-debug-level=fastdebug) [disabled]
1978  --enable-headless-only  only build headless (no GUI) support [disabled]
1979  --enable-full-docs      build complete documentation [enabled if all tools
1980                          found]
1981  --disable-unlimited-crypto
1982                          Disable unlimited crypto policy [enabled]
1983  --disable-keep-packaged-modules
1984                          Do not keep packaged modules in jdk image [enable]
1985  --enable-static-build   enable static library build [disabled]
1986  --disable-warnings-as-errors
1987                          do not consider native warnings to be an error
1988                          [enabled]
1989  --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-native-coverage
1994                          enable native compilation with code coverage
1995                          data[disabled]
1996  --enable-dtrace[=yes/no/auto]
1997                          enable dtrace. Default is auto, where dtrace is
1998                          enabled if all dependencies are present.
1999  --enable-aot[=yes/no/auto]
2000                          enable ahead of time compilation feature. Default is
2001                          auto, where aot is enabled if all dependencies are
2002                          present.
2003  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2004  --disable-freetype-bundling
2005                          disable bundling of the freetype library with the
2006                          build result [enabled on Windows or when using
2007                          --with-freetype, disabled otherwise]
2008  --enable-libffi-bundling
2009                          enable bundling of libffi.so to make the built JDK
2010                          runnable on more systems
2011  --enable-jtreg-failure-handler
2012                          forces build of the jtreg failure handler to be
2013                          enabled, missing dependencies become fatal errors.
2014                          Default is auto, where the failure handler is built
2015                          if all dependencies are present and otherwise just
2016                          disabled.
2017  --disable-generate-classlist
2018                          forces enabling or disabling of the generation of a
2019                          CDS classlist at build time. Default is to generate
2020                          it when either the server or client JVMs are built.
2021  --enable-sjavac         use sjavac to do fast incremental compiles
2022                          [disabled]
2023  --disable-javac-server  disable javac server [enabled]
2024  --enable-icecc          enable distribted compilation of native code using
2025                          icecc/icecream [disabled]
2026  --disable-precompiled-headers
2027                          disable using precompiled headers when compiling C++
2028                          [enabled]
2029  --enable-ccache         enable using ccache to speed up recompilations
2030                          [disabled]
2031
2032Optional Packages:
2033  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2034  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2035  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2036                          support it), e.g. --with-target-bits=32 [guessed]
2037  --with-custom-make-dir  Deprecated. Option is kept for backwards
2038                          compatibility and is ignored
2039  --with-jdk-variant      JDK variant to build (normal) [normal]
2040  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2041                          optimized) [release]
2042  --with-jvm-variants     JVM variants (separated by commas) to build
2043                          (server,client,minimal,core,zero,zeroshark,custom)
2044                          [server]
2045  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2046                          (arm64,aarch64) [aarch64]
2047  --with-devkit           use this devkit for compilers, tools and resources
2048  --with-sys-root         alias for --with-sysroot for backwards compatability
2049  --with-sysroot          use this directory as sysroot
2050  --with-tools-dir        alias for --with-toolchain-path for backwards
2051                          compatibility
2052  --with-toolchain-path   prepend these directories when searching for
2053                          toolchain binaries (compilers etc)
2054  --with-extra-path       prepend these directories to the default path
2055  --with-sdk-name         use the platform SDK of the given name. [macosx]
2056  --with-conf-name        use this as the name of the configuration [generated
2057                          from important configuration options]
2058  --with-output-sync      set make output sync type if supported by make.
2059                          [recurse]
2060  --with-default-make-target
2061                          set the default make target [exploded-image]
2062  --with-cacerts-file     specify alternative cacerts file
2063  --with-copyright-year   Set copyright year value for build [current year]
2064  --with-milestone        Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-update-version   Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-user-release-suffix
2069                          Deprecated. Option is kept for backwards
2070                          compatibility and is ignored
2071  --with-build-number     Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-version-string   Set version string [calculated]
2074  --with-version-pre      Set the base part of the version 'PRE' field
2075                          (pre-release identifier) ['internal']
2076  --with-version-opt      Set version 'OPT' field (build metadata)
2077                          [<timestamp>.<user>.<dirname>]
2078  --with-version-build    Set version 'BUILD' field (build number) [not
2079                          specified]
2080  --with-version-major    Set version 'MAJOR' field (first number) [current
2081                          source value]
2082  --with-version-minor    Set version 'MINOR' field (second number) [current
2083                          source value]
2084  --with-version-security Set version 'SECURITY' field (third number) [current
2085                          source value]
2086  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2087                          specified]
2088  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2089  --with-build-jdk        path to JDK of same version as is being built[the
2090                          newly built JDK]
2091  --with-add-source-root  Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-source-root
2094                          Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-adds-and-overrides
2097                          Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-langtools
2100                          Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-override-corba   Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-jaxp    Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-jaxws   Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-hotspot Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-nashorn Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-override-jdk     Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-import_hotspot   Deprecated. Option is kept for backwards
2115                          compatibility and is ignored
2116  --with-import-modules   import a set of prebuilt modules either as a zip
2117                          file or an exploded directory
2118  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2119                          to show possible values [platform dependent]
2120  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2121  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2122  --with-extra-ldflags    extra flags to be used when linking jdk
2123  --with-toolchain-version
2124                          the version of the toolchain to look for, use
2125                          '--help' to show possible values [platform
2126                          dependent]
2127  --with-build-devkit     Devkit to use for the build platform toolchain
2128  --with-jtreg            Regression Test Harness [probed]
2129  --with-abi-profile      specify ABI profile for ARM builds
2130                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2131                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2132                          [toolchain dependent]
2133  --with-native-debug-symbols
2134                          set the native debug symbol configuration (none,
2135                          internal, external, zipped) [varying]
2136  --with-stdc++lib=<static>,<dynamic>,<default>
2137                          force linking of the C++ runtime on Linux to either
2138                          static or dynamic, default is static with dynamic as
2139                          fallback
2140  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2141                          (Windows only) [probed]
2142  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2143                          (Windows only) [probed]
2144  --with-x                use the X Window System
2145  --with-cups             specify prefix directory for the cups package
2146                          (expecting the headers under PATH/include)
2147  --with-cups-include     specify directory for the cups include files
2148  --with-freetype         specify prefix directory for the freetype package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-freetype-include specify directory for the freetype include files
2152  --with-freetype-lib     specify directory for the freetype library
2153  --with-freetype-src     specify directory with freetype sources to
2154                          automatically build the library (experimental,
2155                          Windows-only)
2156  --with-freetype-license if bundling freetype, also bundle this license file
2157  --with-alsa             specify prefix directory for the alsa package
2158                          (expecting the libraries under PATH/lib and the
2159                          headers under PATH/include)
2160  --with-alsa-include     specify directory for the alsa include files
2161  --with-alsa-lib         specify directory for the alsa library
2162  --with-libffi           specify prefix directory for the libffi package
2163                          (expecting the libraries under PATH/lib and the
2164                          headers under PATH/include)
2165  --with-libffi-include   specify directory for the libffi include files
2166  --with-libffi-lib       specify directory for the libffi library
2167  --with-libjpeg          use libjpeg from build system or OpenJDK source
2168                          (system, bundled) [bundled]
2169  --with-giflib           use giflib from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-libpng           use libpng from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-zlib             use zlib from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-lcms             use lcms2 from build system or OpenJDK source
2176                          (system, bundled) [bundled]
2177  --with-dxsdk            Deprecated. Option is kept for backwards
2178                          compatibility and is ignored
2179  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-dxsdk-include    Deprecated. Option is kept for backwards
2182                          compatibility and is ignored
2183  --with-libelf           specify prefix directory for the libelf package
2184                          (expecting the libraries under PATH/lib and the
2185                          headers under PATH/include)
2186  --with-libelf-include   specify directory for the libelf include files
2187  --with-libelf-lib       specify directory for the libelf library
2188  --with-jvm-features     additional JVM features to enable (separated by
2189                          comma), use '--help' to show possible values [none]
2190  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2191                          compatibility and is ignored
2192  --with-num-cores        number of cores in the build system, e.g.
2193                          --with-num-cores=8 [probed]
2194  --with-memory-size      memory (in MB) available in the build system, e.g.
2195                          --with-memory-size=1024 [probed]
2196  --with-jobs             number of parallel jobs to let make run [calculated
2197                          based on cores and memory]
2198  --with-test-jobs        number of parallel tests jobs to run [based on build
2199                          jobs]
2200  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2201                          invocations of boot JDK, overriding the default
2202                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2203                          -enableassertions"
2204  --with-sjavac-server-java
2205                          use this java binary for running the sjavac
2206                          background server [Boot JDK java]
2207  --with-ccache-dir       where to store ccache files [~/.ccache]
2208
2209Some influential environment variables:
2210  BASENAME    Override default value for BASENAME
2211  BASH        Override default value for BASH
2212  CAT         Override default value for CAT
2213  CHMOD       Override default value for CHMOD
2214  CMP         Override default value for CMP
2215  COMM        Override default value for COMM
2216  CP          Override default value for CP
2217  CUT         Override default value for CUT
2218  DATE        Override default value for DATE
2219  DIFF        Override default value for DIFF
2220  DIRNAME     Override default value for DIRNAME
2221  ECHO        Override default value for ECHO
2222  EXPR        Override default value for EXPR
2223  FILE        Override default value for FILE
2224  FIND        Override default value for FIND
2225  HEAD        Override default value for HEAD
2226  GUNZIP      Override default value for GUNZIP
2227  GZIP        Override default value for GZIP
2228  LN          Override default value for LN
2229  LS          Override default value for LS
2230  MKDIR       Override default value for MKDIR
2231  MKTEMP      Override default value for MKTEMP
2232  MV          Override default value for MV
2233  NAWK        Override default value for NAWK
2234  PRINTF      Override default value for PRINTF
2235  RM          Override default value for RM
2236  RMDIR       Override default value for RMDIR
2237  SH          Override default value for SH
2238  SORT        Override default value for SORT
2239  TAIL        Override default value for TAIL
2240  TAR         Override default value for TAR
2241  TEE         Override default value for TEE
2242  TOUCH       Override default value for TOUCH
2243  TR          Override default value for TR
2244  UNAME       Override default value for UNAME
2245  UNIQ        Override default value for UNIQ
2246  WC          Override default value for WC
2247  WHICH       Override default value for WHICH
2248  XARGS       Override default value for XARGS
2249  AWK         Override default value for AWK
2250  GREP        Override default value for GREP
2251  EGREP       Override default value for EGREP
2252  FGREP       Override default value for FGREP
2253  SED         Override default value for SED
2254  CYGPATH     Override default value for CYGPATH
2255  READLINK    Override default value for READLINK
2256  DF          Override default value for DF
2257  CPIO        Override default value for CPIO
2258  NICE        Override default value for NICE
2259  PANDOC      Override default value for PANDOC
2260  MAKE        Override default value for MAKE
2261  UNZIP       Override default value for UNZIP
2262  ZIPEXE      Override default value for ZIPEXE
2263  LDD         Override default value for LDD
2264  OTOOL       Override default value for OTOOL
2265  READELF     Override default value for READELF
2266  DOT         Override default value for DOT
2267  HG          Override default value for HG
2268  STAT        Override default value for STAT
2269  TIME        Override default value for TIME
2270  DTRACE      Override default value for DTRACE
2271  PATCH       Override default value for PATCH
2272  DSYMUTIL    Override default value for DSYMUTIL
2273  XATTR       Override default value for XATTR
2274  CODESIGN    Override default value for CODESIGN
2275  SETFILE     Override default value for SETFILE
2276  PKG_CONFIG  path to pkg-config utility
2277  JAVA        Override default value for JAVA
2278  JAVAC       Override default value for JAVAC
2279  JAVAH       Override default value for JAVAH
2280  JAR         Override default value for JAR
2281  JARSIGNER   Override default value for JARSIGNER
2282  CC          C compiler command
2283  CFLAGS      C compiler flags
2284  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2285              nonstandard directory <lib dir>
2286  LIBS        libraries to pass to the linker, e.g. -l<library>
2287  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2288              you have headers in a nonstandard directory <include dir>
2289  CXX         C++ compiler command
2290  CXXFLAGS    C++ compiler flags
2291  CPP         C preprocessor
2292  CXXCPP      C++ preprocessor
2293  AS          Override default value for AS
2294  AR          Override default value for AR
2295  LIPO        Override default value for LIPO
2296  STRIP       Override default value for STRIP
2297  NM          Override default value for NM
2298  GNM         Override default value for GNM
2299  OBJCOPY     Override default value for OBJCOPY
2300  OBJDUMP     Override default value for OBJDUMP
2301  BUILD_CC    Override default value for BUILD_CC
2302  BUILD_CXX   Override default value for BUILD_CXX
2303  BUILD_NM    Override default value for BUILD_NM
2304  BUILD_AR    Override default value for BUILD_AR
2305  BUILD_OBJCOPY
2306              Override default value for BUILD_OBJCOPY
2307  BUILD_STRIP Override default value for BUILD_STRIP
2308  JTREGEXE    Override default value for JTREGEXE
2309  XMKMF       Path to xmkmf, Makefile generator for X Window System
2310  FREETYPE_CFLAGS
2311              C compiler flags for FREETYPE, overriding pkg-config
2312  FREETYPE_LIBS
2313              linker flags for FREETYPE, overriding pkg-config
2314  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2315  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2316  LIBFFI_CFLAGS
2317              C compiler flags for LIBFFI, overriding pkg-config
2318  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2319  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2320  PNG_LIBS    linker flags for PNG, overriding pkg-config
2321  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2322  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2323  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2324  ELF_LIBS    linker flags for ELF, overriding pkg-config
2325  ICECC_CMD   Override default value for ICECC_CMD
2326  ICECC_CREATE_ENV
2327              Override default value for ICECC_CREATE_ENV
2328  ICECC_WRAPPER
2329              Override default value for ICECC_WRAPPER
2330  CCACHE      Override default value for CCACHE
2331
2332Use these variables to override the choices made by `configure' or to help
2333it to find libraries and programs with nonstandard names/locations.
2334
2335Report bugs to <build-dev@openjdk.java.net>.
2336OpenJDK home page: <http://openjdk.java.net>.
2337_ACEOF
2338ac_status=$?
2339fi
2340
2341if test "$ac_init_help" = "recursive"; then
2342  # If there are subdirs, report their specific --help.
2343  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2344    test -d "$ac_dir" ||
2345      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2346      continue
2347    ac_builddir=.
2348
2349case "$ac_dir" in
2350.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2351*)
2352  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2353  # A ".." for each directory in $ac_dir_suffix.
2354  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2355  case $ac_top_builddir_sub in
2356  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2357  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2358  esac ;;
2359esac
2360ac_abs_top_builddir=$ac_pwd
2361ac_abs_builddir=$ac_pwd$ac_dir_suffix
2362# for backward compatibility:
2363ac_top_builddir=$ac_top_build_prefix
2364
2365case $srcdir in
2366  .)  # We are building in place.
2367    ac_srcdir=.
2368    ac_top_srcdir=$ac_top_builddir_sub
2369    ac_abs_top_srcdir=$ac_pwd ;;
2370  [\\/]* | ?:[\\/]* )  # Absolute name.
2371    ac_srcdir=$srcdir$ac_dir_suffix;
2372    ac_top_srcdir=$srcdir
2373    ac_abs_top_srcdir=$srcdir ;;
2374  *) # Relative name.
2375    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2376    ac_top_srcdir=$ac_top_build_prefix$srcdir
2377    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2378esac
2379ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2380
2381    cd "$ac_dir" || { ac_status=$?; continue; }
2382    # Check for guested configure.
2383    if test -f "$ac_srcdir/configure.gnu"; then
2384      echo &&
2385      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2386    elif test -f "$ac_srcdir/configure"; then
2387      echo &&
2388      $SHELL "$ac_srcdir/configure" --help=recursive
2389    else
2390      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2391    fi || ac_status=$?
2392    cd "$ac_pwd" || { ac_status=$?; break; }
2393  done
2394fi
2395
2396test -n "$ac_init_help" && exit $ac_status
2397if $ac_init_version; then
2398  cat <<\_ACEOF
2399OpenJDK configure jdk9
2400generated by GNU Autoconf 2.69
2401
2402Copyright (C) 2012 Free Software Foundation, Inc.
2403This configure script is free software; the Free Software Foundation
2404gives unlimited permission to copy, distribute and modify it.
2405_ACEOF
2406  exit
2407fi
2408
2409## ------------------------ ##
2410## Autoconf initialization. ##
2411## ------------------------ ##
2412
2413# ac_fn_c_try_compile LINENO
2414# --------------------------
2415# Try to compile conftest.$ac_ext, and return whether this succeeded.
2416ac_fn_c_try_compile ()
2417{
2418  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2419  rm -f conftest.$ac_objext
2420  if { { ac_try="$ac_compile"
2421case "(($ac_try" in
2422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2423  *) ac_try_echo=$ac_try;;
2424esac
2425eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2426$as_echo "$ac_try_echo"; } >&5
2427  (eval "$ac_compile") 2>conftest.err
2428  ac_status=$?
2429  if test -s conftest.err; then
2430    grep -v '^ *+' conftest.err >conftest.er1
2431    cat conftest.er1 >&5
2432    mv -f conftest.er1 conftest.err
2433  fi
2434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2435  test $ac_status = 0; } && {
2436	 test -z "$ac_c_werror_flag" ||
2437	 test ! -s conftest.err
2438       } && test -s conftest.$ac_objext; then :
2439  ac_retval=0
2440else
2441  $as_echo "$as_me: failed program was:" >&5
2442sed 's/^/| /' conftest.$ac_ext >&5
2443
2444	ac_retval=1
2445fi
2446  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2447  as_fn_set_status $ac_retval
2448
2449} # ac_fn_c_try_compile
2450
2451# ac_fn_cxx_try_compile LINENO
2452# ----------------------------
2453# Try to compile conftest.$ac_ext, and return whether this succeeded.
2454ac_fn_cxx_try_compile ()
2455{
2456  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457  rm -f conftest.$ac_objext
2458  if { { ac_try="$ac_compile"
2459case "(($ac_try" in
2460  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2461  *) ac_try_echo=$ac_try;;
2462esac
2463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2464$as_echo "$ac_try_echo"; } >&5
2465  (eval "$ac_compile") 2>conftest.err
2466  ac_status=$?
2467  if test -s conftest.err; then
2468    grep -v '^ *+' conftest.err >conftest.er1
2469    cat conftest.er1 >&5
2470    mv -f conftest.er1 conftest.err
2471  fi
2472  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2473  test $ac_status = 0; } && {
2474	 test -z "$ac_cxx_werror_flag" ||
2475	 test ! -s conftest.err
2476       } && test -s conftest.$ac_objext; then :
2477  ac_retval=0
2478else
2479  $as_echo "$as_me: failed program was:" >&5
2480sed 's/^/| /' conftest.$ac_ext >&5
2481
2482	ac_retval=1
2483fi
2484  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2485  as_fn_set_status $ac_retval
2486
2487} # ac_fn_cxx_try_compile
2488
2489# ac_fn_c_try_cpp LINENO
2490# ----------------------
2491# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2492ac_fn_c_try_cpp ()
2493{
2494  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2495  if { { ac_try="$ac_cpp conftest.$ac_ext"
2496case "(($ac_try" in
2497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498  *) ac_try_echo=$ac_try;;
2499esac
2500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501$as_echo "$ac_try_echo"; } >&5
2502  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2503  ac_status=$?
2504  if test -s conftest.err; then
2505    grep -v '^ *+' conftest.err >conftest.er1
2506    cat conftest.er1 >&5
2507    mv -f conftest.er1 conftest.err
2508  fi
2509  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510  test $ac_status = 0; } > conftest.i && {
2511	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2512	 test ! -s conftest.err
2513       }; then :
2514  ac_retval=0
2515else
2516  $as_echo "$as_me: failed program was:" >&5
2517sed 's/^/| /' conftest.$ac_ext >&5
2518
2519    ac_retval=1
2520fi
2521  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2522  as_fn_set_status $ac_retval
2523
2524} # ac_fn_c_try_cpp
2525
2526# ac_fn_cxx_try_cpp LINENO
2527# ------------------------
2528# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2529ac_fn_cxx_try_cpp ()
2530{
2531  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2532  if { { ac_try="$ac_cpp conftest.$ac_ext"
2533case "(($ac_try" in
2534  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535  *) ac_try_echo=$ac_try;;
2536esac
2537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2538$as_echo "$ac_try_echo"; } >&5
2539  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2540  ac_status=$?
2541  if test -s conftest.err; then
2542    grep -v '^ *+' conftest.err >conftest.er1
2543    cat conftest.er1 >&5
2544    mv -f conftest.er1 conftest.err
2545  fi
2546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2547  test $ac_status = 0; } > conftest.i && {
2548	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2549	 test ! -s conftest.err
2550       }; then :
2551  ac_retval=0
2552else
2553  $as_echo "$as_me: failed program was:" >&5
2554sed 's/^/| /' conftest.$ac_ext >&5
2555
2556    ac_retval=1
2557fi
2558  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2559  as_fn_set_status $ac_retval
2560
2561} # ac_fn_cxx_try_cpp
2562
2563# ac_fn_c_try_link LINENO
2564# -----------------------
2565# Try to link conftest.$ac_ext, and return whether this succeeded.
2566ac_fn_c_try_link ()
2567{
2568  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2569  rm -f conftest.$ac_objext conftest$ac_exeext
2570  if { { ac_try="$ac_link"
2571case "(($ac_try" in
2572  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2573  *) ac_try_echo=$ac_try;;
2574esac
2575eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2576$as_echo "$ac_try_echo"; } >&5
2577  (eval "$ac_link") 2>conftest.err
2578  ac_status=$?
2579  if test -s conftest.err; then
2580    grep -v '^ *+' conftest.err >conftest.er1
2581    cat conftest.er1 >&5
2582    mv -f conftest.er1 conftest.err
2583  fi
2584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2585  test $ac_status = 0; } && {
2586	 test -z "$ac_c_werror_flag" ||
2587	 test ! -s conftest.err
2588       } && test -s conftest$ac_exeext && {
2589	 test "$cross_compiling" = yes ||
2590	 test -x conftest$ac_exeext
2591       }; then :
2592  ac_retval=0
2593else
2594  $as_echo "$as_me: failed program was:" >&5
2595sed 's/^/| /' conftest.$ac_ext >&5
2596
2597	ac_retval=1
2598fi
2599  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2600  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2601  # interfere with the next link command; also delete a directory that is
2602  # left behind by Apple's compiler.  We do this before executing the actions.
2603  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2604  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2605  as_fn_set_status $ac_retval
2606
2607} # ac_fn_c_try_link
2608
2609# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2610# ---------------------------------------------------------
2611# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2612# the include files in INCLUDES and setting the cache variable VAR
2613# accordingly.
2614ac_fn_cxx_check_header_mongrel ()
2615{
2616  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2617  if eval \${$3+:} false; then :
2618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2619$as_echo_n "checking for $2... " >&6; }
2620if eval \${$3+:} false; then :
2621  $as_echo_n "(cached) " >&6
2622fi
2623eval ac_res=\$$3
2624	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2625$as_echo "$ac_res" >&6; }
2626else
2627  # Is the header compilable?
2628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2629$as_echo_n "checking $2 usability... " >&6; }
2630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631/* end confdefs.h.  */
2632$4
2633#include <$2>
2634_ACEOF
2635if ac_fn_cxx_try_compile "$LINENO"; then :
2636  ac_header_compiler=yes
2637else
2638  ac_header_compiler=no
2639fi
2640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2642$as_echo "$ac_header_compiler" >&6; }
2643
2644# Is the header present?
2645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2646$as_echo_n "checking $2 presence... " >&6; }
2647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2648/* end confdefs.h.  */
2649#include <$2>
2650_ACEOF
2651if ac_fn_cxx_try_cpp "$LINENO"; then :
2652  ac_header_preproc=yes
2653else
2654  ac_header_preproc=no
2655fi
2656rm -f conftest.err conftest.i conftest.$ac_ext
2657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2658$as_echo "$ac_header_preproc" >&6; }
2659
2660# So?  What about this header?
2661case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2662  yes:no: )
2663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2664$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2666$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2667    ;;
2668  no:yes:* )
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2670$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2672$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2674$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2675    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2676$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2677    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2678$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2679( $as_echo "## ----------------------------------------- ##
2680## Report this to build-dev@openjdk.java.net ##
2681## ----------------------------------------- ##"
2682     ) | sed "s/^/$as_me: WARNING:     /" >&2
2683    ;;
2684esac
2685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2686$as_echo_n "checking for $2... " >&6; }
2687if eval \${$3+:} false; then :
2688  $as_echo_n "(cached) " >&6
2689else
2690  eval "$3=\$ac_header_compiler"
2691fi
2692eval ac_res=\$$3
2693	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2694$as_echo "$ac_res" >&6; }
2695fi
2696  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2697
2698} # ac_fn_cxx_check_header_mongrel
2699
2700# ac_fn_cxx_try_run LINENO
2701# ------------------------
2702# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2703# that executables *can* be run.
2704ac_fn_cxx_try_run ()
2705{
2706  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2707  if { { ac_try="$ac_link"
2708case "(($ac_try" in
2709  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2710  *) ac_try_echo=$ac_try;;
2711esac
2712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2713$as_echo "$ac_try_echo"; } >&5
2714  (eval "$ac_link") 2>&5
2715  ac_status=$?
2716  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2717  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2718  { { case "(($ac_try" in
2719  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2720  *) ac_try_echo=$ac_try;;
2721esac
2722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2723$as_echo "$ac_try_echo"; } >&5
2724  (eval "$ac_try") 2>&5
2725  ac_status=$?
2726  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2727  test $ac_status = 0; }; }; then :
2728  ac_retval=0
2729else
2730  $as_echo "$as_me: program exited with status $ac_status" >&5
2731       $as_echo "$as_me: failed program was:" >&5
2732sed 's/^/| /' conftest.$ac_ext >&5
2733
2734       ac_retval=$ac_status
2735fi
2736  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2737  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2738  as_fn_set_status $ac_retval
2739
2740} # ac_fn_cxx_try_run
2741
2742# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2743# ---------------------------------------------------------
2744# Tests whether HEADER exists and can be compiled using the include files in
2745# INCLUDES, setting the cache variable VAR accordingly.
2746ac_fn_cxx_check_header_compile ()
2747{
2748  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2750$as_echo_n "checking for $2... " >&6; }
2751if eval \${$3+:} false; then :
2752  $as_echo_n "(cached) " >&6
2753else
2754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2755/* end confdefs.h.  */
2756$4
2757#include <$2>
2758_ACEOF
2759if ac_fn_cxx_try_compile "$LINENO"; then :
2760  eval "$3=yes"
2761else
2762  eval "$3=no"
2763fi
2764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2765fi
2766eval ac_res=\$$3
2767	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2768$as_echo "$ac_res" >&6; }
2769  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2770
2771} # ac_fn_cxx_check_header_compile
2772
2773# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2774# ----------------------------------------------
2775# Tries to find the compile-time value of EXPR in a program that includes
2776# INCLUDES, setting VAR accordingly. Returns whether the value could be
2777# computed
2778ac_fn_cxx_compute_int ()
2779{
2780  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2781  if test "$cross_compiling" = yes; then
2782    # Depending upon the size, compute the lo and hi bounds.
2783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2784/* end confdefs.h.  */
2785$4
2786int
2787main ()
2788{
2789static int test_array [1 - 2 * !(($2) >= 0)];
2790test_array [0] = 0;
2791return test_array [0];
2792
2793  ;
2794  return 0;
2795}
2796_ACEOF
2797if ac_fn_cxx_try_compile "$LINENO"; then :
2798  ac_lo=0 ac_mid=0
2799  while :; do
2800    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h.  */
2802$4
2803int
2804main ()
2805{
2806static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2807test_array [0] = 0;
2808return test_array [0];
2809
2810  ;
2811  return 0;
2812}
2813_ACEOF
2814if ac_fn_cxx_try_compile "$LINENO"; then :
2815  ac_hi=$ac_mid; break
2816else
2817  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2818			if test $ac_lo -le $ac_mid; then
2819			  ac_lo= ac_hi=
2820			  break
2821			fi
2822			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2823fi
2824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2825  done
2826else
2827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2828/* end confdefs.h.  */
2829$4
2830int
2831main ()
2832{
2833static int test_array [1 - 2 * !(($2) < 0)];
2834test_array [0] = 0;
2835return test_array [0];
2836
2837  ;
2838  return 0;
2839}
2840_ACEOF
2841if ac_fn_cxx_try_compile "$LINENO"; then :
2842  ac_hi=-1 ac_mid=-1
2843  while :; do
2844    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2845/* end confdefs.h.  */
2846$4
2847int
2848main ()
2849{
2850static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2851test_array [0] = 0;
2852return test_array [0];
2853
2854  ;
2855  return 0;
2856}
2857_ACEOF
2858if ac_fn_cxx_try_compile "$LINENO"; then :
2859  ac_lo=$ac_mid; break
2860else
2861  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2862			if test $ac_mid -le $ac_hi; then
2863			  ac_lo= ac_hi=
2864			  break
2865			fi
2866			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2867fi
2868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2869  done
2870else
2871  ac_lo= ac_hi=
2872fi
2873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2874fi
2875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2876# Binary search between lo and hi bounds.
2877while test "x$ac_lo" != "x$ac_hi"; do
2878  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880/* end confdefs.h.  */
2881$4
2882int
2883main ()
2884{
2885static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2886test_array [0] = 0;
2887return test_array [0];
2888
2889  ;
2890  return 0;
2891}
2892_ACEOF
2893if ac_fn_cxx_try_compile "$LINENO"; then :
2894  ac_hi=$ac_mid
2895else
2896  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899done
2900case $ac_lo in #((
2901?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2902'') ac_retval=1 ;;
2903esac
2904  else
2905    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2906/* end confdefs.h.  */
2907$4
2908static long int longval () { return $2; }
2909static unsigned long int ulongval () { return $2; }
2910#include <stdio.h>
2911#include <stdlib.h>
2912int
2913main ()
2914{
2915
2916  FILE *f = fopen ("conftest.val", "w");
2917  if (! f)
2918    return 1;
2919  if (($2) < 0)
2920    {
2921      long int i = longval ();
2922      if (i != ($2))
2923	return 1;
2924      fprintf (f, "%ld", i);
2925    }
2926  else
2927    {
2928      unsigned long int i = ulongval ();
2929      if (i != ($2))
2930	return 1;
2931      fprintf (f, "%lu", i);
2932    }
2933  /* Do not output a trailing newline, as this causes \r\n confusion
2934     on some platforms.  */
2935  return ferror (f) || fclose (f) != 0;
2936
2937  ;
2938  return 0;
2939}
2940_ACEOF
2941if ac_fn_cxx_try_run "$LINENO"; then :
2942  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2943else
2944  ac_retval=1
2945fi
2946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2947  conftest.$ac_objext conftest.beam conftest.$ac_ext
2948rm -f conftest.val
2949
2950  fi
2951  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2952  as_fn_set_status $ac_retval
2953
2954} # ac_fn_cxx_compute_int
2955
2956# ac_fn_cxx_try_link LINENO
2957# -------------------------
2958# Try to link conftest.$ac_ext, and return whether this succeeded.
2959ac_fn_cxx_try_link ()
2960{
2961  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2962  rm -f conftest.$ac_objext conftest$ac_exeext
2963  if { { ac_try="$ac_link"
2964case "(($ac_try" in
2965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2966  *) ac_try_echo=$ac_try;;
2967esac
2968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2969$as_echo "$ac_try_echo"; } >&5
2970  (eval "$ac_link") 2>conftest.err
2971  ac_status=$?
2972  if test -s conftest.err; then
2973    grep -v '^ *+' conftest.err >conftest.er1
2974    cat conftest.er1 >&5
2975    mv -f conftest.er1 conftest.err
2976  fi
2977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2978  test $ac_status = 0; } && {
2979	 test -z "$ac_cxx_werror_flag" ||
2980	 test ! -s conftest.err
2981       } && test -s conftest$ac_exeext && {
2982	 test "$cross_compiling" = yes ||
2983	 test -x conftest$ac_exeext
2984       }; then :
2985  ac_retval=0
2986else
2987  $as_echo "$as_me: failed program was:" >&5
2988sed 's/^/| /' conftest.$ac_ext >&5
2989
2990	ac_retval=1
2991fi
2992  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2993  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2994  # interfere with the next link command; also delete a directory that is
2995  # left behind by Apple's compiler.  We do this before executing the actions.
2996  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2997  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2998  as_fn_set_status $ac_retval
2999
3000} # ac_fn_cxx_try_link
3001
3002# ac_fn_cxx_check_func LINENO FUNC VAR
3003# ------------------------------------
3004# Tests whether FUNC exists, setting the cache variable VAR accordingly
3005ac_fn_cxx_check_func ()
3006{
3007  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3009$as_echo_n "checking for $2... " >&6; }
3010if eval \${$3+:} false; then :
3011  $as_echo_n "(cached) " >&6
3012else
3013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3014/* end confdefs.h.  */
3015/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3016   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3017#define $2 innocuous_$2
3018
3019/* System header to define __stub macros and hopefully few prototypes,
3020    which can conflict with char $2 (); below.
3021    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3022    <limits.h> exists even on freestanding compilers.  */
3023
3024#ifdef __STDC__
3025# include <limits.h>
3026#else
3027# include <assert.h>
3028#endif
3029
3030#undef $2
3031
3032/* Override any GCC internal prototype to avoid an error.
3033   Use char because int might match the return type of a GCC
3034   builtin and then its argument prototype would still apply.  */
3035#ifdef __cplusplus
3036extern "C"
3037#endif
3038char $2 ();
3039/* The GNU C library defines this for functions which it implements
3040    to always fail with ENOSYS.  Some functions are actually named
3041    something starting with __ and the normal name is an alias.  */
3042#if defined __stub_$2 || defined __stub___$2
3043choke me
3044#endif
3045
3046int
3047main ()
3048{
3049return $2 ();
3050  ;
3051  return 0;
3052}
3053_ACEOF
3054if ac_fn_cxx_try_link "$LINENO"; then :
3055  eval "$3=yes"
3056else
3057  eval "$3=no"
3058fi
3059rm -f core conftest.err conftest.$ac_objext \
3060    conftest$ac_exeext conftest.$ac_ext
3061fi
3062eval ac_res=\$$3
3063	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3064$as_echo "$ac_res" >&6; }
3065  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3066
3067} # ac_fn_cxx_check_func
3068
3069# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3070# -------------------------------------------------------
3071# Tests whether HEADER exists and can be compiled using the include files in
3072# INCLUDES, setting the cache variable VAR accordingly.
3073ac_fn_c_check_header_compile ()
3074{
3075  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3077$as_echo_n "checking for $2... " >&6; }
3078if eval \${$3+:} false; then :
3079  $as_echo_n "(cached) " >&6
3080else
3081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3082/* end confdefs.h.  */
3083$4
3084#include <$2>
3085_ACEOF
3086if ac_fn_c_try_compile "$LINENO"; then :
3087  eval "$3=yes"
3088else
3089  eval "$3=no"
3090fi
3091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3092fi
3093eval ac_res=\$$3
3094	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3095$as_echo "$ac_res" >&6; }
3096  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3097
3098} # ac_fn_c_check_header_compile
3099cat >config.log <<_ACEOF
3100This file contains any messages produced by compilers while
3101running configure, to aid debugging if configure makes a mistake.
3102
3103It was created by OpenJDK $as_me jdk9, which was
3104generated by GNU Autoconf 2.69.  Invocation command line was
3105
3106  $ $0 $@
3107
3108_ACEOF
3109exec 5>>config.log
3110{
3111cat <<_ASUNAME
3112## --------- ##
3113## Platform. ##
3114## --------- ##
3115
3116hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3117uname -m = `(uname -m) 2>/dev/null || echo unknown`
3118uname -r = `(uname -r) 2>/dev/null || echo unknown`
3119uname -s = `(uname -s) 2>/dev/null || echo unknown`
3120uname -v = `(uname -v) 2>/dev/null || echo unknown`
3121
3122/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3123/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3124
3125/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3126/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3127/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3128/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3129/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3130/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3131/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3132
3133_ASUNAME
3134
3135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3136for as_dir in $PATH
3137do
3138  IFS=$as_save_IFS
3139  test -z "$as_dir" && as_dir=.
3140    $as_echo "PATH: $as_dir"
3141  done
3142IFS=$as_save_IFS
3143
3144} >&5
3145
3146cat >&5 <<_ACEOF
3147
3148
3149## ----------- ##
3150## Core tests. ##
3151## ----------- ##
3152
3153_ACEOF
3154
3155
3156# Keep a trace of the command line.
3157# Strip out --no-create and --no-recursion so they do not pile up.
3158# Strip out --silent because we don't want to record it for future runs.
3159# Also quote any args containing shell meta-characters.
3160# Make two passes to allow for proper duplicate-argument suppression.
3161ac_configure_args=
3162ac_configure_args0=
3163ac_configure_args1=
3164ac_must_keep_next=false
3165for ac_pass in 1 2
3166do
3167  for ac_arg
3168  do
3169    case $ac_arg in
3170    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3171    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3172    | -silent | --silent | --silen | --sile | --sil)
3173      continue ;;
3174    *\'*)
3175      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3176    esac
3177    case $ac_pass in
3178    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3179    2)
3180      as_fn_append ac_configure_args1 " '$ac_arg'"
3181      if test $ac_must_keep_next = true; then
3182	ac_must_keep_next=false # Got value, back to normal.
3183      else
3184	case $ac_arg in
3185	  *=* | --config-cache | -C | -disable-* | --disable-* \
3186	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3187	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3188	  | -with-* | --with-* | -without-* | --without-* | --x)
3189	    case "$ac_configure_args0 " in
3190	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3191	    esac
3192	    ;;
3193	  -* ) ac_must_keep_next=true ;;
3194	esac
3195      fi
3196      as_fn_append ac_configure_args " '$ac_arg'"
3197      ;;
3198    esac
3199  done
3200done
3201{ ac_configure_args0=; unset ac_configure_args0;}
3202{ ac_configure_args1=; unset ac_configure_args1;}
3203
3204# When interrupted or exit'd, cleanup temporary files, and complete
3205# config.log.  We remove comments because anyway the quotes in there
3206# would cause problems or look ugly.
3207# WARNING: Use '\'' to represent an apostrophe within the trap.
3208# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3209trap 'exit_status=$?
3210  # Save into config.log some information that might help in debugging.
3211  {
3212    echo
3213
3214    $as_echo "## ---------------- ##
3215## Cache variables. ##
3216## ---------------- ##"
3217    echo
3218    # The following way of writing the cache mishandles newlines in values,
3219(
3220  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3221    eval ac_val=\$$ac_var
3222    case $ac_val in #(
3223    *${as_nl}*)
3224      case $ac_var in #(
3225      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3226$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3227      esac
3228      case $ac_var in #(
3229      _ | IFS | as_nl) ;; #(
3230      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3231      *) { eval $ac_var=; unset $ac_var;} ;;
3232      esac ;;
3233    esac
3234  done
3235  (set) 2>&1 |
3236    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3237    *${as_nl}ac_space=\ *)
3238      sed -n \
3239	"s/'\''/'\''\\\\'\'''\''/g;
3240	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3241      ;; #(
3242    *)
3243      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3244      ;;
3245    esac |
3246    sort
3247)
3248    echo
3249
3250    $as_echo "## ----------------- ##
3251## Output variables. ##
3252## ----------------- ##"
3253    echo
3254    for ac_var in $ac_subst_vars
3255    do
3256      eval ac_val=\$$ac_var
3257      case $ac_val in
3258      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3259      esac
3260      $as_echo "$ac_var='\''$ac_val'\''"
3261    done | sort
3262    echo
3263
3264    if test -n "$ac_subst_files"; then
3265      $as_echo "## ------------------- ##
3266## File substitutions. ##
3267## ------------------- ##"
3268      echo
3269      for ac_var in $ac_subst_files
3270      do
3271	eval ac_val=\$$ac_var
3272	case $ac_val in
3273	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3274	esac
3275	$as_echo "$ac_var='\''$ac_val'\''"
3276      done | sort
3277      echo
3278    fi
3279
3280    if test -s confdefs.h; then
3281      $as_echo "## ----------- ##
3282## confdefs.h. ##
3283## ----------- ##"
3284      echo
3285      cat confdefs.h
3286      echo
3287    fi
3288    test "$ac_signal" != 0 &&
3289      $as_echo "$as_me: caught signal $ac_signal"
3290    $as_echo "$as_me: exit $exit_status"
3291  } >&5
3292  rm -f core *.core core.conftest.* &&
3293    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3294    exit $exit_status
3295' 0
3296for ac_signal in 1 2 13 15; do
3297  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3298done
3299ac_signal=0
3300
3301# confdefs.h avoids OS command line length limits that DEFS can exceed.
3302rm -f -r conftest* confdefs.h
3303
3304$as_echo "/* confdefs.h */" > confdefs.h
3305
3306# Predefined preprocessor variables.
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_NAME "$PACKAGE_NAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_VERSION "$PACKAGE_VERSION"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_STRING "$PACKAGE_STRING"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3326_ACEOF
3327
3328cat >>confdefs.h <<_ACEOF
3329#define PACKAGE_URL "$PACKAGE_URL"
3330_ACEOF
3331
3332
3333# Let the site file select an alternate cache file if it wants to.
3334# Prefer an explicitly selected file to automatically selected ones.
3335ac_site_file1=NONE
3336ac_site_file2=NONE
3337if test -n "$CONFIG_SITE"; then
3338  # We do not want a PATH search for config.site.
3339  case $CONFIG_SITE in #((
3340    -*)  ac_site_file1=./$CONFIG_SITE;;
3341    */*) ac_site_file1=$CONFIG_SITE;;
3342    *)   ac_site_file1=./$CONFIG_SITE;;
3343  esac
3344elif test "x$prefix" != xNONE; then
3345  ac_site_file1=$prefix/share/config.site
3346  ac_site_file2=$prefix/etc/config.site
3347else
3348  ac_site_file1=$ac_default_prefix/share/config.site
3349  ac_site_file2=$ac_default_prefix/etc/config.site
3350fi
3351for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3352do
3353  test "x$ac_site_file" = xNONE && continue
3354  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3355    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3356$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3357    sed 's/^/| /' "$ac_site_file" >&5
3358    . "$ac_site_file" \
3359      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3361as_fn_error $? "failed to load site script $ac_site_file
3362See \`config.log' for more details" "$LINENO" 5; }
3363  fi
3364done
3365
3366if test -r "$cache_file"; then
3367  # Some versions of bash will fail to source /dev/null (special files
3368  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3369  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3370    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3371$as_echo "$as_me: loading cache $cache_file" >&6;}
3372    case $cache_file in
3373      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3374      *)                      . "./$cache_file";;
3375    esac
3376  fi
3377else
3378  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3379$as_echo "$as_me: creating cache $cache_file" >&6;}
3380  >$cache_file
3381fi
3382
3383# Check that the precious variables saved in the cache have kept the same
3384# value.
3385ac_cache_corrupted=false
3386for ac_var in $ac_precious_vars; do
3387  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3388  eval ac_new_set=\$ac_env_${ac_var}_set
3389  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3390  eval ac_new_val=\$ac_env_${ac_var}_value
3391  case $ac_old_set,$ac_new_set in
3392    set,)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,set)
3397      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3398$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3399      ac_cache_corrupted=: ;;
3400    ,);;
3401    *)
3402      if test "x$ac_old_val" != "x$ac_new_val"; then
3403	# differences in whitespace do not lead to failure.
3404	ac_old_val_w=`echo x $ac_old_val`
3405	ac_new_val_w=`echo x $ac_new_val`
3406	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3408$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3409	  ac_cache_corrupted=:
3410	else
3411	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3412$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3413	  eval $ac_var=\$ac_old_val
3414	fi
3415	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3416$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3417	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3418$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3419      fi;;
3420  esac
3421  # Pass precious variables to config.status.
3422  if test "$ac_new_set" = set; then
3423    case $ac_new_val in
3424    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3425    *) ac_arg=$ac_var=$ac_new_val ;;
3426    esac
3427    case " $ac_configure_args " in
3428      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3429      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3430    esac
3431  fi
3432done
3433if $ac_cache_corrupted; then
3434  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3436  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3437$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3438  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3439fi
3440## -------------------- ##
3441## Main body of script. ##
3442## -------------------- ##
3443
3444ac_ext=c
3445ac_cpp='$CPP $CPPFLAGS'
3446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3448ac_compiler_gnu=$ac_cv_c_compiler_gnu
3449
3450
3451
3452ac_aux_dir=
3453for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3454  if test -f "$ac_dir/install-sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install-sh -c"
3457    break
3458  elif test -f "$ac_dir/install.sh"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/install.sh -c"
3461    break
3462  elif test -f "$ac_dir/shtool"; then
3463    ac_aux_dir=$ac_dir
3464    ac_install_sh="$ac_aux_dir/shtool install -c"
3465    break
3466  fi
3467done
3468if test -z "$ac_aux_dir"; then
3469  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
3470fi
3471
3472# These three variables are undocumented and unsupported,
3473# and are intended to be withdrawn in a future Autoconf release.
3474# They can cause serious problems if a builder's source tree is in a directory
3475# whose full name contains unusual characters.
3476ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3477ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3478ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3479
3480
3481# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3482
3483#
3484# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508#
3509# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3510#
3511# This program is free software; you can redistribute it and/or modify
3512# it under the terms of the GNU General Public License as published by
3513# the Free Software Foundation; either version 2 of the License, or
3514# (at your option) any later version.
3515#
3516# This program is distributed in the hope that it will be useful, but
3517# WITHOUT ANY WARRANTY; without even the implied warranty of
3518# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3519# General Public License for more details.
3520#
3521# You should have received a copy of the GNU General Public License
3522# along with this program; if not, write to the Free Software
3523# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3524#
3525# As a special exception to the GNU General Public License, if you
3526# distribute this file as part of a program that contains a
3527# configuration script generated by Autoconf, you may include it under
3528# the same distribution terms that you use for the rest of that program.
3529
3530# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3531# ----------------------------------
3532# PKG_PROG_PKG_CONFIG
3533
3534# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3535#
3536# Check to see whether a particular set of modules exists.  Similar
3537# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3538#
3539#
3540# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3541# this or PKG_CHECK_MODULES is called, or make sure to call
3542# PKG_CHECK_EXISTS manually
3543# --------------------------------------------------------------
3544
3545
3546
3547# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3548# ---------------------------------------------
3549# _PKG_CONFIG
3550
3551# _PKG_SHORT_ERRORS_SUPPORTED
3552# -----------------------------
3553# _PKG_SHORT_ERRORS_SUPPORTED
3554
3555
3556# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3557# [ACTION-IF-NOT-FOUND])
3558#
3559#
3560# Note that if there is a possibility the first call to
3561# PKG_CHECK_MODULES might not happen, you should be sure to include an
3562# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3563#
3564#
3565# --------------------------------------------------------------
3566# PKG_CHECK_MODULES
3567
3568
3569# Include these first...
3570#
3571# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3572# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3573#
3574# This code is free software; you can redistribute it and/or modify it
3575# under the terms of the GNU General Public License version 2 only, as
3576# published by the Free Software Foundation.  Oracle designates this
3577# particular file as subject to the "Classpath" exception as provided
3578# by Oracle in the LICENSE file that accompanied this code.
3579#
3580# This code is distributed in the hope that it will be useful, but WITHOUT
3581# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3582# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3583# version 2 for more details (a copy is included in the LICENSE file that
3584# accompanied this code).
3585#
3586# You should have received a copy of the GNU General Public License version
3587# 2 along with this work; if not, write to the Free Software Foundation,
3588# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3589#
3590# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3591# or visit www.oracle.com if you need additional information or have any
3592# questions.
3593#
3594
3595# Create a function/macro that takes a series of named arguments. The call is
3596# similar to AC_DEFUN, but the setup of the function looks like this:
3597# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3598# ... do something
3599#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3600# ])
3601# A star (*) in front of a named argument means that it is required and it's
3602# presence will be verified. To pass e.g. the first value as a normal indexed
3603# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3604# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3605# "ARG_FOO".
3606#
3607# The generated function can be called like this:
3608# MYFUNC(FOO: [foo-val],
3609#     BAR: [
3610#         $ECHO hello world
3611#     ])
3612# Note that the argument value must start on the same line as the argument name.
3613#
3614# Argument 1: Name of the function to define
3615# Argument 2: List of legal named arguments, with a * prefix for required arguments
3616# Argument 3: Argument array to treat as named, typically $@
3617# Argument 4: The main function body
3618
3619
3620# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3621# If so, then append $1 to $2 \
3622# Also set JVM_ARG_OK to true/false depending on outcome.
3623
3624
3625# Appends a string to a path variable, only adding the : when needed.
3626
3627
3628# Prepends a string to a path variable, only adding the : when needed.
3629
3630
3631# This will make sure the given variable points to a full and proper
3632# path. This means:
3633# 1) There will be no spaces in the path. On unix platforms,
3634#    spaces in the path will result in an error. On Windows,
3635#    the path will be rewritten using short-style to be space-free.
3636# 2) The path will be absolute, and it will be in unix-style (on
3637#     cygwin).
3638# $1: The name of the variable to fix
3639
3640
3641# This will make sure the given variable points to a executable
3642# with a full and proper path. This means:
3643# 1) There will be no spaces in the path. On unix platforms,
3644#    spaces in the path will result in an error. On Windows,
3645#    the path will be rewritten using short-style to be space-free.
3646# 2) The path will be absolute, and it will be in unix-style (on
3647#     cygwin).
3648# Any arguments given to the executable is preserved.
3649# If the input variable does not have a directory specification, then
3650# it need to be in the PATH.
3651# $1: The name of the variable to fix
3652
3653
3654
3655
3656# Register a --with argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --with-
3658
3659
3660# Register a --enable argument but mark it as deprecated
3661# $1: The name of the with argument to deprecate, not including --enable-
3662# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3663# $3: Messages to user.
3664
3665
3666
3667
3668# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3669# $1: variable to check
3670
3671
3672# Check that there are no unprocessed overridden variables left.
3673# If so, they are an incorrect argument and we will exit with an error.
3674
3675
3676# Setup a tool for the given variable. If correctly specified by the user,
3677# use that value, otherwise search for the tool using the supplied code snippet.
3678# $1: variable to set
3679# $2: code snippet to call to look for the tool
3680# $3: code snippet to call if variable was used to find tool
3681
3682
3683# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3684# $1: variable to set
3685# $2: executable name (or list of names) to look for
3686# $3: [path]
3687
3688
3689# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3690# $1: variable to set
3691# $2: executable name (or list of names) to look for
3692
3693
3694# Like BASIC_PATH_PROGS but fails if no tool was found.
3695# $1: variable to set
3696# $2: executable name (or list of names) to look for
3697# $3: [path]
3698
3699
3700# Like BASIC_SETUP_TOOL but fails if no tool was found.
3701# $1: variable to set
3702# $2: autoconf macro to call to look for the special tool
3703
3704
3705# Setup the most fundamental tools that relies on not much else to set up,
3706# but is used by much of the early bootstrap code.
3707
3708
3709# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3710
3711
3712# Evaluates platform specific overrides for devkit variables.
3713# $1: Name of variable
3714
3715
3716
3717
3718
3719
3720#%%% Simple tools %%%
3721
3722# Check if we have found a usable version of make
3723# $1: the path to a potential make binary (or empty)
3724# $2: the description on how we found this
3725
3726
3727
3728
3729# Goes looking for a usable version of GNU make.
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740# Check if build directory is on local disk. If not possible to determine,
3741# we prefer to claim it's local.
3742# Argument 1: directory to test
3743# Argument 2: what to do if it is on local disk
3744# Argument 3: what to do otherwise (remote disk or failure)
3745
3746
3747# Check that source files have basic read permissions set. This might
3748# not be the case in cygwin in certain conditions.
3749
3750
3751
3752
3753# Check for support for specific options in bash
3754
3755
3756################################################################################
3757#
3758# Default make target
3759#
3760
3761
3762# Code to run after AC_OUTPUT
3763
3764
3765#
3766# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3767# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3768#
3769# This code is free software; you can redistribute it and/or modify it
3770# under the terms of the GNU General Public License version 2 only, as
3771# published by the Free Software Foundation.  Oracle designates this
3772# particular file as subject to the "Classpath" exception as provided
3773# by Oracle in the LICENSE file that accompanied this code.
3774#
3775# This code is distributed in the hope that it will be useful, but WITHOUT
3776# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3777# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3778# version 2 for more details (a copy is included in the LICENSE file that
3779# accompanied this code).
3780#
3781# You should have received a copy of the GNU General Public License version
3782# 2 along with this work; if not, write to the Free Software Foundation,
3783# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3784#
3785# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3786# or visit www.oracle.com if you need additional information or have any
3787# questions.
3788#
3789
3790
3791
3792
3793
3794# Helper function which possibly converts a path using DOS-style short mode.
3795# If so, the updated path is stored in $new_path.
3796# $1: The path to check
3797
3798
3799# Helper function which possibly converts a path using DOS-style short mode.
3800# If so, the updated path is stored in $new_path.
3801# $1: The path to check
3802
3803
3804# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3805# and could probably be heavily simplified. However, all changes in this
3806# area tend to need lot of testing in different scenarios, and in lack of
3807# proper unit testing, cleaning this up has not been deemed worth the effort
3808# at the moment.
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3819
3820
3821
3822
3823# ... then the rest
3824#
3825# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3826# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3827#
3828# This code is free software; you can redistribute it and/or modify it
3829# under the terms of the GNU General Public License version 2 only, as
3830# published by the Free Software Foundation.  Oracle designates this
3831# particular file as subject to the "Classpath" exception as provided
3832# by Oracle in the LICENSE file that accompanied this code.
3833#
3834# This code is distributed in the hope that it will be useful, but WITHOUT
3835# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3836# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3837# version 2 for more details (a copy is included in the LICENSE file that
3838# accompanied this code).
3839#
3840# You should have received a copy of the GNU General Public License version
3841# 2 along with this work; if not, write to the Free Software Foundation,
3842# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3843#
3844# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3845# or visit www.oracle.com if you need additional information or have any
3846# questions.
3847#
3848
3849########################################################################
3850# This file handles detection of the Boot JDK. The Boot JDK detection
3851# process has been developed as a response to solve a complex real-world
3852# problem. Initially, it was simple, but it has grown as platform after
3853# platform, idiosyncracy after idiosyncracy has been supported.
3854#
3855# The basic idea is this:
3856# 1) You need an acceptable *) JDK to use as a Boot JDK
3857# 2) There are several ways to locate a JDK, that are mostly platform
3858#    dependent **)
3859# 3) You can have multiple JDKs installed
3860# 4) If possible, configure should try to dig out an acceptable JDK
3861#    automatically, without having to resort to command-line options
3862#
3863# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3864#     javac) and not a JRE, etc.
3865#
3866# **) On Windows we typically use a well-known path.
3867#     On MacOSX we typically use the tool java_home.
3868#     On Linux we typically find javac in the $PATH, and then follow a
3869#     chain of symlinks that often ends up in a real JDK.
3870#
3871# This leads to the code where we check in different ways to locate a
3872# JDK, and if one is found, check if it is acceptable. If not, we print
3873# our reasons for rejecting it (useful when debugging non-working
3874# configure situations) and continue checking the next one.
3875########################################################################
3876
3877# Execute the check given as argument, and verify the result
3878# If the Boot JDK was previously found, do nothing
3879# $1 A command line (typically autoconf macro) to execute
3880
3881
3882# Test: Is bootjdk explicitly set by command line arguments?
3883
3884
3885# Test: Is $JAVA_HOME set?
3886
3887
3888# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3889
3890
3891# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3892# $1: Argument to the java_home binary (optional)
3893
3894
3895# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3896
3897
3898# Look for a jdk in the given path. If there are multiple, try to select the newest.
3899# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3900# $1 = Path to directory containing jdk installations.
3901# $2 = String to append to the found JDK directory to get the proper JDK home
3902
3903
3904# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3905# environmental variable as base for where to look.
3906# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3907
3908
3909# Test: Is there a JDK installed in default, well-known locations?
3910
3911
3912# Check that a command-line tool in the Boot JDK is correct
3913# $1 = name of variable to assign
3914# $2 = name of binary
3915
3916
3917###############################################################################
3918#
3919# We need a Boot JDK to bootstrap the build.
3920#
3921
3922
3923
3924
3925
3926# BUILD_JDK: the location of the latest JDK that can run
3927#   on the host system and supports the target class file version
3928#   generated in this JDK build.  This variable should only be
3929#   used after the launchers are built.
3930#
3931
3932# Execute the check given as argument, and verify the result.
3933# If the JDK was previously found, do nothing.
3934# $1 A command line (typically autoconf macro) to execute
3935
3936
3937# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3938# is different than the host system doing the build (e.g. cross-compilation),
3939# a special BUILD_JDK is built as part of the build process.  An external
3940# prebuilt BUILD_JDK can also be supplied.
3941
3942
3943#
3944# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3945# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3946#
3947# This code is free software; you can redistribute it and/or modify it
3948# under the terms of the GNU General Public License version 2 only, as
3949# published by the Free Software Foundation.  Oracle designates this
3950# particular file as subject to the "Classpath" exception as provided
3951# by Oracle in the LICENSE file that accompanied this code.
3952#
3953# This code is distributed in the hope that it will be useful, but WITHOUT
3954# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3955# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3956# version 2 for more details (a copy is included in the LICENSE file that
3957# accompanied this code).
3958#
3959# You should have received a copy of the GNU General Public License version
3960# 2 along with this work; if not, write to the Free Software Foundation,
3961# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3962#
3963# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3964# or visit www.oracle.com if you need additional information or have any
3965# questions.
3966#
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984################################################################################
3985#
3986# Runs icecc-create-env once and prints the error if it fails
3987#
3988# $1: arguments to icecc-create-env
3989# $2: log file
3990#
3991
3992
3993################################################################################
3994#
3995# Optionally enable distributed compilation of native code using icecc/icecream
3996#
3997
3998
3999
4000
4001
4002
4003
4004#
4005# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4006# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4007#
4008# This code is free software; you can redistribute it and/or modify it
4009# under the terms of the GNU General Public License version 2 only, as
4010# published by the Free Software Foundation.  Oracle designates this
4011# particular file as subject to the "Classpath" exception as provided
4012# by Oracle in the LICENSE file that accompanied this code.
4013#
4014# This code is distributed in the hope that it will be useful, but WITHOUT
4015# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4016# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4017# version 2 for more details (a copy is included in the LICENSE file that
4018# accompanied this code).
4019#
4020# You should have received a copy of the GNU General Public License version
4021# 2 along with this work; if not, write to the Free Software Foundation,
4022# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4023#
4024# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4025# or visit www.oracle.com if you need additional information or have any
4026# questions.
4027#
4028
4029################################################################################
4030#
4031# Setup ABI profile (for arm)
4032#
4033
4034
4035# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4036# corresponding configure arguments instead
4037
4038
4039# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4040# that configure can use them while detecting compilers.
4041# TOOLCHAIN_TYPE is available here.
4042# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4043
4044
4045
4046
4047
4048
4049# Documentation on common flags used for solstudio in HIGHEST.
4050#
4051# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4052#          done with care, there are some assumptions below that need to
4053#          be understood about the use of pointers, and IEEE behavior.
4054#
4055# -fns: Use non-standard floating point mode (not IEEE 754)
4056# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4057# -fsingle: Use single precision floating point with 'float'
4058# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4059#   (Source with excessing pointer casting and data access with mixed
4060#    pointer types are not recommended)
4061# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4062#   (If you expect perfect errno behavior, do not use this)
4063# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4064# -xrestrict: Pointer parameters to functions do not overlap
4065#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4066#    If you pass in multiple pointers to the same data, do not use this)
4067# -xlibmil: Inline some library routines
4068#   (If you expect perfect errno behavior, do not use this)
4069# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4070#   (If you expect perfect errno behavior, do not use this)
4071#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4072
4073    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4074    # Bug?
4075    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4076    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4077    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4078    #fi
4079
4080
4081
4082
4083
4084
4085################################################################################
4086# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4087#      conditionals against.
4088# $2 - Optional prefix for each variable defined.
4089
4090
4091# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4092#                                  IF_FALSE: [RUN-IF-FALSE])
4093# ------------------------------------------------------------
4094# Check that the C compiler supports an argument
4095
4096
4097
4098
4099# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4100#                                    IF_FALSE: [RUN-IF-FALSE])
4101# ------------------------------------------------------------
4102# Check that the C++ compiler supports an argument
4103
4104
4105
4106
4107# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4108#                                IF_FALSE: [RUN-IF-FALSE])
4109# ------------------------------------------------------------
4110# Check that the C and C++ compilers support an argument
4111
4112
4113
4114
4115# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4116#                                   IF_FALSE: [RUN-IF-FALSE])
4117# ------------------------------------------------------------
4118# Check that the linker support an argument
4119
4120
4121
4122
4123
4124
4125# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4126# Arguments:
4127# $1 - Optional prefix for each variable defined.
4128
4129
4130#
4131# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4132# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4133#
4134# This code is free software; you can redistribute it and/or modify it
4135# under the terms of the GNU General Public License version 2 only, as
4136# published by the Free Software Foundation.  Oracle designates this
4137# particular file as subject to the "Classpath" exception as provided
4138# by Oracle in the LICENSE file that accompanied this code.
4139#
4140# This code is distributed in the hope that it will be useful, but WITHOUT
4141# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4142# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4143# version 2 for more details (a copy is included in the LICENSE file that
4144# accompanied this code).
4145#
4146# You should have received a copy of the GNU General Public License version
4147# 2 along with this work; if not, write to the Free Software Foundation,
4148# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4149#
4150# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4151# or visit www.oracle.com if you need additional information or have any
4152# questions.
4153#
4154
4155
4156
4157
4158
4159cygwin_help() {
4160  case $1 in
4161    unzip)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    zip)
4166      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4168      ;;
4169    make)
4170      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4171      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4172      ;;
4173    freetype)
4174      HELP_MSG="
4175The freetype library can now be build during the configure process.
4176Download the freetype sources and unpack them into an arbitrary directory:
4177
4178wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4179tar -xzf freetype-2.5.3.tar.gz
4180
4181Then run configure with '--with-freetype-src=<freetype_src>'. This will
4182automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4183builds or into '<freetype_src>/lib32' for 32-bit builds.
4184Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4185and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4186
4187Alternatively you can unpack the sources like this to use the default directory:
4188
4189tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4190      ;;
4191  esac
4192}
4193
4194msys_help() {
4195  PKGHANDLER_COMMAND=""
4196}
4197
4198apt_help() {
4199  case $1 in
4200    reduced)
4201      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4202    devkit)
4203      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4204    openjdk)
4205      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4206    alsa)
4207      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4208    cups)
4209      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4210    freetype)
4211      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4212    ffi)
4213      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4214    x11)
4215      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4216    ccache)
4217      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4218    dtrace)
4219      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4220    elf)
4221      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4222  esac
4223}
4224
4225yum_help() {
4226  case $1 in
4227    devkit)
4228      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4229    openjdk)
4230      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4231    alsa)
4232      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4233    cups)
4234      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4235    freetype)
4236      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4237    x11)
4238      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4239    ccache)
4240      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4241    elf)
4242      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4243  esac
4244}
4245
4246brew_help() {
4247  case $1 in
4248    openjdk)
4249      PKGHANDLER_COMMAND="brew cask install java" ;;
4250    freetype)
4251      PKGHANDLER_COMMAND="brew install freetype" ;;
4252    ccache)
4253      PKGHANDLER_COMMAND="brew install ccache" ;;
4254  esac
4255}
4256
4257port_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261pkgutil_help() {
4262  PKGHANDLER_COMMAND=""
4263}
4264
4265pkgadd_help() {
4266  PKGHANDLER_COMMAND=""
4267}
4268
4269# This function will check if we're called from the "configure" wrapper while
4270# printing --help. If so, we will print out additional information that can
4271# only be extracted within the autoconf script, and then exit. This must be
4272# called at the very beginning in configure.ac.
4273
4274
4275
4276
4277
4278
4279#
4280# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4281# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4282#
4283# This code is free software; you can redistribute it and/or modify it
4284# under the terms of the GNU General Public License version 2 only, as
4285# published by the Free Software Foundation.  Oracle designates this
4286# particular file as subject to the "Classpath" exception as provided
4287# by Oracle in the LICENSE file that accompanied this code.
4288#
4289# This code is distributed in the hope that it will be useful, but WITHOUT
4290# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4291# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4292# version 2 for more details (a copy is included in the LICENSE file that
4293# accompanied this code).
4294#
4295# You should have received a copy of the GNU General Public License version
4296# 2 along with this work; if not, write to the Free Software Foundation,
4297# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4298#
4299# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4300# or visit www.oracle.com if you need additional information or have any
4301# questions.
4302#
4303
4304# All valid JVM features, regardless of platform
4305VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4306    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4307    static-build link-time-opt aot"
4308
4309# All valid JVM variants
4310VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4311
4312###############################################################################
4313# Check if the specified JVM variant should be built. To be used in shell if
4314# constructs, like this:
4315# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4316#
4317# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4318
4319# Definition kept in one line to allow inlining in if statements.
4320# Additional [] needed to keep m4 from mangling shell constructs.
4321
4322
4323###############################################################################
4324# Check if the specified JVM features are explicitly enabled. To be used in
4325# shell if constructs, like this:
4326# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4327#
4328# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4329
4330# Definition kept in one line to allow inlining in if statements.
4331# Additional [] needed to keep m4 from mangling shell constructs.
4332
4333
4334###############################################################################
4335# Check which variants of the JVM that we want to build. Available variants are:
4336#   server: normal interpreter, and a tiered C1/C2 compiler
4337#   client: normal interpreter, and C1 (no C2 compiler)
4338#   minimal: reduced form of client with optional features stripped out
4339#   core: normal interpreter only, no compiler
4340#   zero: C++ based interpreter only, no compiler
4341#   zeroshark: C++ based interpreter, and a llvm-based compiler
4342#   custom: baseline JVM with no default features
4343#
4344
4345
4346###############################################################################
4347# Check if dtrace should be enabled and has all prerequisites present.
4348#
4349
4350
4351################################################################################
4352# Check if AOT should be enabled
4353#
4354
4355
4356###############################################################################
4357# Set up all JVM features for each JVM variant.
4358#
4359
4360
4361###############################################################################
4362# Validate JVM features once all setup is complete, including custom setup.
4363#
4364
4365
4366################################################################################
4367#
4368# Specify which sources will be used to build the 64-bit ARM port
4369#
4370# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4371# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4372#
4373
4374
4375
4376################################################################################
4377# Check if gtest should be built
4378#
4379
4380
4381#
4382# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4383# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4384#
4385# This code is free software; you can redistribute it and/or modify it
4386# under the terms of the GNU General Public License version 2 only, as
4387# published by the Free Software Foundation.  Oracle designates this
4388# particular file as subject to the "Classpath" exception as provided
4389# by Oracle in the LICENSE file that accompanied this code.
4390#
4391# This code is distributed in the hope that it will be useful, but WITHOUT
4392# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4393# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4394# version 2 for more details (a copy is included in the LICENSE file that
4395# accompanied this code).
4396#
4397# You should have received a copy of the GNU General Public License version
4398# 2 along with this work; if not, write to the Free Software Foundation,
4399# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4400#
4401# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4402# or visit www.oracle.com if you need additional information or have any
4403# questions.
4404#
4405
4406###############################################################################
4407# Check which variant of the JDK that we want to build.
4408# Currently we have:
4409#    normal:   standard edition
4410# but the custom make system may add other variants
4411#
4412# Effectively the JDK variant gives a name to a specific set of
4413# modules to compile into the JDK.
4414
4415
4416###############################################################################
4417# Set the debug level
4418#    release: no debug information, all optimizations, no asserts.
4419#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4420#    fastdebug: debug information (-g), all optimizations, all asserts
4421#    slowdebug: debug information (-g), no optimizations, all asserts
4422
4423
4424###############################################################################
4425#
4426# Should we build only OpenJDK even if closed sources are present?
4427#
4428
4429
4430
4431
4432###############################################################################
4433#
4434# Enable or disable the elliptic curve crypto implementation
4435#
4436
4437
4438
4439
4440################################################################################
4441#
4442# Gcov coverage data for hotspot
4443#
4444
4445
4446################################################################################
4447#
4448# Static build support.  When enabled will generate static
4449# libraries instead of shared libraries for all JDK libs.
4450#
4451
4452
4453################################################################################
4454#
4455# jlink options.
4456# We always keep packaged modules in JDK image.
4457#
4458
4459
4460################################################################################
4461#
4462# Check if building of the jtreg failure handler should be enabled.
4463#
4464
4465
4466################################################################################
4467#
4468# Enable or disable generation of the classlist at build time
4469#
4470
4471
4472#
4473# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475#
4476# This code is free software; you can redistribute it and/or modify it
4477# under the terms of the GNU General Public License version 2 only, as
4478# published by the Free Software Foundation.  Oracle designates this
4479# particular file as subject to the "Classpath" exception as provided
4480# by Oracle in the LICENSE file that accompanied this code.
4481#
4482# This code is distributed in the hope that it will be useful, but WITHOUT
4483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485# version 2 for more details (a copy is included in the LICENSE file that
4486# accompanied this code).
4487#
4488# You should have received a copy of the GNU General Public License version
4489# 2 along with this work; if not, write to the Free Software Foundation,
4490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491#
4492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493# or visit www.oracle.com if you need additional information or have any
4494# questions.
4495#
4496
4497###############################################################################
4498#
4499# Setup version numbers
4500#
4501
4502# Verify that a given string represents a valid version number, and assign it
4503# to a variable.
4504
4505# Argument 1: the variable to assign to
4506# Argument 2: the value given by the user
4507
4508
4509
4510
4511#
4512# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4513# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4514#
4515# This code is free software; you can redistribute it and/or modify it
4516# under the terms of the GNU General Public License version 2 only, as
4517# published by the Free Software Foundation.  Oracle designates this
4518# particular file as subject to the "Classpath" exception as provided
4519# by Oracle in the LICENSE file that accompanied this code.
4520#
4521# This code is distributed in the hope that it will be useful, but WITHOUT
4522# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4523# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4524# version 2 for more details (a copy is included in the LICENSE file that
4525# accompanied this code).
4526#
4527# You should have received a copy of the GNU General Public License version
4528# 2 along with this work; if not, write to the Free Software Foundation,
4529# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4530#
4531# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4532# or visit www.oracle.com if you need additional information or have any
4533# questions.
4534#
4535
4536# Major library component reside in separate files.
4537#
4538# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4539# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4540#
4541# This code is free software; you can redistribute it and/or modify it
4542# under the terms of the GNU General Public License version 2 only, as
4543# published by the Free Software Foundation.  Oracle designates this
4544# particular file as subject to the "Classpath" exception as provided
4545# by Oracle in the LICENSE file that accompanied this code.
4546#
4547# This code is distributed in the hope that it will be useful, but WITHOUT
4548# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4549# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4550# version 2 for more details (a copy is included in the LICENSE file that
4551# accompanied this code).
4552#
4553# You should have received a copy of the GNU General Public License version
4554# 2 along with this work; if not, write to the Free Software Foundation,
4555# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4556#
4557# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4558# or visit www.oracle.com if you need additional information or have any
4559# questions.
4560#
4561
4562################################################################################
4563# Setup alsa (Advanced Linux Sound Architecture)
4564################################################################################
4565
4566
4567#
4568# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4569# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4570#
4571# This code is free software; you can redistribute it and/or modify it
4572# under the terms of the GNU General Public License version 2 only, as
4573# published by the Free Software Foundation.  Oracle designates this
4574# particular file as subject to the "Classpath" exception as provided
4575# by Oracle in the LICENSE file that accompanied this code.
4576#
4577# This code is distributed in the hope that it will be useful, but WITHOUT
4578# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4579# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4580# version 2 for more details (a copy is included in the LICENSE file that
4581# accompanied this code).
4582#
4583# You should have received a copy of the GNU General Public License version
4584# 2 along with this work; if not, write to the Free Software Foundation,
4585# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4586#
4587# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4588# or visit www.oracle.com if you need additional information or have any
4589# questions.
4590#
4591
4592################################################################################
4593# Setup bundled libraries.
4594#
4595# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4596# OpenJDK repository. Default is to use these libraries as bundled, but they
4597# might be replaced by en external version by the user.
4598################################################################################
4599
4600
4601################################################################################
4602# Setup libjpeg
4603################################################################################
4604
4605
4606################################################################################
4607# Setup giflib
4608################################################################################
4609
4610
4611################################################################################
4612# Setup libpng
4613################################################################################
4614
4615
4616################################################################################
4617# Setup zlib
4618################################################################################
4619
4620
4621################################################################################
4622# Setup lcms (Little CMS)
4623################################################################################
4624
4625
4626#
4627# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4628# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4629#
4630# This code is free software; you can redistribute it and/or modify it
4631# under the terms of the GNU General Public License version 2 only, as
4632# published by the Free Software Foundation.  Oracle designates this
4633# particular file as subject to the "Classpath" exception as provided
4634# by Oracle in the LICENSE file that accompanied this code.
4635#
4636# This code is distributed in the hope that it will be useful, but WITHOUT
4637# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4638# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4639# version 2 for more details (a copy is included in the LICENSE file that
4640# accompanied this code).
4641#
4642# You should have received a copy of the GNU General Public License version
4643# 2 along with this work; if not, write to the Free Software Foundation,
4644# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4645#
4646# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4647# or visit www.oracle.com if you need additional information or have any
4648# questions.
4649#
4650
4651################################################################################
4652# Setup cups (Common Unix Printing System)
4653################################################################################
4654
4655
4656#
4657# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4658# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4659#
4660# This code is free software; you can redistribute it and/or modify it
4661# under the terms of the GNU General Public License version 2 only, as
4662# published by the Free Software Foundation.  Oracle designates this
4663# particular file as subject to the "Classpath" exception as provided
4664# by Oracle in the LICENSE file that accompanied this code.
4665#
4666# This code is distributed in the hope that it will be useful, but WITHOUT
4667# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4668# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4669# version 2 for more details (a copy is included in the LICENSE file that
4670# accompanied this code).
4671#
4672# You should have received a copy of the GNU General Public License version
4673# 2 along with this work; if not, write to the Free Software Foundation,
4674# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4675#
4676# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4677# or visit www.oracle.com if you need additional information or have any
4678# questions.
4679#
4680
4681################################################################################
4682# Setup libffi (Foreign Function Interface)
4683################################################################################
4684
4685
4686#
4687# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4688# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4689#
4690# This code is free software; you can redistribute it and/or modify it
4691# under the terms of the GNU General Public License version 2 only, as
4692# published by the Free Software Foundation.  Oracle designates this
4693# particular file as subject to the "Classpath" exception as provided
4694# by Oracle in the LICENSE file that accompanied this code.
4695#
4696# This code is distributed in the hope that it will be useful, but WITHOUT
4697# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4698# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4699# version 2 for more details (a copy is included in the LICENSE file that
4700# accompanied this code).
4701#
4702# You should have received a copy of the GNU General Public License version
4703# 2 along with this work; if not, write to the Free Software Foundation,
4704# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4705#
4706# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4707# or visit www.oracle.com if you need additional information or have any
4708# questions.
4709#
4710
4711################################################################################
4712# Build the freetype lib from source
4713################################################################################
4714
4715
4716################################################################################
4717# Check if a potential freeype library match is correct and usable
4718################################################################################
4719
4720
4721################################################################################
4722# Setup freetype (The FreeType2 font rendering library)
4723################################################################################
4724
4725
4726#
4727# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4729#
4730# This code is free software; you can redistribute it and/or modify it
4731# under the terms of the GNU General Public License version 2 only, as
4732# published by the Free Software Foundation.  Oracle designates this
4733# particular file as subject to the "Classpath" exception as provided
4734# by Oracle in the LICENSE file that accompanied this code.
4735#
4736# This code is distributed in the hope that it will be useful, but WITHOUT
4737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4739# version 2 for more details (a copy is included in the LICENSE file that
4740# accompanied this code).
4741#
4742# You should have received a copy of the GNU General Public License version
4743# 2 along with this work; if not, write to the Free Software Foundation,
4744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4745#
4746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4747# or visit www.oracle.com if you need additional information or have any
4748# questions.
4749#
4750
4751################################################################################
4752# Setup the standard C/C++ runtime libraries.
4753#
4754# Most importantly, determine if stdc++ should be linked statically or
4755# dynamically.
4756################################################################################
4757
4758
4759#
4760# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4761# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4762#
4763# This code is free software; you can redistribute it and/or modify it
4764# under the terms of the GNU General Public License version 2 only, as
4765# published by the Free Software Foundation.  Oracle designates this
4766# particular file as subject to the "Classpath" exception as provided
4767# by Oracle in the LICENSE file that accompanied this code.
4768#
4769# This code is distributed in the hope that it will be useful, but WITHOUT
4770# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4771# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4772# version 2 for more details (a copy is included in the LICENSE file that
4773# accompanied this code).
4774#
4775# You should have received a copy of the GNU General Public License version
4776# 2 along with this work; if not, write to the Free Software Foundation,
4777# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4778#
4779# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4780# or visit www.oracle.com if you need additional information or have any
4781# questions.
4782#
4783
4784################################################################################
4785# Setup X11 Windows system
4786################################################################################
4787
4788
4789#
4790# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4791# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4792#
4793# This code is free software; you can redistribute it and/or modify it
4794# under the terms of the GNU General Public License version 2 only, as
4795# published by the Free Software Foundation.  Oracle designates this
4796# particular file as subject to the "Classpath" exception as provided
4797# by Oracle in the LICENSE file that accompanied this code.
4798#
4799# This code is distributed in the hope that it will be useful, but WITHOUT
4800# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4801# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4802# version 2 for more details (a copy is included in the LICENSE file that
4803# accompanied this code).
4804#
4805# You should have received a copy of the GNU General Public License version
4806# 2 along with this work; if not, write to the Free Software Foundation,
4807# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4808#
4809# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4810# or visit www.oracle.com if you need additional information or have any
4811# questions.
4812#
4813
4814################################################################################
4815# Setup libelf (ELF library)
4816################################################################################
4817
4818
4819
4820################################################################################
4821# Determine which libraries are needed for this configuration
4822################################################################################
4823
4824
4825################################################################################
4826# Parse library options, and setup needed libraries
4827################################################################################
4828
4829
4830################################################################################
4831# Setup llvm (Low-Level VM)
4832################################################################################
4833
4834
4835################################################################################
4836# Setup various libraries, typically small system libraries
4837################################################################################
4838
4839
4840################################################################################
4841# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4842# redistribute it in the test image.
4843################################################################################
4844
4845
4846
4847#
4848# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4849# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4850#
4851# This code is free software; you can redistribute it and/or modify it
4852# under the terms of the GNU General Public License version 2 only, as
4853# published by the Free Software Foundation.  Oracle designates this
4854# particular file as subject to the "Classpath" exception as provided
4855# by Oracle in the LICENSE file that accompanied this code.
4856#
4857# This code is distributed in the hope that it will be useful, but WITHOUT
4858# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4859# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4860# version 2 for more details (a copy is included in the LICENSE file that
4861# accompanied this code).
4862#
4863# You should have received a copy of the GNU General Public License version
4864# 2 along with this work; if not, write to the Free Software Foundation,
4865# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4866#
4867# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4868# or visit www.oracle.com if you need additional information or have any
4869# questions.
4870#
4871
4872# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4873# Converts autoconf style CPU name to OpenJDK style, into
4874# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4875
4876
4877# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4878# Converts autoconf style OS name to OpenJDK style, into
4879# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4880
4881
4882# Expects $host_os $host_cpu $build_os and $build_cpu
4883# and $with_target_bits to have been setup!
4884#
4885# Translate the standard triplet(quadruplet) definition
4886# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4887# OPENJDK_BUILD_OS, etc.
4888
4889
4890# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4891# accordingly. Must be done after setting up build and target system, but before
4892# doing anything else with these values.
4893
4894
4895# Setup the legacy variables, for controlling the old makefiles.
4896#
4897
4898
4899# $1 - Either TARGET or BUILD to setup the variables for.
4900
4901
4902
4903
4904
4905
4906#%%% Build and target systems %%%
4907
4908
4909
4910
4911# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4912# Add -mX to various FLAGS variables.
4913
4914
4915
4916
4917
4918
4919#
4920# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4921# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4922#
4923# This code is free software; you can redistribute it and/or modify it
4924# under the terms of the GNU General Public License version 2 only, as
4925# published by the Free Software Foundation.  Oracle designates this
4926# particular file as subject to the "Classpath" exception as provided
4927# by Oracle in the LICENSE file that accompanied this code.
4928#
4929# This code is distributed in the hope that it will be useful, but WITHOUT
4930# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4931# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4932# version 2 for more details (a copy is included in the LICENSE file that
4933# accompanied this code).
4934#
4935# You should have received a copy of the GNU General Public License version
4936# 2 along with this work; if not, write to the Free Software Foundation,
4937# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4938#
4939# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4940# or visit www.oracle.com if you need additional information or have any
4941# questions.
4942#
4943
4944
4945
4946
4947
4948
4949
4950################################################################################
4951# Define a mechanism for importing extra prebuilt modules
4952#
4953
4954
4955
4956#
4957# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4958# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4959#
4960# This code is free software; you can redistribute it and/or modify it
4961# under the terms of the GNU General Public License version 2 only, as
4962# published by the Free Software Foundation.  Oracle designates this
4963# particular file as subject to the "Classpath" exception as provided
4964# by Oracle in the LICENSE file that accompanied this code.
4965#
4966# This code is distributed in the hope that it will be useful, but WITHOUT
4967# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4968# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4969# version 2 for more details (a copy is included in the LICENSE file that
4970# accompanied this code).
4971#
4972# You should have received a copy of the GNU General Public License version
4973# 2 along with this work; if not, write to the Free Software Foundation,
4974# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4975#
4976# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4977# or visit www.oracle.com if you need additional information or have any
4978# questions.
4979#
4980
4981########################################################################
4982# This file is responsible for detecting, verifying and setting up the
4983# toolchain, i.e. the compiler, linker and related utilities. It will setup
4984# proper paths to the binaries, but it will not setup any flags.
4985#
4986# The binaries used is determined by the toolchain type, which is the family of
4987# compilers and related tools that are used.
4988########################################################################
4989
4990
4991# All valid toolchains, regardless of platform (used by help.m4)
4992VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4993
4994# These toolchains are valid on different platforms
4995VALID_TOOLCHAINS_linux="gcc clang"
4996VALID_TOOLCHAINS_solaris="solstudio"
4997VALID_TOOLCHAINS_macosx="gcc clang"
4998VALID_TOOLCHAINS_aix="xlc"
4999VALID_TOOLCHAINS_windows="microsoft"
5000
5001# Toolchain descriptions
5002TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
5003TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
5004TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
5005TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5006TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5007
5008# Minimum supported versions, empty means unspecified
5009TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5010TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5011TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5012TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5013TOOLCHAIN_MINIMUM_VERSION_xlc=""
5014
5015# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5016# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5017# $1 - optional variable prefix for compiler and version variables (BUILD_)
5018# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5019
5020
5021# Check if the configured compiler (C and C++) is of a specific version or
5022# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5023#
5024# Arguments:
5025#   VERSION:   The version string to check against the found version
5026#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5027#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5028#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5029
5030
5031
5032
5033# Setup a number of variables describing how native output files are
5034# named on this platform/toolchain.
5035
5036
5037# Determine which toolchain type to use, and make sure it is valid for this
5038# platform. Setup various information about the selected toolchain.
5039
5040
5041# Before we start detecting the toolchain executables, we might need some
5042# special setup, e.g. additional paths etc.
5043
5044
5045# Restore path, etc
5046
5047
5048# Check if a compiler is of the toolchain type we expect, and save the version
5049# information from it. If the compiler does not match the expected type,
5050# this function will abort using AC_MSG_ERROR. If it matches, the version will
5051# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5052# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5053#
5054# $1 = compiler to test (CC or CXX)
5055# $2 = human readable name of compiler (C or C++)
5056
5057
5058# Try to locate the given C or C++ compiler in the path, or otherwise.
5059#
5060# $1 = compiler to test (CC or CXX)
5061# $2 = human readable name of compiler (C or C++)
5062# $3 = compiler name to search for
5063
5064
5065# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5066# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5067# archiver (AR). Verify that the compilers are correct according to the
5068# toolchain type.
5069
5070
5071# Setup additional tools that is considered a part of the toolchain, but not the
5072# core part. Many of these are highly platform-specific and do not exist,
5073# and/or are not needed on all platforms.
5074
5075
5076# Setup the build tools (i.e, the compiler and linker used to build programs
5077# that should be run on the build platform, not the target platform, as a build
5078# helper). Since the non-cross-compile case uses the normal, target compilers
5079# for this, we can only do this after these have been setup.
5080
5081
5082# Do some additional checks on the detected tools.
5083
5084
5085# Setup the JTReg Regression Test Harness.
5086
5087
5088#
5089# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5090# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5091#
5092# This code is free software; you can redistribute it and/or modify it
5093# under the terms of the GNU General Public License version 2 only, as
5094# published by the Free Software Foundation.  Oracle designates this
5095# particular file as subject to the "Classpath" exception as provided
5096# by Oracle in the LICENSE file that accompanied this code.
5097#
5098# This code is distributed in the hope that it will be useful, but WITHOUT
5099# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5100# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5101# version 2 for more details (a copy is included in the LICENSE file that
5102# accompanied this code).
5103#
5104# You should have received a copy of the GNU General Public License version
5105# 2 along with this work; if not, write to the Free Software Foundation,
5106# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5107#
5108# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5109# or visit www.oracle.com if you need additional information or have any
5110# questions.
5111#
5112
5113################################################################################
5114# The order of these defines the priority by which we try to find them.
5115VALID_VS_VERSIONS="2013 2012 2010"
5116
5117VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5118VS_VERSION_INTERNAL_2010=100
5119VS_MSVCR_2010=msvcr100.dll
5120# We don't use msvcp on Visual Studio 2010
5121#VS_MSVCP_2010=msvcp100.dll
5122VS_ENVVAR_2010="VS100COMNTOOLS"
5123VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5124VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5125VS_VS_PLATFORM_NAME_2010="v100"
5126VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5127
5128VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5129VS_VERSION_INTERNAL_2012=110
5130VS_MSVCR_2012=msvcr110.dll
5131VS_MSVCP_2012=msvcp110.dll
5132VS_ENVVAR_2012="VS110COMNTOOLS"
5133VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5134VS_SDK_INSTALLDIR_2012=
5135VS_VS_PLATFORM_NAME_2012="v110"
5136VS_SDK_PLATFORM_NAME_2012=
5137
5138VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5139VS_VERSION_INTERNAL_2013=120
5140VS_MSVCR_2013=msvcr120.dll
5141VS_MSVCP_2013=msvcp120.dll
5142VS_ENVVAR_2013="VS120COMNTOOLS"
5143VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5144VS_SDK_INSTALLDIR_2013=
5145VS_VS_PLATFORM_NAME_2013="v120"
5146VS_SDK_PLATFORM_NAME_2013=
5147
5148################################################################################
5149
5150
5151
5152################################################################################
5153
5154
5155
5156################################################################################
5157# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5158# build environment and assigns it to VS_ENV_CMD
5159
5160
5161################################################################################
5162
5163
5164
5165################################################################################
5166# Check if the VS env variables were setup prior to running configure.
5167# If not, then find vcvarsall.bat and run it automatically, and integrate
5168# the set env variables into the spec file.
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183# This line needs to be here, verbatim, after all includes and the dummy hook
5184# definitions. It is replaced with custom functionality when building
5185# custom sources.
5186#CUSTOM_AUTOCONF_INCLUDE
5187
5188# Do not change or remove the following line, it is needed for consistency checks:
5189DATE_WHEN_GENERATED=1496926402
5190
5191###############################################################################
5192#
5193# Initialization / Boot-strapping
5194#
5195# The bootstrapping process needs to solve the "chicken or the egg" problem,
5196# thus it jumps back and forth, each time gaining something needed later on.
5197#
5198###############################################################################
5199
5200# If we are requested to print additional help, do that and then exit.
5201# This must be the very first call.
5202
5203  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5204
5205    # Print available toolchains
5206    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5207    $PRINTF "Which are valid to use depends on the build platform.\n"
5208    for toolchain in $VALID_TOOLCHAINS_all; do
5209      # Use indirect variable referencing
5210      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5211      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5212      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5213    done
5214    $PRINTF "\n"
5215
5216    # Print available jvm features
5217    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5218    $PRINTF "Which are valid to use depends on the target platform.\n  "
5219    $PRINTF "%s " $VALID_JVM_FEATURES
5220    $PRINTF "\n"
5221
5222    # And now exit directly
5223    exit 0
5224  fi
5225
5226
5227# Basic initialization that must happen first of all in the normal process.
5228
5229  # Save the original command line. This is passed to us by the wrapper configure script.
5230
5231  # Save the path variable before it gets changed
5232  ORIGINAL_PATH="$PATH"
5233
5234  DATE_WHEN_CONFIGURED=`LANG=C date`
5235
5236  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5237$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5238  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5239$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5240
5241
5242  # Start with tools that do not need have cross compilation support
5243  # and can be expected to be found in the default PATH. These tools are
5244  # used by configure.
5245
5246  # First are all the simple required tools.
5247
5248
5249
5250  # Publish this variable in the help.
5251
5252
5253  if [ -z "${BASENAME+x}" ]; then
5254    # The variable is not set by user, try to locate tool using the code snippet
5255    for ac_prog in basename
5256do
5257  # Extract the first word of "$ac_prog", so it can be a program name with args.
5258set dummy $ac_prog; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if ${ac_cv_path_BASENAME+:} false; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $BASENAME in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287BASENAME=$ac_cv_path_BASENAME
5288if test -n "$BASENAME"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5290$as_echo "$BASENAME" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297  test -n "$BASENAME" && break
5298done
5299
5300  else
5301    # The variable is set, but is it from the command line or the environment?
5302
5303    # Try to remove the string !BASENAME! from our list.
5304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5306      # If it failed, the variable was not from the command line. Ignore it,
5307      # but warn the user (except for BASH, which is always set by the calling BASH).
5308      if test "xBASENAME" != xBASH; then
5309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5310$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5311      fi
5312      # Try to locate tool using the code snippet
5313      for ac_prog in basename
5314do
5315  # Extract the first word of "$ac_prog", so it can be a program name with args.
5316set dummy $ac_prog; ac_word=$2
5317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318$as_echo_n "checking for $ac_word... " >&6; }
5319if ${ac_cv_path_BASENAME+:} false; then :
5320  $as_echo_n "(cached) " >&6
5321else
5322  case $BASENAME in
5323  [\\/]* | ?:[\\/]*)
5324  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5325  ;;
5326  *)
5327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328for as_dir in $PATH
5329do
5330  IFS=$as_save_IFS
5331  test -z "$as_dir" && as_dir=.
5332    for ac_exec_ext in '' $ac_executable_extensions; do
5333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5334    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336    break 2
5337  fi
5338done
5339  done
5340IFS=$as_save_IFS
5341
5342  ;;
5343esac
5344fi
5345BASENAME=$ac_cv_path_BASENAME
5346if test -n "$BASENAME"; then
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5348$as_echo "$BASENAME" >&6; }
5349else
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
5352fi
5353
5354
5355  test -n "$BASENAME" && break
5356done
5357
5358    else
5359      # If it succeeded, then it was overridden by the user. We will use it
5360      # for the tool.
5361
5362      # First remove it from the list of overridden variables, so we can test
5363      # for unknown variables in the end.
5364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5365
5366      # Check if we try to supply an empty value
5367      if test "x$BASENAME" = x; then
5368        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5369$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5371$as_echo_n "checking for BASENAME... " >&6; }
5372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5373$as_echo "disabled" >&6; }
5374      else
5375        # Check if the provided tool contains a complete path.
5376        tool_specified="$BASENAME"
5377        tool_basename="${tool_specified##*/}"
5378        if test "x$tool_basename" = "x$tool_specified"; then
5379          # A command without a complete path is provided, search $PATH.
5380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5381$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5382          # Extract the first word of "$tool_basename", so it can be a program name with args.
5383set dummy $tool_basename; ac_word=$2
5384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5385$as_echo_n "checking for $ac_word... " >&6; }
5386if ${ac_cv_path_BASENAME+:} false; then :
5387  $as_echo_n "(cached) " >&6
5388else
5389  case $BASENAME in
5390  [\\/]* | ?:[\\/]*)
5391  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5392  ;;
5393  *)
5394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5395for as_dir in $PATH
5396do
5397  IFS=$as_save_IFS
5398  test -z "$as_dir" && as_dir=.
5399    for ac_exec_ext in '' $ac_executable_extensions; do
5400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5401    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5403    break 2
5404  fi
5405done
5406  done
5407IFS=$as_save_IFS
5408
5409  ;;
5410esac
5411fi
5412BASENAME=$ac_cv_path_BASENAME
5413if test -n "$BASENAME"; then
5414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5415$as_echo "$BASENAME" >&6; }
5416else
5417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5418$as_echo "no" >&6; }
5419fi
5420
5421
5422          if test "x$BASENAME" = x; then
5423            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5424          fi
5425        else
5426          # Otherwise we believe it is a complete path. Use it as it is.
5427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5428$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5429          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5430$as_echo_n "checking for BASENAME... " >&6; }
5431          if test ! -x "$tool_specified"; then
5432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5433$as_echo "not found" >&6; }
5434            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5435          fi
5436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5437$as_echo "$tool_specified" >&6; }
5438        fi
5439      fi
5440    fi
5441
5442  fi
5443
5444
5445
5446  if test "x$BASENAME" = x; then
5447    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5448  fi
5449
5450
5451
5452
5453
5454  # Publish this variable in the help.
5455
5456
5457  if [ -z "${BASH+x}" ]; then
5458    # The variable is not set by user, try to locate tool using the code snippet
5459    for ac_prog in bash
5460do
5461  # Extract the first word of "$ac_prog", so it can be a program name with args.
5462set dummy $ac_prog; ac_word=$2
5463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5464$as_echo_n "checking for $ac_word... " >&6; }
5465if ${ac_cv_path_BASH+:} false; then :
5466  $as_echo_n "(cached) " >&6
5467else
5468  case $BASH in
5469  [\\/]* | ?:[\\/]*)
5470  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5471  ;;
5472  *)
5473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH
5475do
5476  IFS=$as_save_IFS
5477  test -z "$as_dir" && as_dir=.
5478    for ac_exec_ext in '' $ac_executable_extensions; do
5479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5480    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5482    break 2
5483  fi
5484done
5485  done
5486IFS=$as_save_IFS
5487
5488  ;;
5489esac
5490fi
5491BASH=$ac_cv_path_BASH
5492if test -n "$BASH"; then
5493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5494$as_echo "$BASH" >&6; }
5495else
5496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497$as_echo "no" >&6; }
5498fi
5499
5500
5501  test -n "$BASH" && break
5502done
5503
5504  else
5505    # The variable is set, but is it from the command line or the environment?
5506
5507    # Try to remove the string !BASH! from our list.
5508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5510      # If it failed, the variable was not from the command line. Ignore it,
5511      # but warn the user (except for BASH, which is always set by the calling BASH).
5512      if test "xBASH" != xBASH; then
5513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5514$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5515      fi
5516      # Try to locate tool using the code snippet
5517      for ac_prog in bash
5518do
5519  # Extract the first word of "$ac_prog", so it can be a program name with args.
5520set dummy $ac_prog; ac_word=$2
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5522$as_echo_n "checking for $ac_word... " >&6; }
5523if ${ac_cv_path_BASH+:} false; then :
5524  $as_echo_n "(cached) " >&6
5525else
5526  case $BASH in
5527  [\\/]* | ?:[\\/]*)
5528  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5529  ;;
5530  *)
5531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5532for as_dir in $PATH
5533do
5534  IFS=$as_save_IFS
5535  test -z "$as_dir" && as_dir=.
5536    for ac_exec_ext in '' $ac_executable_extensions; do
5537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5538    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5540    break 2
5541  fi
5542done
5543  done
5544IFS=$as_save_IFS
5545
5546  ;;
5547esac
5548fi
5549BASH=$ac_cv_path_BASH
5550if test -n "$BASH"; then
5551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5552$as_echo "$BASH" >&6; }
5553else
5554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5555$as_echo "no" >&6; }
5556fi
5557
5558
5559  test -n "$BASH" && break
5560done
5561
5562    else
5563      # If it succeeded, then it was overridden by the user. We will use it
5564      # for the tool.
5565
5566      # First remove it from the list of overridden variables, so we can test
5567      # for unknown variables in the end.
5568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5569
5570      # Check if we try to supply an empty value
5571      if test "x$BASH" = x; then
5572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5573$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5575$as_echo_n "checking for BASH... " >&6; }
5576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5577$as_echo "disabled" >&6; }
5578      else
5579        # Check if the provided tool contains a complete path.
5580        tool_specified="$BASH"
5581        tool_basename="${tool_specified##*/}"
5582        if test "x$tool_basename" = "x$tool_specified"; then
5583          # A command without a complete path is provided, search $PATH.
5584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5585$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5586          # Extract the first word of "$tool_basename", so it can be a program name with args.
5587set dummy $tool_basename; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if ${ac_cv_path_BASH+:} false; then :
5591  $as_echo_n "(cached) " >&6
5592else
5593  case $BASH in
5594  [\\/]* | ?:[\\/]*)
5595  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5596  ;;
5597  *)
5598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5599for as_dir in $PATH
5600do
5601  IFS=$as_save_IFS
5602  test -z "$as_dir" && as_dir=.
5603    for ac_exec_ext in '' $ac_executable_extensions; do
5604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5605    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5607    break 2
5608  fi
5609done
5610  done
5611IFS=$as_save_IFS
5612
5613  ;;
5614esac
5615fi
5616BASH=$ac_cv_path_BASH
5617if test -n "$BASH"; then
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5619$as_echo "$BASH" >&6; }
5620else
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
5623fi
5624
5625
5626          if test "x$BASH" = x; then
5627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5628          fi
5629        else
5630          # Otherwise we believe it is a complete path. Use it as it is.
5631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5632$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5634$as_echo_n "checking for BASH... " >&6; }
5635          if test ! -x "$tool_specified"; then
5636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5637$as_echo "not found" >&6; }
5638            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5639          fi
5640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5641$as_echo "$tool_specified" >&6; }
5642        fi
5643      fi
5644    fi
5645
5646  fi
5647
5648
5649
5650  if test "x$BASH" = x; then
5651    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5652  fi
5653
5654
5655
5656
5657
5658  # Publish this variable in the help.
5659
5660
5661  if [ -z "${CAT+x}" ]; then
5662    # The variable is not set by user, try to locate tool using the code snippet
5663    for ac_prog in cat
5664do
5665  # Extract the first word of "$ac_prog", so it can be a program name with args.
5666set dummy $ac_prog; ac_word=$2
5667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5668$as_echo_n "checking for $ac_word... " >&6; }
5669if ${ac_cv_path_CAT+:} false; then :
5670  $as_echo_n "(cached) " >&6
5671else
5672  case $CAT in
5673  [\\/]* | ?:[\\/]*)
5674  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5675  ;;
5676  *)
5677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678for as_dir in $PATH
5679do
5680  IFS=$as_save_IFS
5681  test -z "$as_dir" && as_dir=.
5682    for ac_exec_ext in '' $ac_executable_extensions; do
5683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5684    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5686    break 2
5687  fi
5688done
5689  done
5690IFS=$as_save_IFS
5691
5692  ;;
5693esac
5694fi
5695CAT=$ac_cv_path_CAT
5696if test -n "$CAT"; then
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5698$as_echo "$CAT" >&6; }
5699else
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701$as_echo "no" >&6; }
5702fi
5703
5704
5705  test -n "$CAT" && break
5706done
5707
5708  else
5709    # The variable is set, but is it from the command line or the environment?
5710
5711    # Try to remove the string !CAT! from our list.
5712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5714      # If it failed, the variable was not from the command line. Ignore it,
5715      # but warn the user (except for BASH, which is always set by the calling BASH).
5716      if test "xCAT" != xBASH; then
5717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5718$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5719      fi
5720      # Try to locate tool using the code snippet
5721      for ac_prog in cat
5722do
5723  # Extract the first word of "$ac_prog", so it can be a program name with args.
5724set dummy $ac_prog; ac_word=$2
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726$as_echo_n "checking for $ac_word... " >&6; }
5727if ${ac_cv_path_CAT+:} false; then :
5728  $as_echo_n "(cached) " >&6
5729else
5730  case $CAT in
5731  [\\/]* | ?:[\\/]*)
5732  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5733  ;;
5734  *)
5735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738  IFS=$as_save_IFS
5739  test -z "$as_dir" && as_dir=.
5740    for ac_exec_ext in '' $ac_executable_extensions; do
5741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744    break 2
5745  fi
5746done
5747  done
5748IFS=$as_save_IFS
5749
5750  ;;
5751esac
5752fi
5753CAT=$ac_cv_path_CAT
5754if test -n "$CAT"; then
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5756$as_echo "$CAT" >&6; }
5757else
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759$as_echo "no" >&6; }
5760fi
5761
5762
5763  test -n "$CAT" && break
5764done
5765
5766    else
5767      # If it succeeded, then it was overridden by the user. We will use it
5768      # for the tool.
5769
5770      # First remove it from the list of overridden variables, so we can test
5771      # for unknown variables in the end.
5772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5773
5774      # Check if we try to supply an empty value
5775      if test "x$CAT" = x; then
5776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5777$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5779$as_echo_n "checking for CAT... " >&6; }
5780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5781$as_echo "disabled" >&6; }
5782      else
5783        # Check if the provided tool contains a complete path.
5784        tool_specified="$CAT"
5785        tool_basename="${tool_specified##*/}"
5786        if test "x$tool_basename" = "x$tool_specified"; then
5787          # A command without a complete path is provided, search $PATH.
5788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5789$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5790          # Extract the first word of "$tool_basename", so it can be a program name with args.
5791set dummy $tool_basename; ac_word=$2
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
5794if ${ac_cv_path_CAT+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  case $CAT in
5798  [\\/]* | ?:[\\/]*)
5799  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5800  ;;
5801  *)
5802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805  IFS=$as_save_IFS
5806  test -z "$as_dir" && as_dir=.
5807    for ac_exec_ext in '' $ac_executable_extensions; do
5808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811    break 2
5812  fi
5813done
5814  done
5815IFS=$as_save_IFS
5816
5817  ;;
5818esac
5819fi
5820CAT=$ac_cv_path_CAT
5821if test -n "$CAT"; then
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5823$as_echo "$CAT" >&6; }
5824else
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827fi
5828
5829
5830          if test "x$CAT" = x; then
5831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5832          fi
5833        else
5834          # Otherwise we believe it is a complete path. Use it as it is.
5835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5836$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5838$as_echo_n "checking for CAT... " >&6; }
5839          if test ! -x "$tool_specified"; then
5840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5841$as_echo "not found" >&6; }
5842            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5843          fi
5844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5845$as_echo "$tool_specified" >&6; }
5846        fi
5847      fi
5848    fi
5849
5850  fi
5851
5852
5853
5854  if test "x$CAT" = x; then
5855    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5856  fi
5857
5858
5859
5860
5861
5862  # Publish this variable in the help.
5863
5864
5865  if [ -z "${CHMOD+x}" ]; then
5866    # The variable is not set by user, try to locate tool using the code snippet
5867    for ac_prog in chmod
5868do
5869  # Extract the first word of "$ac_prog", so it can be a program name with args.
5870set dummy $ac_prog; ac_word=$2
5871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5872$as_echo_n "checking for $ac_word... " >&6; }
5873if ${ac_cv_path_CHMOD+:} false; then :
5874  $as_echo_n "(cached) " >&6
5875else
5876  case $CHMOD in
5877  [\\/]* | ?:[\\/]*)
5878  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5879  ;;
5880  *)
5881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5882for as_dir in $PATH
5883do
5884  IFS=$as_save_IFS
5885  test -z "$as_dir" && as_dir=.
5886    for ac_exec_ext in '' $ac_executable_extensions; do
5887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5888    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5890    break 2
5891  fi
5892done
5893  done
5894IFS=$as_save_IFS
5895
5896  ;;
5897esac
5898fi
5899CHMOD=$ac_cv_path_CHMOD
5900if test -n "$CHMOD"; then
5901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5902$as_echo "$CHMOD" >&6; }
5903else
5904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5905$as_echo "no" >&6; }
5906fi
5907
5908
5909  test -n "$CHMOD" && break
5910done
5911
5912  else
5913    # The variable is set, but is it from the command line or the environment?
5914
5915    # Try to remove the string !CHMOD! from our list.
5916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5918      # If it failed, the variable was not from the command line. Ignore it,
5919      # but warn the user (except for BASH, which is always set by the calling BASH).
5920      if test "xCHMOD" != xBASH; then
5921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5922$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5923      fi
5924      # Try to locate tool using the code snippet
5925      for ac_prog in chmod
5926do
5927  # Extract the first word of "$ac_prog", so it can be a program name with args.
5928set dummy $ac_prog; ac_word=$2
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930$as_echo_n "checking for $ac_word... " >&6; }
5931if ${ac_cv_path_CHMOD+:} false; then :
5932  $as_echo_n "(cached) " >&6
5933else
5934  case $CHMOD in
5935  [\\/]* | ?:[\\/]*)
5936  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5937  ;;
5938  *)
5939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940for as_dir in $PATH
5941do
5942  IFS=$as_save_IFS
5943  test -z "$as_dir" && as_dir=.
5944    for ac_exec_ext in '' $ac_executable_extensions; do
5945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5946    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5948    break 2
5949  fi
5950done
5951  done
5952IFS=$as_save_IFS
5953
5954  ;;
5955esac
5956fi
5957CHMOD=$ac_cv_path_CHMOD
5958if test -n "$CHMOD"; then
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5960$as_echo "$CHMOD" >&6; }
5961else
5962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
5964fi
5965
5966
5967  test -n "$CHMOD" && break
5968done
5969
5970    else
5971      # If it succeeded, then it was overridden by the user. We will use it
5972      # for the tool.
5973
5974      # First remove it from the list of overridden variables, so we can test
5975      # for unknown variables in the end.
5976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5977
5978      # Check if we try to supply an empty value
5979      if test "x$CHMOD" = x; then
5980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5981$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5983$as_echo_n "checking for CHMOD... " >&6; }
5984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5985$as_echo "disabled" >&6; }
5986      else
5987        # Check if the provided tool contains a complete path.
5988        tool_specified="$CHMOD"
5989        tool_basename="${tool_specified##*/}"
5990        if test "x$tool_basename" = "x$tool_specified"; then
5991          # A command without a complete path is provided, search $PATH.
5992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5993$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5994          # Extract the first word of "$tool_basename", so it can be a program name with args.
5995set dummy $tool_basename; ac_word=$2
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997$as_echo_n "checking for $ac_word... " >&6; }
5998if ${ac_cv_path_CHMOD+:} false; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  case $CHMOD in
6002  [\\/]* | ?:[\\/]*)
6003  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
6004  ;;
6005  *)
6006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007for as_dir in $PATH
6008do
6009  IFS=$as_save_IFS
6010  test -z "$as_dir" && as_dir=.
6011    for ac_exec_ext in '' $ac_executable_extensions; do
6012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6013    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6015    break 2
6016  fi
6017done
6018  done
6019IFS=$as_save_IFS
6020
6021  ;;
6022esac
6023fi
6024CHMOD=$ac_cv_path_CHMOD
6025if test -n "$CHMOD"; then
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6027$as_echo "$CHMOD" >&6; }
6028else
6029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
6031fi
6032
6033
6034          if test "x$CHMOD" = x; then
6035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6036          fi
6037        else
6038          # Otherwise we believe it is a complete path. Use it as it is.
6039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6040$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6042$as_echo_n "checking for CHMOD... " >&6; }
6043          if test ! -x "$tool_specified"; then
6044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6045$as_echo "not found" >&6; }
6046            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6047          fi
6048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6049$as_echo "$tool_specified" >&6; }
6050        fi
6051      fi
6052    fi
6053
6054  fi
6055
6056
6057
6058  if test "x$CHMOD" = x; then
6059    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6060  fi
6061
6062
6063
6064
6065
6066  # Publish this variable in the help.
6067
6068
6069  if [ -z "${CMP+x}" ]; then
6070    # The variable is not set by user, try to locate tool using the code snippet
6071    for ac_prog in cmp
6072do
6073  # Extract the first word of "$ac_prog", so it can be a program name with args.
6074set dummy $ac_prog; ac_word=$2
6075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6076$as_echo_n "checking for $ac_word... " >&6; }
6077if ${ac_cv_path_CMP+:} false; then :
6078  $as_echo_n "(cached) " >&6
6079else
6080  case $CMP in
6081  [\\/]* | ?:[\\/]*)
6082  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6083  ;;
6084  *)
6085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086for as_dir in $PATH
6087do
6088  IFS=$as_save_IFS
6089  test -z "$as_dir" && as_dir=.
6090    for ac_exec_ext in '' $ac_executable_extensions; do
6091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6092    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6094    break 2
6095  fi
6096done
6097  done
6098IFS=$as_save_IFS
6099
6100  ;;
6101esac
6102fi
6103CMP=$ac_cv_path_CMP
6104if test -n "$CMP"; then
6105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6106$as_echo "$CMP" >&6; }
6107else
6108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6109$as_echo "no" >&6; }
6110fi
6111
6112
6113  test -n "$CMP" && break
6114done
6115
6116  else
6117    # The variable is set, but is it from the command line or the environment?
6118
6119    # Try to remove the string !CMP! from our list.
6120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6122      # If it failed, the variable was not from the command line. Ignore it,
6123      # but warn the user (except for BASH, which is always set by the calling BASH).
6124      if test "xCMP" != xBASH; then
6125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6126$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6127      fi
6128      # Try to locate tool using the code snippet
6129      for ac_prog in cmp
6130do
6131  # Extract the first word of "$ac_prog", so it can be a program name with args.
6132set dummy $ac_prog; ac_word=$2
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6134$as_echo_n "checking for $ac_word... " >&6; }
6135if ${ac_cv_path_CMP+:} false; then :
6136  $as_echo_n "(cached) " >&6
6137else
6138  case $CMP in
6139  [\\/]* | ?:[\\/]*)
6140  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6141  ;;
6142  *)
6143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146  IFS=$as_save_IFS
6147  test -z "$as_dir" && as_dir=.
6148    for ac_exec_ext in '' $ac_executable_extensions; do
6149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6150    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6152    break 2
6153  fi
6154done
6155  done
6156IFS=$as_save_IFS
6157
6158  ;;
6159esac
6160fi
6161CMP=$ac_cv_path_CMP
6162if test -n "$CMP"; then
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6164$as_echo "$CMP" >&6; }
6165else
6166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6167$as_echo "no" >&6; }
6168fi
6169
6170
6171  test -n "$CMP" && break
6172done
6173
6174    else
6175      # If it succeeded, then it was overridden by the user. We will use it
6176      # for the tool.
6177
6178      # First remove it from the list of overridden variables, so we can test
6179      # for unknown variables in the end.
6180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6181
6182      # Check if we try to supply an empty value
6183      if test "x$CMP" = x; then
6184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6185$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6187$as_echo_n "checking for CMP... " >&6; }
6188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6189$as_echo "disabled" >&6; }
6190      else
6191        # Check if the provided tool contains a complete path.
6192        tool_specified="$CMP"
6193        tool_basename="${tool_specified##*/}"
6194        if test "x$tool_basename" = "x$tool_specified"; then
6195          # A command without a complete path is provided, search $PATH.
6196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6197$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6198          # Extract the first word of "$tool_basename", so it can be a program name with args.
6199set dummy $tool_basename; ac_word=$2
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6201$as_echo_n "checking for $ac_word... " >&6; }
6202if ${ac_cv_path_CMP+:} false; then :
6203  $as_echo_n "(cached) " >&6
6204else
6205  case $CMP in
6206  [\\/]* | ?:[\\/]*)
6207  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6208  ;;
6209  *)
6210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH
6212do
6213  IFS=$as_save_IFS
6214  test -z "$as_dir" && as_dir=.
6215    for ac_exec_ext in '' $ac_executable_extensions; do
6216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6217    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6219    break 2
6220  fi
6221done
6222  done
6223IFS=$as_save_IFS
6224
6225  ;;
6226esac
6227fi
6228CMP=$ac_cv_path_CMP
6229if test -n "$CMP"; then
6230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6231$as_echo "$CMP" >&6; }
6232else
6233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6234$as_echo "no" >&6; }
6235fi
6236
6237
6238          if test "x$CMP" = x; then
6239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6240          fi
6241        else
6242          # Otherwise we believe it is a complete path. Use it as it is.
6243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6244$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6246$as_echo_n "checking for CMP... " >&6; }
6247          if test ! -x "$tool_specified"; then
6248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6249$as_echo "not found" >&6; }
6250            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6251          fi
6252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6253$as_echo "$tool_specified" >&6; }
6254        fi
6255      fi
6256    fi
6257
6258  fi
6259
6260
6261
6262  if test "x$CMP" = x; then
6263    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6264  fi
6265
6266
6267
6268
6269
6270  # Publish this variable in the help.
6271
6272
6273  if [ -z "${COMM+x}" ]; then
6274    # The variable is not set by user, try to locate tool using the code snippet
6275    for ac_prog in comm
6276do
6277  # Extract the first word of "$ac_prog", so it can be a program name with args.
6278set dummy $ac_prog; ac_word=$2
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280$as_echo_n "checking for $ac_word... " >&6; }
6281if ${ac_cv_path_COMM+:} false; then :
6282  $as_echo_n "(cached) " >&6
6283else
6284  case $COMM in
6285  [\\/]* | ?:[\\/]*)
6286  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6287  ;;
6288  *)
6289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290for as_dir in $PATH
6291do
6292  IFS=$as_save_IFS
6293  test -z "$as_dir" && as_dir=.
6294    for ac_exec_ext in '' $ac_executable_extensions; do
6295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6296    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6298    break 2
6299  fi
6300done
6301  done
6302IFS=$as_save_IFS
6303
6304  ;;
6305esac
6306fi
6307COMM=$ac_cv_path_COMM
6308if test -n "$COMM"; then
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6310$as_echo "$COMM" >&6; }
6311else
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313$as_echo "no" >&6; }
6314fi
6315
6316
6317  test -n "$COMM" && break
6318done
6319
6320  else
6321    # The variable is set, but is it from the command line or the environment?
6322
6323    # Try to remove the string !COMM! from our list.
6324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6326      # If it failed, the variable was not from the command line. Ignore it,
6327      # but warn the user (except for BASH, which is always set by the calling BASH).
6328      if test "xCOMM" != xBASH; then
6329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6330$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6331      fi
6332      # Try to locate tool using the code snippet
6333      for ac_prog in comm
6334do
6335  # Extract the first word of "$ac_prog", so it can be a program name with args.
6336set dummy $ac_prog; ac_word=$2
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338$as_echo_n "checking for $ac_word... " >&6; }
6339if ${ac_cv_path_COMM+:} false; then :
6340  $as_echo_n "(cached) " >&6
6341else
6342  case $COMM in
6343  [\\/]* | ?:[\\/]*)
6344  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6345  ;;
6346  *)
6347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350  IFS=$as_save_IFS
6351  test -z "$as_dir" && as_dir=.
6352    for ac_exec_ext in '' $ac_executable_extensions; do
6353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6354    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356    break 2
6357  fi
6358done
6359  done
6360IFS=$as_save_IFS
6361
6362  ;;
6363esac
6364fi
6365COMM=$ac_cv_path_COMM
6366if test -n "$COMM"; then
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6368$as_echo "$COMM" >&6; }
6369else
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
6374
6375  test -n "$COMM" && break
6376done
6377
6378    else
6379      # If it succeeded, then it was overridden by the user. We will use it
6380      # for the tool.
6381
6382      # First remove it from the list of overridden variables, so we can test
6383      # for unknown variables in the end.
6384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6385
6386      # Check if we try to supply an empty value
6387      if test "x$COMM" = x; then
6388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6389$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6391$as_echo_n "checking for COMM... " >&6; }
6392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6393$as_echo "disabled" >&6; }
6394      else
6395        # Check if the provided tool contains a complete path.
6396        tool_specified="$COMM"
6397        tool_basename="${tool_specified##*/}"
6398        if test "x$tool_basename" = "x$tool_specified"; then
6399          # A command without a complete path is provided, search $PATH.
6400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6401$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6402          # Extract the first word of "$tool_basename", so it can be a program name with args.
6403set dummy $tool_basename; ac_word=$2
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6405$as_echo_n "checking for $ac_word... " >&6; }
6406if ${ac_cv_path_COMM+:} false; then :
6407  $as_echo_n "(cached) " >&6
6408else
6409  case $COMM in
6410  [\\/]* | ?:[\\/]*)
6411  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6412  ;;
6413  *)
6414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6415for as_dir in $PATH
6416do
6417  IFS=$as_save_IFS
6418  test -z "$as_dir" && as_dir=.
6419    for ac_exec_ext in '' $ac_executable_extensions; do
6420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6421    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6423    break 2
6424  fi
6425done
6426  done
6427IFS=$as_save_IFS
6428
6429  ;;
6430esac
6431fi
6432COMM=$ac_cv_path_COMM
6433if test -n "$COMM"; then
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6435$as_echo "$COMM" >&6; }
6436else
6437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438$as_echo "no" >&6; }
6439fi
6440
6441
6442          if test "x$COMM" = x; then
6443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6444          fi
6445        else
6446          # Otherwise we believe it is a complete path. Use it as it is.
6447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6448$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6450$as_echo_n "checking for COMM... " >&6; }
6451          if test ! -x "$tool_specified"; then
6452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6453$as_echo "not found" >&6; }
6454            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6455          fi
6456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6457$as_echo "$tool_specified" >&6; }
6458        fi
6459      fi
6460    fi
6461
6462  fi
6463
6464
6465
6466  if test "x$COMM" = x; then
6467    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6468  fi
6469
6470
6471
6472
6473
6474  # Publish this variable in the help.
6475
6476
6477  if [ -z "${CP+x}" ]; then
6478    # The variable is not set by user, try to locate tool using the code snippet
6479    for ac_prog in cp
6480do
6481  # Extract the first word of "$ac_prog", so it can be a program name with args.
6482set dummy $ac_prog; ac_word=$2
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484$as_echo_n "checking for $ac_word... " >&6; }
6485if ${ac_cv_path_CP+:} false; then :
6486  $as_echo_n "(cached) " >&6
6487else
6488  case $CP in
6489  [\\/]* | ?:[\\/]*)
6490  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6491  ;;
6492  *)
6493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494for as_dir in $PATH
6495do
6496  IFS=$as_save_IFS
6497  test -z "$as_dir" && as_dir=.
6498    for ac_exec_ext in '' $ac_executable_extensions; do
6499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6500    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6502    break 2
6503  fi
6504done
6505  done
6506IFS=$as_save_IFS
6507
6508  ;;
6509esac
6510fi
6511CP=$ac_cv_path_CP
6512if test -n "$CP"; then
6513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6514$as_echo "$CP" >&6; }
6515else
6516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; }
6518fi
6519
6520
6521  test -n "$CP" && break
6522done
6523
6524  else
6525    # The variable is set, but is it from the command line or the environment?
6526
6527    # Try to remove the string !CP! from our list.
6528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6530      # If it failed, the variable was not from the command line. Ignore it,
6531      # but warn the user (except for BASH, which is always set by the calling BASH).
6532      if test "xCP" != xBASH; then
6533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6534$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6535      fi
6536      # Try to locate tool using the code snippet
6537      for ac_prog in cp
6538do
6539  # Extract the first word of "$ac_prog", so it can be a program name with args.
6540set dummy $ac_prog; ac_word=$2
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6542$as_echo_n "checking for $ac_word... " >&6; }
6543if ${ac_cv_path_CP+:} false; then :
6544  $as_echo_n "(cached) " >&6
6545else
6546  case $CP in
6547  [\\/]* | ?:[\\/]*)
6548  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6549  ;;
6550  *)
6551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6552for as_dir in $PATH
6553do
6554  IFS=$as_save_IFS
6555  test -z "$as_dir" && as_dir=.
6556    for ac_exec_ext in '' $ac_executable_extensions; do
6557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6558    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6560    break 2
6561  fi
6562done
6563  done
6564IFS=$as_save_IFS
6565
6566  ;;
6567esac
6568fi
6569CP=$ac_cv_path_CP
6570if test -n "$CP"; then
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6572$as_echo "$CP" >&6; }
6573else
6574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575$as_echo "no" >&6; }
6576fi
6577
6578
6579  test -n "$CP" && break
6580done
6581
6582    else
6583      # If it succeeded, then it was overridden by the user. We will use it
6584      # for the tool.
6585
6586      # First remove it from the list of overridden variables, so we can test
6587      # for unknown variables in the end.
6588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6589
6590      # Check if we try to supply an empty value
6591      if test "x$CP" = x; then
6592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6593$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6595$as_echo_n "checking for CP... " >&6; }
6596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6597$as_echo "disabled" >&6; }
6598      else
6599        # Check if the provided tool contains a complete path.
6600        tool_specified="$CP"
6601        tool_basename="${tool_specified##*/}"
6602        if test "x$tool_basename" = "x$tool_specified"; then
6603          # A command without a complete path is provided, search $PATH.
6604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6605$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6606          # Extract the first word of "$tool_basename", so it can be a program name with args.
6607set dummy $tool_basename; ac_word=$2
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6609$as_echo_n "checking for $ac_word... " >&6; }
6610if ${ac_cv_path_CP+:} false; then :
6611  $as_echo_n "(cached) " >&6
6612else
6613  case $CP in
6614  [\\/]* | ?:[\\/]*)
6615  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6616  ;;
6617  *)
6618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6619for as_dir in $PATH
6620do
6621  IFS=$as_save_IFS
6622  test -z "$as_dir" && as_dir=.
6623    for ac_exec_ext in '' $ac_executable_extensions; do
6624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6625    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6627    break 2
6628  fi
6629done
6630  done
6631IFS=$as_save_IFS
6632
6633  ;;
6634esac
6635fi
6636CP=$ac_cv_path_CP
6637if test -n "$CP"; then
6638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6639$as_echo "$CP" >&6; }
6640else
6641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6642$as_echo "no" >&6; }
6643fi
6644
6645
6646          if test "x$CP" = x; then
6647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6648          fi
6649        else
6650          # Otherwise we believe it is a complete path. Use it as it is.
6651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6652$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6654$as_echo_n "checking for CP... " >&6; }
6655          if test ! -x "$tool_specified"; then
6656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6657$as_echo "not found" >&6; }
6658            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6659          fi
6660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6661$as_echo "$tool_specified" >&6; }
6662        fi
6663      fi
6664    fi
6665
6666  fi
6667
6668
6669
6670  if test "x$CP" = x; then
6671    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6672  fi
6673
6674
6675
6676
6677
6678  # Publish this variable in the help.
6679
6680
6681  if [ -z "${CUT+x}" ]; then
6682    # The variable is not set by user, try to locate tool using the code snippet
6683    for ac_prog in cut
6684do
6685  # Extract the first word of "$ac_prog", so it can be a program name with args.
6686set dummy $ac_prog; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_CUT+:} false; then :
6690  $as_echo_n "(cached) " >&6
6691else
6692  case $CUT in
6693  [\\/]* | ?:[\\/]*)
6694  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6695  ;;
6696  *)
6697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in $PATH
6699do
6700  IFS=$as_save_IFS
6701  test -z "$as_dir" && as_dir=.
6702    for ac_exec_ext in '' $ac_executable_extensions; do
6703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6704    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706    break 2
6707  fi
6708done
6709  done
6710IFS=$as_save_IFS
6711
6712  ;;
6713esac
6714fi
6715CUT=$ac_cv_path_CUT
6716if test -n "$CUT"; then
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6718$as_echo "$CUT" >&6; }
6719else
6720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
6725  test -n "$CUT" && break
6726done
6727
6728  else
6729    # The variable is set, but is it from the command line or the environment?
6730
6731    # Try to remove the string !CUT! from our list.
6732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6734      # If it failed, the variable was not from the command line. Ignore it,
6735      # but warn the user (except for BASH, which is always set by the calling BASH).
6736      if test "xCUT" != xBASH; then
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6738$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6739      fi
6740      # Try to locate tool using the code snippet
6741      for ac_prog in cut
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_CUT+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $CUT in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773CUT=$ac_cv_path_CUT
6774if test -n "$CUT"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6776$as_echo "$CUT" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$CUT" && break
6784done
6785
6786    else
6787      # If it succeeded, then it was overridden by the user. We will use it
6788      # for the tool.
6789
6790      # First remove it from the list of overridden variables, so we can test
6791      # for unknown variables in the end.
6792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6793
6794      # Check if we try to supply an empty value
6795      if test "x$CUT" = x; then
6796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6797$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6799$as_echo_n "checking for CUT... " >&6; }
6800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6801$as_echo "disabled" >&6; }
6802      else
6803        # Check if the provided tool contains a complete path.
6804        tool_specified="$CUT"
6805        tool_basename="${tool_specified##*/}"
6806        if test "x$tool_basename" = "x$tool_specified"; then
6807          # A command without a complete path is provided, search $PATH.
6808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6809$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6810          # Extract the first word of "$tool_basename", so it can be a program name with args.
6811set dummy $tool_basename; ac_word=$2
6812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813$as_echo_n "checking for $ac_word... " >&6; }
6814if ${ac_cv_path_CUT+:} false; then :
6815  $as_echo_n "(cached) " >&6
6816else
6817  case $CUT in
6818  [\\/]* | ?:[\\/]*)
6819  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6820  ;;
6821  *)
6822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823for as_dir in $PATH
6824do
6825  IFS=$as_save_IFS
6826  test -z "$as_dir" && as_dir=.
6827    for ac_exec_ext in '' $ac_executable_extensions; do
6828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6829    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6831    break 2
6832  fi
6833done
6834  done
6835IFS=$as_save_IFS
6836
6837  ;;
6838esac
6839fi
6840CUT=$ac_cv_path_CUT
6841if test -n "$CUT"; then
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6843$as_echo "$CUT" >&6; }
6844else
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6846$as_echo "no" >&6; }
6847fi
6848
6849
6850          if test "x$CUT" = x; then
6851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6852          fi
6853        else
6854          # Otherwise we believe it is a complete path. Use it as it is.
6855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6856$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6858$as_echo_n "checking for CUT... " >&6; }
6859          if test ! -x "$tool_specified"; then
6860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6861$as_echo "not found" >&6; }
6862            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6863          fi
6864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6865$as_echo "$tool_specified" >&6; }
6866        fi
6867      fi
6868    fi
6869
6870  fi
6871
6872
6873
6874  if test "x$CUT" = x; then
6875    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6876  fi
6877
6878
6879
6880
6881
6882  # Publish this variable in the help.
6883
6884
6885  if [ -z "${DATE+x}" ]; then
6886    # The variable is not set by user, try to locate tool using the code snippet
6887    for ac_prog in date
6888do
6889  # Extract the first word of "$ac_prog", so it can be a program name with args.
6890set dummy $ac_prog; ac_word=$2
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892$as_echo_n "checking for $ac_word... " >&6; }
6893if ${ac_cv_path_DATE+:} false; then :
6894  $as_echo_n "(cached) " >&6
6895else
6896  case $DATE in
6897  [\\/]* | ?:[\\/]*)
6898  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6899  ;;
6900  *)
6901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902for as_dir in $PATH
6903do
6904  IFS=$as_save_IFS
6905  test -z "$as_dir" && as_dir=.
6906    for ac_exec_ext in '' $ac_executable_extensions; do
6907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910    break 2
6911  fi
6912done
6913  done
6914IFS=$as_save_IFS
6915
6916  ;;
6917esac
6918fi
6919DATE=$ac_cv_path_DATE
6920if test -n "$DATE"; then
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6922$as_echo "$DATE" >&6; }
6923else
6924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925$as_echo "no" >&6; }
6926fi
6927
6928
6929  test -n "$DATE" && break
6930done
6931
6932  else
6933    # The variable is set, but is it from the command line or the environment?
6934
6935    # Try to remove the string !DATE! from our list.
6936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6938      # If it failed, the variable was not from the command line. Ignore it,
6939      # but warn the user (except for BASH, which is always set by the calling BASH).
6940      if test "xDATE" != xBASH; then
6941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6942$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6943      fi
6944      # Try to locate tool using the code snippet
6945      for ac_prog in date
6946do
6947  # Extract the first word of "$ac_prog", so it can be a program name with args.
6948set dummy $ac_prog; ac_word=$2
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6950$as_echo_n "checking for $ac_word... " >&6; }
6951if ${ac_cv_path_DATE+:} false; then :
6952  $as_echo_n "(cached) " >&6
6953else
6954  case $DATE in
6955  [\\/]* | ?:[\\/]*)
6956  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6957  ;;
6958  *)
6959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6960for as_dir in $PATH
6961do
6962  IFS=$as_save_IFS
6963  test -z "$as_dir" && as_dir=.
6964    for ac_exec_ext in '' $ac_executable_extensions; do
6965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6966    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6968    break 2
6969  fi
6970done
6971  done
6972IFS=$as_save_IFS
6973
6974  ;;
6975esac
6976fi
6977DATE=$ac_cv_path_DATE
6978if test -n "$DATE"; then
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6980$as_echo "$DATE" >&6; }
6981else
6982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983$as_echo "no" >&6; }
6984fi
6985
6986
6987  test -n "$DATE" && break
6988done
6989
6990    else
6991      # If it succeeded, then it was overridden by the user. We will use it
6992      # for the tool.
6993
6994      # First remove it from the list of overridden variables, so we can test
6995      # for unknown variables in the end.
6996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6997
6998      # Check if we try to supply an empty value
6999      if test "x$DATE" = x; then
7000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
7001$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
7002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7003$as_echo_n "checking for DATE... " >&6; }
7004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7005$as_echo "disabled" >&6; }
7006      else
7007        # Check if the provided tool contains a complete path.
7008        tool_specified="$DATE"
7009        tool_basename="${tool_specified##*/}"
7010        if test "x$tool_basename" = "x$tool_specified"; then
7011          # A command without a complete path is provided, search $PATH.
7012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7013$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7014          # Extract the first word of "$tool_basename", so it can be a program name with args.
7015set dummy $tool_basename; ac_word=$2
7016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7017$as_echo_n "checking for $ac_word... " >&6; }
7018if ${ac_cv_path_DATE+:} false; then :
7019  $as_echo_n "(cached) " >&6
7020else
7021  case $DATE in
7022  [\\/]* | ?:[\\/]*)
7023  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7024  ;;
7025  *)
7026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027for as_dir in $PATH
7028do
7029  IFS=$as_save_IFS
7030  test -z "$as_dir" && as_dir=.
7031    for ac_exec_ext in '' $ac_executable_extensions; do
7032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7033    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7035    break 2
7036  fi
7037done
7038  done
7039IFS=$as_save_IFS
7040
7041  ;;
7042esac
7043fi
7044DATE=$ac_cv_path_DATE
7045if test -n "$DATE"; then
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7047$as_echo "$DATE" >&6; }
7048else
7049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7050$as_echo "no" >&6; }
7051fi
7052
7053
7054          if test "x$DATE" = x; then
7055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7056          fi
7057        else
7058          # Otherwise we believe it is a complete path. Use it as it is.
7059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7060$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7062$as_echo_n "checking for DATE... " >&6; }
7063          if test ! -x "$tool_specified"; then
7064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7065$as_echo "not found" >&6; }
7066            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7067          fi
7068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7069$as_echo "$tool_specified" >&6; }
7070        fi
7071      fi
7072    fi
7073
7074  fi
7075
7076
7077
7078  if test "x$DATE" = x; then
7079    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7080  fi
7081
7082
7083
7084
7085
7086  # Publish this variable in the help.
7087
7088
7089  if [ -z "${DIFF+x}" ]; then
7090    # The variable is not set by user, try to locate tool using the code snippet
7091    for ac_prog in gdiff diff
7092do
7093  # Extract the first word of "$ac_prog", so it can be a program name with args.
7094set dummy $ac_prog; ac_word=$2
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7096$as_echo_n "checking for $ac_word... " >&6; }
7097if ${ac_cv_path_DIFF+:} false; then :
7098  $as_echo_n "(cached) " >&6
7099else
7100  case $DIFF in
7101  [\\/]* | ?:[\\/]*)
7102  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7103  ;;
7104  *)
7105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7106for as_dir in $PATH
7107do
7108  IFS=$as_save_IFS
7109  test -z "$as_dir" && as_dir=.
7110    for ac_exec_ext in '' $ac_executable_extensions; do
7111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7112    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7114    break 2
7115  fi
7116done
7117  done
7118IFS=$as_save_IFS
7119
7120  ;;
7121esac
7122fi
7123DIFF=$ac_cv_path_DIFF
7124if test -n "$DIFF"; then
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7126$as_echo "$DIFF" >&6; }
7127else
7128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7129$as_echo "no" >&6; }
7130fi
7131
7132
7133  test -n "$DIFF" && break
7134done
7135
7136  else
7137    # The variable is set, but is it from the command line or the environment?
7138
7139    # Try to remove the string !DIFF! from our list.
7140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7142      # If it failed, the variable was not from the command line. Ignore it,
7143      # but warn the user (except for BASH, which is always set by the calling BASH).
7144      if test "xDIFF" != xBASH; then
7145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7146$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7147      fi
7148      # Try to locate tool using the code snippet
7149      for ac_prog in gdiff diff
7150do
7151  # Extract the first word of "$ac_prog", so it can be a program name with args.
7152set dummy $ac_prog; ac_word=$2
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7154$as_echo_n "checking for $ac_word... " >&6; }
7155if ${ac_cv_path_DIFF+:} false; then :
7156  $as_echo_n "(cached) " >&6
7157else
7158  case $DIFF in
7159  [\\/]* | ?:[\\/]*)
7160  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7161  ;;
7162  *)
7163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164for as_dir in $PATH
7165do
7166  IFS=$as_save_IFS
7167  test -z "$as_dir" && as_dir=.
7168    for ac_exec_ext in '' $ac_executable_extensions; do
7169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7170    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7172    break 2
7173  fi
7174done
7175  done
7176IFS=$as_save_IFS
7177
7178  ;;
7179esac
7180fi
7181DIFF=$ac_cv_path_DIFF
7182if test -n "$DIFF"; then
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7184$as_echo "$DIFF" >&6; }
7185else
7186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7187$as_echo "no" >&6; }
7188fi
7189
7190
7191  test -n "$DIFF" && break
7192done
7193
7194    else
7195      # If it succeeded, then it was overridden by the user. We will use it
7196      # for the tool.
7197
7198      # First remove it from the list of overridden variables, so we can test
7199      # for unknown variables in the end.
7200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7201
7202      # Check if we try to supply an empty value
7203      if test "x$DIFF" = x; then
7204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7205$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7207$as_echo_n "checking for DIFF... " >&6; }
7208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7209$as_echo "disabled" >&6; }
7210      else
7211        # Check if the provided tool contains a complete path.
7212        tool_specified="$DIFF"
7213        tool_basename="${tool_specified##*/}"
7214        if test "x$tool_basename" = "x$tool_specified"; then
7215          # A command without a complete path is provided, search $PATH.
7216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7217$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7218          # Extract the first word of "$tool_basename", so it can be a program name with args.
7219set dummy $tool_basename; ac_word=$2
7220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7221$as_echo_n "checking for $ac_word... " >&6; }
7222if ${ac_cv_path_DIFF+:} false; then :
7223  $as_echo_n "(cached) " >&6
7224else
7225  case $DIFF in
7226  [\\/]* | ?:[\\/]*)
7227  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7228  ;;
7229  *)
7230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7231for as_dir in $PATH
7232do
7233  IFS=$as_save_IFS
7234  test -z "$as_dir" && as_dir=.
7235    for ac_exec_ext in '' $ac_executable_extensions; do
7236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7237    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7239    break 2
7240  fi
7241done
7242  done
7243IFS=$as_save_IFS
7244
7245  ;;
7246esac
7247fi
7248DIFF=$ac_cv_path_DIFF
7249if test -n "$DIFF"; then
7250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7251$as_echo "$DIFF" >&6; }
7252else
7253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7254$as_echo "no" >&6; }
7255fi
7256
7257
7258          if test "x$DIFF" = x; then
7259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7260          fi
7261        else
7262          # Otherwise we believe it is a complete path. Use it as it is.
7263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7264$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7266$as_echo_n "checking for DIFF... " >&6; }
7267          if test ! -x "$tool_specified"; then
7268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7269$as_echo "not found" >&6; }
7270            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7271          fi
7272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7273$as_echo "$tool_specified" >&6; }
7274        fi
7275      fi
7276    fi
7277
7278  fi
7279
7280
7281
7282  if test "x$DIFF" = x; then
7283    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7284  fi
7285
7286
7287
7288
7289
7290  # Publish this variable in the help.
7291
7292
7293  if [ -z "${DIRNAME+x}" ]; then
7294    # The variable is not set by user, try to locate tool using the code snippet
7295    for ac_prog in dirname
7296do
7297  # Extract the first word of "$ac_prog", so it can be a program name with args.
7298set dummy $ac_prog; ac_word=$2
7299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7300$as_echo_n "checking for $ac_word... " >&6; }
7301if ${ac_cv_path_DIRNAME+:} false; then :
7302  $as_echo_n "(cached) " >&6
7303else
7304  case $DIRNAME in
7305  [\\/]* | ?:[\\/]*)
7306  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7307  ;;
7308  *)
7309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7310for as_dir in $PATH
7311do
7312  IFS=$as_save_IFS
7313  test -z "$as_dir" && as_dir=.
7314    for ac_exec_ext in '' $ac_executable_extensions; do
7315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7316    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7318    break 2
7319  fi
7320done
7321  done
7322IFS=$as_save_IFS
7323
7324  ;;
7325esac
7326fi
7327DIRNAME=$ac_cv_path_DIRNAME
7328if test -n "$DIRNAME"; then
7329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7330$as_echo "$DIRNAME" >&6; }
7331else
7332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7333$as_echo "no" >&6; }
7334fi
7335
7336
7337  test -n "$DIRNAME" && break
7338done
7339
7340  else
7341    # The variable is set, but is it from the command line or the environment?
7342
7343    # Try to remove the string !DIRNAME! from our list.
7344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7346      # If it failed, the variable was not from the command line. Ignore it,
7347      # but warn the user (except for BASH, which is always set by the calling BASH).
7348      if test "xDIRNAME" != xBASH; then
7349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7350$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7351      fi
7352      # Try to locate tool using the code snippet
7353      for ac_prog in dirname
7354do
7355  # Extract the first word of "$ac_prog", so it can be a program name with args.
7356set dummy $ac_prog; ac_word=$2
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358$as_echo_n "checking for $ac_word... " >&6; }
7359if ${ac_cv_path_DIRNAME+:} false; then :
7360  $as_echo_n "(cached) " >&6
7361else
7362  case $DIRNAME in
7363  [\\/]* | ?:[\\/]*)
7364  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7365  ;;
7366  *)
7367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7368for as_dir in $PATH
7369do
7370  IFS=$as_save_IFS
7371  test -z "$as_dir" && as_dir=.
7372    for ac_exec_ext in '' $ac_executable_extensions; do
7373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7374    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7376    break 2
7377  fi
7378done
7379  done
7380IFS=$as_save_IFS
7381
7382  ;;
7383esac
7384fi
7385DIRNAME=$ac_cv_path_DIRNAME
7386if test -n "$DIRNAME"; then
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7388$as_echo "$DIRNAME" >&6; }
7389else
7390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7391$as_echo "no" >&6; }
7392fi
7393
7394
7395  test -n "$DIRNAME" && break
7396done
7397
7398    else
7399      # If it succeeded, then it was overridden by the user. We will use it
7400      # for the tool.
7401
7402      # First remove it from the list of overridden variables, so we can test
7403      # for unknown variables in the end.
7404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7405
7406      # Check if we try to supply an empty value
7407      if test "x$DIRNAME" = x; then
7408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7409$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7411$as_echo_n "checking for DIRNAME... " >&6; }
7412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7413$as_echo "disabled" >&6; }
7414      else
7415        # Check if the provided tool contains a complete path.
7416        tool_specified="$DIRNAME"
7417        tool_basename="${tool_specified##*/}"
7418        if test "x$tool_basename" = "x$tool_specified"; then
7419          # A command without a complete path is provided, search $PATH.
7420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7421$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7422          # Extract the first word of "$tool_basename", so it can be a program name with args.
7423set dummy $tool_basename; ac_word=$2
7424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7425$as_echo_n "checking for $ac_word... " >&6; }
7426if ${ac_cv_path_DIRNAME+:} false; then :
7427  $as_echo_n "(cached) " >&6
7428else
7429  case $DIRNAME in
7430  [\\/]* | ?:[\\/]*)
7431  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7432  ;;
7433  *)
7434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435for as_dir in $PATH
7436do
7437  IFS=$as_save_IFS
7438  test -z "$as_dir" && as_dir=.
7439    for ac_exec_ext in '' $ac_executable_extensions; do
7440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7441    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7443    break 2
7444  fi
7445done
7446  done
7447IFS=$as_save_IFS
7448
7449  ;;
7450esac
7451fi
7452DIRNAME=$ac_cv_path_DIRNAME
7453if test -n "$DIRNAME"; then
7454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7455$as_echo "$DIRNAME" >&6; }
7456else
7457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7458$as_echo "no" >&6; }
7459fi
7460
7461
7462          if test "x$DIRNAME" = x; then
7463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7464          fi
7465        else
7466          # Otherwise we believe it is a complete path. Use it as it is.
7467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7468$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7470$as_echo_n "checking for DIRNAME... " >&6; }
7471          if test ! -x "$tool_specified"; then
7472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7473$as_echo "not found" >&6; }
7474            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7475          fi
7476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7477$as_echo "$tool_specified" >&6; }
7478        fi
7479      fi
7480    fi
7481
7482  fi
7483
7484
7485
7486  if test "x$DIRNAME" = x; then
7487    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7488  fi
7489
7490
7491
7492
7493
7494  # Publish this variable in the help.
7495
7496
7497  if [ -z "${ECHO+x}" ]; then
7498    # The variable is not set by user, try to locate tool using the code snippet
7499    for ac_prog in echo
7500do
7501  # Extract the first word of "$ac_prog", so it can be a program name with args.
7502set dummy $ac_prog; ac_word=$2
7503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504$as_echo_n "checking for $ac_word... " >&6; }
7505if ${ac_cv_path_ECHO+:} false; then :
7506  $as_echo_n "(cached) " >&6
7507else
7508  case $ECHO in
7509  [\\/]* | ?:[\\/]*)
7510  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7511  ;;
7512  *)
7513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7514for as_dir in $PATH
7515do
7516  IFS=$as_save_IFS
7517  test -z "$as_dir" && as_dir=.
7518    for ac_exec_ext in '' $ac_executable_extensions; do
7519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7520    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7522    break 2
7523  fi
7524done
7525  done
7526IFS=$as_save_IFS
7527
7528  ;;
7529esac
7530fi
7531ECHO=$ac_cv_path_ECHO
7532if test -n "$ECHO"; then
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7534$as_echo "$ECHO" >&6; }
7535else
7536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537$as_echo "no" >&6; }
7538fi
7539
7540
7541  test -n "$ECHO" && break
7542done
7543
7544  else
7545    # The variable is set, but is it from the command line or the environment?
7546
7547    # Try to remove the string !ECHO! from our list.
7548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7550      # If it failed, the variable was not from the command line. Ignore it,
7551      # but warn the user (except for BASH, which is always set by the calling BASH).
7552      if test "xECHO" != xBASH; then
7553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7554$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7555      fi
7556      # Try to locate tool using the code snippet
7557      for ac_prog in echo
7558do
7559  # Extract the first word of "$ac_prog", so it can be a program name with args.
7560set dummy $ac_prog; ac_word=$2
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7562$as_echo_n "checking for $ac_word... " >&6; }
7563if ${ac_cv_path_ECHO+:} false; then :
7564  $as_echo_n "(cached) " >&6
7565else
7566  case $ECHO in
7567  [\\/]* | ?:[\\/]*)
7568  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7569  ;;
7570  *)
7571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7572for as_dir in $PATH
7573do
7574  IFS=$as_save_IFS
7575  test -z "$as_dir" && as_dir=.
7576    for ac_exec_ext in '' $ac_executable_extensions; do
7577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7578    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7580    break 2
7581  fi
7582done
7583  done
7584IFS=$as_save_IFS
7585
7586  ;;
7587esac
7588fi
7589ECHO=$ac_cv_path_ECHO
7590if test -n "$ECHO"; then
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7592$as_echo "$ECHO" >&6; }
7593else
7594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7595$as_echo "no" >&6; }
7596fi
7597
7598
7599  test -n "$ECHO" && break
7600done
7601
7602    else
7603      # If it succeeded, then it was overridden by the user. We will use it
7604      # for the tool.
7605
7606      # First remove it from the list of overridden variables, so we can test
7607      # for unknown variables in the end.
7608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7609
7610      # Check if we try to supply an empty value
7611      if test "x$ECHO" = x; then
7612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7613$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7615$as_echo_n "checking for ECHO... " >&6; }
7616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7617$as_echo "disabled" >&6; }
7618      else
7619        # Check if the provided tool contains a complete path.
7620        tool_specified="$ECHO"
7621        tool_basename="${tool_specified##*/}"
7622        if test "x$tool_basename" = "x$tool_specified"; then
7623          # A command without a complete path is provided, search $PATH.
7624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7625$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7626          # Extract the first word of "$tool_basename", so it can be a program name with args.
7627set dummy $tool_basename; ac_word=$2
7628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7629$as_echo_n "checking for $ac_word... " >&6; }
7630if ${ac_cv_path_ECHO+:} false; then :
7631  $as_echo_n "(cached) " >&6
7632else
7633  case $ECHO in
7634  [\\/]* | ?:[\\/]*)
7635  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7636  ;;
7637  *)
7638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7639for as_dir in $PATH
7640do
7641  IFS=$as_save_IFS
7642  test -z "$as_dir" && as_dir=.
7643    for ac_exec_ext in '' $ac_executable_extensions; do
7644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7645    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7647    break 2
7648  fi
7649done
7650  done
7651IFS=$as_save_IFS
7652
7653  ;;
7654esac
7655fi
7656ECHO=$ac_cv_path_ECHO
7657if test -n "$ECHO"; then
7658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7659$as_echo "$ECHO" >&6; }
7660else
7661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7662$as_echo "no" >&6; }
7663fi
7664
7665
7666          if test "x$ECHO" = x; then
7667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7668          fi
7669        else
7670          # Otherwise we believe it is a complete path. Use it as it is.
7671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7672$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7674$as_echo_n "checking for ECHO... " >&6; }
7675          if test ! -x "$tool_specified"; then
7676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7677$as_echo "not found" >&6; }
7678            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7679          fi
7680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7681$as_echo "$tool_specified" >&6; }
7682        fi
7683      fi
7684    fi
7685
7686  fi
7687
7688
7689
7690  if test "x$ECHO" = x; then
7691    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7692  fi
7693
7694
7695
7696
7697
7698  # Publish this variable in the help.
7699
7700
7701  if [ -z "${EXPR+x}" ]; then
7702    # The variable is not set by user, try to locate tool using the code snippet
7703    for ac_prog in expr
7704do
7705  # Extract the first word of "$ac_prog", so it can be a program name with args.
7706set dummy $ac_prog; ac_word=$2
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7708$as_echo_n "checking for $ac_word... " >&6; }
7709if ${ac_cv_path_EXPR+:} false; then :
7710  $as_echo_n "(cached) " >&6
7711else
7712  case $EXPR in
7713  [\\/]* | ?:[\\/]*)
7714  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7715  ;;
7716  *)
7717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718for as_dir in $PATH
7719do
7720  IFS=$as_save_IFS
7721  test -z "$as_dir" && as_dir=.
7722    for ac_exec_ext in '' $ac_executable_extensions; do
7723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726    break 2
7727  fi
7728done
7729  done
7730IFS=$as_save_IFS
7731
7732  ;;
7733esac
7734fi
7735EXPR=$ac_cv_path_EXPR
7736if test -n "$EXPR"; then
7737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7738$as_echo "$EXPR" >&6; }
7739else
7740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7741$as_echo "no" >&6; }
7742fi
7743
7744
7745  test -n "$EXPR" && break
7746done
7747
7748  else
7749    # The variable is set, but is it from the command line or the environment?
7750
7751    # Try to remove the string !EXPR! from our list.
7752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7754      # If it failed, the variable was not from the command line. Ignore it,
7755      # but warn the user (except for BASH, which is always set by the calling BASH).
7756      if test "xEXPR" != xBASH; then
7757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7758$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7759      fi
7760      # Try to locate tool using the code snippet
7761      for ac_prog in expr
7762do
7763  # Extract the first word of "$ac_prog", so it can be a program name with args.
7764set dummy $ac_prog; ac_word=$2
7765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7766$as_echo_n "checking for $ac_word... " >&6; }
7767if ${ac_cv_path_EXPR+:} false; then :
7768  $as_echo_n "(cached) " >&6
7769else
7770  case $EXPR in
7771  [\\/]* | ?:[\\/]*)
7772  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7773  ;;
7774  *)
7775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7776for as_dir in $PATH
7777do
7778  IFS=$as_save_IFS
7779  test -z "$as_dir" && as_dir=.
7780    for ac_exec_ext in '' $ac_executable_extensions; do
7781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7782    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7784    break 2
7785  fi
7786done
7787  done
7788IFS=$as_save_IFS
7789
7790  ;;
7791esac
7792fi
7793EXPR=$ac_cv_path_EXPR
7794if test -n "$EXPR"; then
7795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7796$as_echo "$EXPR" >&6; }
7797else
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7799$as_echo "no" >&6; }
7800fi
7801
7802
7803  test -n "$EXPR" && break
7804done
7805
7806    else
7807      # If it succeeded, then it was overridden by the user. We will use it
7808      # for the tool.
7809
7810      # First remove it from the list of overridden variables, so we can test
7811      # for unknown variables in the end.
7812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7813
7814      # Check if we try to supply an empty value
7815      if test "x$EXPR" = x; then
7816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7817$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7819$as_echo_n "checking for EXPR... " >&6; }
7820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7821$as_echo "disabled" >&6; }
7822      else
7823        # Check if the provided tool contains a complete path.
7824        tool_specified="$EXPR"
7825        tool_basename="${tool_specified##*/}"
7826        if test "x$tool_basename" = "x$tool_specified"; then
7827          # A command without a complete path is provided, search $PATH.
7828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7829$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7830          # Extract the first word of "$tool_basename", so it can be a program name with args.
7831set dummy $tool_basename; ac_word=$2
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7833$as_echo_n "checking for $ac_word... " >&6; }
7834if ${ac_cv_path_EXPR+:} false; then :
7835  $as_echo_n "(cached) " >&6
7836else
7837  case $EXPR in
7838  [\\/]* | ?:[\\/]*)
7839  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7840  ;;
7841  *)
7842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7843for as_dir in $PATH
7844do
7845  IFS=$as_save_IFS
7846  test -z "$as_dir" && as_dir=.
7847    for ac_exec_ext in '' $ac_executable_extensions; do
7848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7849    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7851    break 2
7852  fi
7853done
7854  done
7855IFS=$as_save_IFS
7856
7857  ;;
7858esac
7859fi
7860EXPR=$ac_cv_path_EXPR
7861if test -n "$EXPR"; then
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7863$as_echo "$EXPR" >&6; }
7864else
7865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7866$as_echo "no" >&6; }
7867fi
7868
7869
7870          if test "x$EXPR" = x; then
7871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7872          fi
7873        else
7874          # Otherwise we believe it is a complete path. Use it as it is.
7875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7876$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7878$as_echo_n "checking for EXPR... " >&6; }
7879          if test ! -x "$tool_specified"; then
7880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7881$as_echo "not found" >&6; }
7882            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7883          fi
7884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7885$as_echo "$tool_specified" >&6; }
7886        fi
7887      fi
7888    fi
7889
7890  fi
7891
7892
7893
7894  if test "x$EXPR" = x; then
7895    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7896  fi
7897
7898
7899
7900
7901
7902  # Publish this variable in the help.
7903
7904
7905  if [ -z "${FILE+x}" ]; then
7906    # The variable is not set by user, try to locate tool using the code snippet
7907    for ac_prog in file
7908do
7909  # Extract the first word of "$ac_prog", so it can be a program name with args.
7910set dummy $ac_prog; ac_word=$2
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7912$as_echo_n "checking for $ac_word... " >&6; }
7913if ${ac_cv_path_FILE+:} false; then :
7914  $as_echo_n "(cached) " >&6
7915else
7916  case $FILE in
7917  [\\/]* | ?:[\\/]*)
7918  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7919  ;;
7920  *)
7921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7922for as_dir in $PATH
7923do
7924  IFS=$as_save_IFS
7925  test -z "$as_dir" && as_dir=.
7926    for ac_exec_ext in '' $ac_executable_extensions; do
7927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7928    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7930    break 2
7931  fi
7932done
7933  done
7934IFS=$as_save_IFS
7935
7936  ;;
7937esac
7938fi
7939FILE=$ac_cv_path_FILE
7940if test -n "$FILE"; then
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7942$as_echo "$FILE" >&6; }
7943else
7944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7945$as_echo "no" >&6; }
7946fi
7947
7948
7949  test -n "$FILE" && break
7950done
7951
7952  else
7953    # The variable is set, but is it from the command line or the environment?
7954
7955    # Try to remove the string !FILE! from our list.
7956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7958      # If it failed, the variable was not from the command line. Ignore it,
7959      # but warn the user (except for BASH, which is always set by the calling BASH).
7960      if test "xFILE" != xBASH; then
7961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7962$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7963      fi
7964      # Try to locate tool using the code snippet
7965      for ac_prog in file
7966do
7967  # Extract the first word of "$ac_prog", so it can be a program name with args.
7968set dummy $ac_prog; ac_word=$2
7969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7970$as_echo_n "checking for $ac_word... " >&6; }
7971if ${ac_cv_path_FILE+:} false; then :
7972  $as_echo_n "(cached) " >&6
7973else
7974  case $FILE in
7975  [\\/]* | ?:[\\/]*)
7976  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7977  ;;
7978  *)
7979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7980for as_dir in $PATH
7981do
7982  IFS=$as_save_IFS
7983  test -z "$as_dir" && as_dir=.
7984    for ac_exec_ext in '' $ac_executable_extensions; do
7985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7986    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7988    break 2
7989  fi
7990done
7991  done
7992IFS=$as_save_IFS
7993
7994  ;;
7995esac
7996fi
7997FILE=$ac_cv_path_FILE
7998if test -n "$FILE"; then
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8000$as_echo "$FILE" >&6; }
8001else
8002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003$as_echo "no" >&6; }
8004fi
8005
8006
8007  test -n "$FILE" && break
8008done
8009
8010    else
8011      # If it succeeded, then it was overridden by the user. We will use it
8012      # for the tool.
8013
8014      # First remove it from the list of overridden variables, so we can test
8015      # for unknown variables in the end.
8016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8017
8018      # Check if we try to supply an empty value
8019      if test "x$FILE" = x; then
8020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8021$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8023$as_echo_n "checking for FILE... " >&6; }
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8025$as_echo "disabled" >&6; }
8026      else
8027        # Check if the provided tool contains a complete path.
8028        tool_specified="$FILE"
8029        tool_basename="${tool_specified##*/}"
8030        if test "x$tool_basename" = "x$tool_specified"; then
8031          # A command without a complete path is provided, search $PATH.
8032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8033$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8034          # Extract the first word of "$tool_basename", so it can be a program name with args.
8035set dummy $tool_basename; ac_word=$2
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8037$as_echo_n "checking for $ac_word... " >&6; }
8038if ${ac_cv_path_FILE+:} false; then :
8039  $as_echo_n "(cached) " >&6
8040else
8041  case $FILE in
8042  [\\/]* | ?:[\\/]*)
8043  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8044  ;;
8045  *)
8046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049  IFS=$as_save_IFS
8050  test -z "$as_dir" && as_dir=.
8051    for ac_exec_ext in '' $ac_executable_extensions; do
8052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055    break 2
8056  fi
8057done
8058  done
8059IFS=$as_save_IFS
8060
8061  ;;
8062esac
8063fi
8064FILE=$ac_cv_path_FILE
8065if test -n "$FILE"; then
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8067$as_echo "$FILE" >&6; }
8068else
8069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070$as_echo "no" >&6; }
8071fi
8072
8073
8074          if test "x$FILE" = x; then
8075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8076          fi
8077        else
8078          # Otherwise we believe it is a complete path. Use it as it is.
8079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8080$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8082$as_echo_n "checking for FILE... " >&6; }
8083          if test ! -x "$tool_specified"; then
8084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8085$as_echo "not found" >&6; }
8086            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8087          fi
8088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8089$as_echo "$tool_specified" >&6; }
8090        fi
8091      fi
8092    fi
8093
8094  fi
8095
8096
8097
8098  if test "x$FILE" = x; then
8099    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8100  fi
8101
8102
8103
8104
8105
8106  # Publish this variable in the help.
8107
8108
8109  if [ -z "${FIND+x}" ]; then
8110    # The variable is not set by user, try to locate tool using the code snippet
8111    for ac_prog in find
8112do
8113  # Extract the first word of "$ac_prog", so it can be a program name with args.
8114set dummy $ac_prog; ac_word=$2
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8116$as_echo_n "checking for $ac_word... " >&6; }
8117if ${ac_cv_path_FIND+:} false; then :
8118  $as_echo_n "(cached) " >&6
8119else
8120  case $FIND in
8121  [\\/]* | ?:[\\/]*)
8122  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8123  ;;
8124  *)
8125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8126for as_dir in $PATH
8127do
8128  IFS=$as_save_IFS
8129  test -z "$as_dir" && as_dir=.
8130    for ac_exec_ext in '' $ac_executable_extensions; do
8131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8132    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8134    break 2
8135  fi
8136done
8137  done
8138IFS=$as_save_IFS
8139
8140  ;;
8141esac
8142fi
8143FIND=$ac_cv_path_FIND
8144if test -n "$FIND"; then
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8146$as_echo "$FIND" >&6; }
8147else
8148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
8150fi
8151
8152
8153  test -n "$FIND" && break
8154done
8155
8156  else
8157    # The variable is set, but is it from the command line or the environment?
8158
8159    # Try to remove the string !FIND! from our list.
8160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8162      # If it failed, the variable was not from the command line. Ignore it,
8163      # but warn the user (except for BASH, which is always set by the calling BASH).
8164      if test "xFIND" != xBASH; then
8165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8166$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8167      fi
8168      # Try to locate tool using the code snippet
8169      for ac_prog in find
8170do
8171  # Extract the first word of "$ac_prog", so it can be a program name with args.
8172set dummy $ac_prog; ac_word=$2
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8174$as_echo_n "checking for $ac_word... " >&6; }
8175if ${ac_cv_path_FIND+:} false; then :
8176  $as_echo_n "(cached) " >&6
8177else
8178  case $FIND in
8179  [\\/]* | ?:[\\/]*)
8180  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8181  ;;
8182  *)
8183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8184for as_dir in $PATH
8185do
8186  IFS=$as_save_IFS
8187  test -z "$as_dir" && as_dir=.
8188    for ac_exec_ext in '' $ac_executable_extensions; do
8189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8190    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8192    break 2
8193  fi
8194done
8195  done
8196IFS=$as_save_IFS
8197
8198  ;;
8199esac
8200fi
8201FIND=$ac_cv_path_FIND
8202if test -n "$FIND"; then
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8204$as_echo "$FIND" >&6; }
8205else
8206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8207$as_echo "no" >&6; }
8208fi
8209
8210
8211  test -n "$FIND" && break
8212done
8213
8214    else
8215      # If it succeeded, then it was overridden by the user. We will use it
8216      # for the tool.
8217
8218      # First remove it from the list of overridden variables, so we can test
8219      # for unknown variables in the end.
8220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8221
8222      # Check if we try to supply an empty value
8223      if test "x$FIND" = x; then
8224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8225$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8227$as_echo_n "checking for FIND... " >&6; }
8228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8229$as_echo "disabled" >&6; }
8230      else
8231        # Check if the provided tool contains a complete path.
8232        tool_specified="$FIND"
8233        tool_basename="${tool_specified##*/}"
8234        if test "x$tool_basename" = "x$tool_specified"; then
8235          # A command without a complete path is provided, search $PATH.
8236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8237$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8238          # Extract the first word of "$tool_basename", so it can be a program name with args.
8239set dummy $tool_basename; ac_word=$2
8240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8241$as_echo_n "checking for $ac_word... " >&6; }
8242if ${ac_cv_path_FIND+:} false; then :
8243  $as_echo_n "(cached) " >&6
8244else
8245  case $FIND in
8246  [\\/]* | ?:[\\/]*)
8247  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8248  ;;
8249  *)
8250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8251for as_dir in $PATH
8252do
8253  IFS=$as_save_IFS
8254  test -z "$as_dir" && as_dir=.
8255    for ac_exec_ext in '' $ac_executable_extensions; do
8256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8257    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8259    break 2
8260  fi
8261done
8262  done
8263IFS=$as_save_IFS
8264
8265  ;;
8266esac
8267fi
8268FIND=$ac_cv_path_FIND
8269if test -n "$FIND"; then
8270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8271$as_echo "$FIND" >&6; }
8272else
8273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8274$as_echo "no" >&6; }
8275fi
8276
8277
8278          if test "x$FIND" = x; then
8279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8280          fi
8281        else
8282          # Otherwise we believe it is a complete path. Use it as it is.
8283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8284$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8286$as_echo_n "checking for FIND... " >&6; }
8287          if test ! -x "$tool_specified"; then
8288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8289$as_echo "not found" >&6; }
8290            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8291          fi
8292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8293$as_echo "$tool_specified" >&6; }
8294        fi
8295      fi
8296    fi
8297
8298  fi
8299
8300
8301
8302  if test "x$FIND" = x; then
8303    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8304  fi
8305
8306
8307
8308
8309
8310  # Publish this variable in the help.
8311
8312
8313  if [ -z "${HEAD+x}" ]; then
8314    # The variable is not set by user, try to locate tool using the code snippet
8315    for ac_prog in head
8316do
8317  # Extract the first word of "$ac_prog", so it can be a program name with args.
8318set dummy $ac_prog; ac_word=$2
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320$as_echo_n "checking for $ac_word... " >&6; }
8321if ${ac_cv_path_HEAD+:} false; then :
8322  $as_echo_n "(cached) " >&6
8323else
8324  case $HEAD in
8325  [\\/]* | ?:[\\/]*)
8326  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8327  ;;
8328  *)
8329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330for as_dir in $PATH
8331do
8332  IFS=$as_save_IFS
8333  test -z "$as_dir" && as_dir=.
8334    for ac_exec_ext in '' $ac_executable_extensions; do
8335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8336    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8338    break 2
8339  fi
8340done
8341  done
8342IFS=$as_save_IFS
8343
8344  ;;
8345esac
8346fi
8347HEAD=$ac_cv_path_HEAD
8348if test -n "$HEAD"; then
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8350$as_echo "$HEAD" >&6; }
8351else
8352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8353$as_echo "no" >&6; }
8354fi
8355
8356
8357  test -n "$HEAD" && break
8358done
8359
8360  else
8361    # The variable is set, but is it from the command line or the environment?
8362
8363    # Try to remove the string !HEAD! from our list.
8364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8366      # If it failed, the variable was not from the command line. Ignore it,
8367      # but warn the user (except for BASH, which is always set by the calling BASH).
8368      if test "xHEAD" != xBASH; then
8369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8370$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8371      fi
8372      # Try to locate tool using the code snippet
8373      for ac_prog in head
8374do
8375  # Extract the first word of "$ac_prog", so it can be a program name with args.
8376set dummy $ac_prog; ac_word=$2
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378$as_echo_n "checking for $ac_word... " >&6; }
8379if ${ac_cv_path_HEAD+:} false; then :
8380  $as_echo_n "(cached) " >&6
8381else
8382  case $HEAD in
8383  [\\/]* | ?:[\\/]*)
8384  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8385  ;;
8386  *)
8387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388for as_dir in $PATH
8389do
8390  IFS=$as_save_IFS
8391  test -z "$as_dir" && as_dir=.
8392    for ac_exec_ext in '' $ac_executable_extensions; do
8393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396    break 2
8397  fi
8398done
8399  done
8400IFS=$as_save_IFS
8401
8402  ;;
8403esac
8404fi
8405HEAD=$ac_cv_path_HEAD
8406if test -n "$HEAD"; then
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8408$as_echo "$HEAD" >&6; }
8409else
8410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8411$as_echo "no" >&6; }
8412fi
8413
8414
8415  test -n "$HEAD" && break
8416done
8417
8418    else
8419      # If it succeeded, then it was overridden by the user. We will use it
8420      # for the tool.
8421
8422      # First remove it from the list of overridden variables, so we can test
8423      # for unknown variables in the end.
8424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8425
8426      # Check if we try to supply an empty value
8427      if test "x$HEAD" = x; then
8428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8429$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8431$as_echo_n "checking for HEAD... " >&6; }
8432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8433$as_echo "disabled" >&6; }
8434      else
8435        # Check if the provided tool contains a complete path.
8436        tool_specified="$HEAD"
8437        tool_basename="${tool_specified##*/}"
8438        if test "x$tool_basename" = "x$tool_specified"; then
8439          # A command without a complete path is provided, search $PATH.
8440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8441$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8442          # Extract the first word of "$tool_basename", so it can be a program name with args.
8443set dummy $tool_basename; ac_word=$2
8444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8445$as_echo_n "checking for $ac_word... " >&6; }
8446if ${ac_cv_path_HEAD+:} false; then :
8447  $as_echo_n "(cached) " >&6
8448else
8449  case $HEAD in
8450  [\\/]* | ?:[\\/]*)
8451  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8452  ;;
8453  *)
8454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8455for as_dir in $PATH
8456do
8457  IFS=$as_save_IFS
8458  test -z "$as_dir" && as_dir=.
8459    for ac_exec_ext in '' $ac_executable_extensions; do
8460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8461    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8463    break 2
8464  fi
8465done
8466  done
8467IFS=$as_save_IFS
8468
8469  ;;
8470esac
8471fi
8472HEAD=$ac_cv_path_HEAD
8473if test -n "$HEAD"; then
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8475$as_echo "$HEAD" >&6; }
8476else
8477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8478$as_echo "no" >&6; }
8479fi
8480
8481
8482          if test "x$HEAD" = x; then
8483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8484          fi
8485        else
8486          # Otherwise we believe it is a complete path. Use it as it is.
8487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8488$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8490$as_echo_n "checking for HEAD... " >&6; }
8491          if test ! -x "$tool_specified"; then
8492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8493$as_echo "not found" >&6; }
8494            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8495          fi
8496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8497$as_echo "$tool_specified" >&6; }
8498        fi
8499      fi
8500    fi
8501
8502  fi
8503
8504
8505
8506  if test "x$HEAD" = x; then
8507    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8508  fi
8509
8510
8511
8512
8513
8514  # Publish this variable in the help.
8515
8516
8517  if [ -z "${GUNZIP+x}" ]; then
8518    # The variable is not set by user, try to locate tool using the code snippet
8519    for ac_prog in gunzip
8520do
8521  # Extract the first word of "$ac_prog", so it can be a program name with args.
8522set dummy $ac_prog; ac_word=$2
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8524$as_echo_n "checking for $ac_word... " >&6; }
8525if ${ac_cv_path_GUNZIP+:} false; then :
8526  $as_echo_n "(cached) " >&6
8527else
8528  case $GUNZIP in
8529  [\\/]* | ?:[\\/]*)
8530  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8531  ;;
8532  *)
8533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8534for as_dir in $PATH
8535do
8536  IFS=$as_save_IFS
8537  test -z "$as_dir" && as_dir=.
8538    for ac_exec_ext in '' $ac_executable_extensions; do
8539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8540    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8542    break 2
8543  fi
8544done
8545  done
8546IFS=$as_save_IFS
8547
8548  ;;
8549esac
8550fi
8551GUNZIP=$ac_cv_path_GUNZIP
8552if test -n "$GUNZIP"; then
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8554$as_echo "$GUNZIP" >&6; }
8555else
8556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8557$as_echo "no" >&6; }
8558fi
8559
8560
8561  test -n "$GUNZIP" && break
8562done
8563
8564  else
8565    # The variable is set, but is it from the command line or the environment?
8566
8567    # Try to remove the string !GUNZIP! from our list.
8568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8570      # If it failed, the variable was not from the command line. Ignore it,
8571      # but warn the user (except for BASH, which is always set by the calling BASH).
8572      if test "xGUNZIP" != xBASH; then
8573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8574$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8575      fi
8576      # Try to locate tool using the code snippet
8577      for ac_prog in gunzip
8578do
8579  # Extract the first word of "$ac_prog", so it can be a program name with args.
8580set dummy $ac_prog; ac_word=$2
8581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8582$as_echo_n "checking for $ac_word... " >&6; }
8583if ${ac_cv_path_GUNZIP+:} false; then :
8584  $as_echo_n "(cached) " >&6
8585else
8586  case $GUNZIP in
8587  [\\/]* | ?:[\\/]*)
8588  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8589  ;;
8590  *)
8591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8592for as_dir in $PATH
8593do
8594  IFS=$as_save_IFS
8595  test -z "$as_dir" && as_dir=.
8596    for ac_exec_ext in '' $ac_executable_extensions; do
8597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8598    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8600    break 2
8601  fi
8602done
8603  done
8604IFS=$as_save_IFS
8605
8606  ;;
8607esac
8608fi
8609GUNZIP=$ac_cv_path_GUNZIP
8610if test -n "$GUNZIP"; then
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8612$as_echo "$GUNZIP" >&6; }
8613else
8614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8615$as_echo "no" >&6; }
8616fi
8617
8618
8619  test -n "$GUNZIP" && break
8620done
8621
8622    else
8623      # If it succeeded, then it was overridden by the user. We will use it
8624      # for the tool.
8625
8626      # First remove it from the list of overridden variables, so we can test
8627      # for unknown variables in the end.
8628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8629
8630      # Check if we try to supply an empty value
8631      if test "x$GUNZIP" = x; then
8632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8633$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8635$as_echo_n "checking for GUNZIP... " >&6; }
8636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8637$as_echo "disabled" >&6; }
8638      else
8639        # Check if the provided tool contains a complete path.
8640        tool_specified="$GUNZIP"
8641        tool_basename="${tool_specified##*/}"
8642        if test "x$tool_basename" = "x$tool_specified"; then
8643          # A command without a complete path is provided, search $PATH.
8644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8645$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8646          # Extract the first word of "$tool_basename", so it can be a program name with args.
8647set dummy $tool_basename; ac_word=$2
8648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8649$as_echo_n "checking for $ac_word... " >&6; }
8650if ${ac_cv_path_GUNZIP+:} false; then :
8651  $as_echo_n "(cached) " >&6
8652else
8653  case $GUNZIP in
8654  [\\/]* | ?:[\\/]*)
8655  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8656  ;;
8657  *)
8658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8659for as_dir in $PATH
8660do
8661  IFS=$as_save_IFS
8662  test -z "$as_dir" && as_dir=.
8663    for ac_exec_ext in '' $ac_executable_extensions; do
8664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8665    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8667    break 2
8668  fi
8669done
8670  done
8671IFS=$as_save_IFS
8672
8673  ;;
8674esac
8675fi
8676GUNZIP=$ac_cv_path_GUNZIP
8677if test -n "$GUNZIP"; then
8678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8679$as_echo "$GUNZIP" >&6; }
8680else
8681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8682$as_echo "no" >&6; }
8683fi
8684
8685
8686          if test "x$GUNZIP" = x; then
8687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8688          fi
8689        else
8690          # Otherwise we believe it is a complete path. Use it as it is.
8691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8692$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8694$as_echo_n "checking for GUNZIP... " >&6; }
8695          if test ! -x "$tool_specified"; then
8696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8697$as_echo "not found" >&6; }
8698            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8699          fi
8700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8701$as_echo "$tool_specified" >&6; }
8702        fi
8703      fi
8704    fi
8705
8706  fi
8707
8708
8709
8710  if test "x$GUNZIP" = x; then
8711    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8712  fi
8713
8714
8715
8716
8717
8718  # Publish this variable in the help.
8719
8720
8721  if [ -z "${GZIP+x}" ]; then
8722    # The variable is not set by user, try to locate tool using the code snippet
8723    for ac_prog in pigz gzip
8724do
8725  # Extract the first word of "$ac_prog", so it can be a program name with args.
8726set dummy $ac_prog; ac_word=$2
8727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8728$as_echo_n "checking for $ac_word... " >&6; }
8729if ${ac_cv_path_GZIP+:} false; then :
8730  $as_echo_n "(cached) " >&6
8731else
8732  case $GZIP in
8733  [\\/]* | ?:[\\/]*)
8734  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8735  ;;
8736  *)
8737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8738for as_dir in $PATH
8739do
8740  IFS=$as_save_IFS
8741  test -z "$as_dir" && as_dir=.
8742    for ac_exec_ext in '' $ac_executable_extensions; do
8743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8744    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8746    break 2
8747  fi
8748done
8749  done
8750IFS=$as_save_IFS
8751
8752  ;;
8753esac
8754fi
8755GZIP=$ac_cv_path_GZIP
8756if test -n "$GZIP"; then
8757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8758$as_echo "$GZIP" >&6; }
8759else
8760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761$as_echo "no" >&6; }
8762fi
8763
8764
8765  test -n "$GZIP" && break
8766done
8767
8768  else
8769    # The variable is set, but is it from the command line or the environment?
8770
8771    # Try to remove the string !GZIP! from our list.
8772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8774      # If it failed, the variable was not from the command line. Ignore it,
8775      # but warn the user (except for BASH, which is always set by the calling BASH).
8776      if test "xGZIP" != xBASH; then
8777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8778$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8779      fi
8780      # Try to locate tool using the code snippet
8781      for ac_prog in pigz gzip
8782do
8783  # Extract the first word of "$ac_prog", so it can be a program name with args.
8784set dummy $ac_prog; ac_word=$2
8785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8786$as_echo_n "checking for $ac_word... " >&6; }
8787if ${ac_cv_path_GZIP+:} false; then :
8788  $as_echo_n "(cached) " >&6
8789else
8790  case $GZIP in
8791  [\\/]* | ?:[\\/]*)
8792  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8793  ;;
8794  *)
8795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8796for as_dir in $PATH
8797do
8798  IFS=$as_save_IFS
8799  test -z "$as_dir" && as_dir=.
8800    for ac_exec_ext in '' $ac_executable_extensions; do
8801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8802    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8804    break 2
8805  fi
8806done
8807  done
8808IFS=$as_save_IFS
8809
8810  ;;
8811esac
8812fi
8813GZIP=$ac_cv_path_GZIP
8814if test -n "$GZIP"; then
8815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8816$as_echo "$GZIP" >&6; }
8817else
8818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819$as_echo "no" >&6; }
8820fi
8821
8822
8823  test -n "$GZIP" && break
8824done
8825
8826    else
8827      # If it succeeded, then it was overridden by the user. We will use it
8828      # for the tool.
8829
8830      # First remove it from the list of overridden variables, so we can test
8831      # for unknown variables in the end.
8832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8833
8834      # Check if we try to supply an empty value
8835      if test "x$GZIP" = x; then
8836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8837$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8839$as_echo_n "checking for GZIP... " >&6; }
8840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8841$as_echo "disabled" >&6; }
8842      else
8843        # Check if the provided tool contains a complete path.
8844        tool_specified="$GZIP"
8845        tool_basename="${tool_specified##*/}"
8846        if test "x$tool_basename" = "x$tool_specified"; then
8847          # A command without a complete path is provided, search $PATH.
8848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8849$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8850          # Extract the first word of "$tool_basename", so it can be a program name with args.
8851set dummy $tool_basename; ac_word=$2
8852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8853$as_echo_n "checking for $ac_word... " >&6; }
8854if ${ac_cv_path_GZIP+:} false; then :
8855  $as_echo_n "(cached) " >&6
8856else
8857  case $GZIP in
8858  [\\/]* | ?:[\\/]*)
8859  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8860  ;;
8861  *)
8862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8863for as_dir in $PATH
8864do
8865  IFS=$as_save_IFS
8866  test -z "$as_dir" && as_dir=.
8867    for ac_exec_ext in '' $ac_executable_extensions; do
8868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8869    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8871    break 2
8872  fi
8873done
8874  done
8875IFS=$as_save_IFS
8876
8877  ;;
8878esac
8879fi
8880GZIP=$ac_cv_path_GZIP
8881if test -n "$GZIP"; then
8882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8883$as_echo "$GZIP" >&6; }
8884else
8885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8886$as_echo "no" >&6; }
8887fi
8888
8889
8890          if test "x$GZIP" = x; then
8891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8892          fi
8893        else
8894          # Otherwise we believe it is a complete path. Use it as it is.
8895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8896$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8898$as_echo_n "checking for GZIP... " >&6; }
8899          if test ! -x "$tool_specified"; then
8900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8901$as_echo "not found" >&6; }
8902            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8903          fi
8904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8905$as_echo "$tool_specified" >&6; }
8906        fi
8907      fi
8908    fi
8909
8910  fi
8911
8912
8913
8914  if test "x$GZIP" = x; then
8915    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8916  fi
8917
8918
8919
8920
8921
8922  # Publish this variable in the help.
8923
8924
8925  if [ -z "${LN+x}" ]; then
8926    # The variable is not set by user, try to locate tool using the code snippet
8927    for ac_prog in ln
8928do
8929  # Extract the first word of "$ac_prog", so it can be a program name with args.
8930set dummy $ac_prog; ac_word=$2
8931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8932$as_echo_n "checking for $ac_word... " >&6; }
8933if ${ac_cv_path_LN+:} false; then :
8934  $as_echo_n "(cached) " >&6
8935else
8936  case $LN in
8937  [\\/]* | ?:[\\/]*)
8938  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8939  ;;
8940  *)
8941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8942for as_dir in $PATH
8943do
8944  IFS=$as_save_IFS
8945  test -z "$as_dir" && as_dir=.
8946    for ac_exec_ext in '' $ac_executable_extensions; do
8947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8948    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8950    break 2
8951  fi
8952done
8953  done
8954IFS=$as_save_IFS
8955
8956  ;;
8957esac
8958fi
8959LN=$ac_cv_path_LN
8960if test -n "$LN"; then
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8962$as_echo "$LN" >&6; }
8963else
8964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8965$as_echo "no" >&6; }
8966fi
8967
8968
8969  test -n "$LN" && break
8970done
8971
8972  else
8973    # The variable is set, but is it from the command line or the environment?
8974
8975    # Try to remove the string !LN! from our list.
8976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8978      # If it failed, the variable was not from the command line. Ignore it,
8979      # but warn the user (except for BASH, which is always set by the calling BASH).
8980      if test "xLN" != xBASH; then
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8982$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8983      fi
8984      # Try to locate tool using the code snippet
8985      for ac_prog in ln
8986do
8987  # Extract the first word of "$ac_prog", so it can be a program name with args.
8988set dummy $ac_prog; ac_word=$2
8989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8990$as_echo_n "checking for $ac_word... " >&6; }
8991if ${ac_cv_path_LN+:} false; then :
8992  $as_echo_n "(cached) " >&6
8993else
8994  case $LN in
8995  [\\/]* | ?:[\\/]*)
8996  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8997  ;;
8998  *)
8999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9000for as_dir in $PATH
9001do
9002  IFS=$as_save_IFS
9003  test -z "$as_dir" && as_dir=.
9004    for ac_exec_ext in '' $ac_executable_extensions; do
9005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9006    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9008    break 2
9009  fi
9010done
9011  done
9012IFS=$as_save_IFS
9013
9014  ;;
9015esac
9016fi
9017LN=$ac_cv_path_LN
9018if test -n "$LN"; then
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9020$as_echo "$LN" >&6; }
9021else
9022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023$as_echo "no" >&6; }
9024fi
9025
9026
9027  test -n "$LN" && break
9028done
9029
9030    else
9031      # If it succeeded, then it was overridden by the user. We will use it
9032      # for the tool.
9033
9034      # First remove it from the list of overridden variables, so we can test
9035      # for unknown variables in the end.
9036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9037
9038      # Check if we try to supply an empty value
9039      if test "x$LN" = x; then
9040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9041$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9043$as_echo_n "checking for LN... " >&6; }
9044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9045$as_echo "disabled" >&6; }
9046      else
9047        # Check if the provided tool contains a complete path.
9048        tool_specified="$LN"
9049        tool_basename="${tool_specified##*/}"
9050        if test "x$tool_basename" = "x$tool_specified"; then
9051          # A command without a complete path is provided, search $PATH.
9052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9053$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9054          # Extract the first word of "$tool_basename", so it can be a program name with args.
9055set dummy $tool_basename; ac_word=$2
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9057$as_echo_n "checking for $ac_word... " >&6; }
9058if ${ac_cv_path_LN+:} false; then :
9059  $as_echo_n "(cached) " >&6
9060else
9061  case $LN in
9062  [\\/]* | ?:[\\/]*)
9063  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9064  ;;
9065  *)
9066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9067for as_dir in $PATH
9068do
9069  IFS=$as_save_IFS
9070  test -z "$as_dir" && as_dir=.
9071    for ac_exec_ext in '' $ac_executable_extensions; do
9072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9073    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9075    break 2
9076  fi
9077done
9078  done
9079IFS=$as_save_IFS
9080
9081  ;;
9082esac
9083fi
9084LN=$ac_cv_path_LN
9085if test -n "$LN"; then
9086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9087$as_echo "$LN" >&6; }
9088else
9089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090$as_echo "no" >&6; }
9091fi
9092
9093
9094          if test "x$LN" = x; then
9095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9096          fi
9097        else
9098          # Otherwise we believe it is a complete path. Use it as it is.
9099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9100$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9102$as_echo_n "checking for LN... " >&6; }
9103          if test ! -x "$tool_specified"; then
9104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9105$as_echo "not found" >&6; }
9106            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9107          fi
9108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9109$as_echo "$tool_specified" >&6; }
9110        fi
9111      fi
9112    fi
9113
9114  fi
9115
9116
9117
9118  if test "x$LN" = x; then
9119    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9120  fi
9121
9122
9123
9124
9125
9126  # Publish this variable in the help.
9127
9128
9129  if [ -z "${LS+x}" ]; then
9130    # The variable is not set by user, try to locate tool using the code snippet
9131    for ac_prog in ls
9132do
9133  # Extract the first word of "$ac_prog", so it can be a program name with args.
9134set dummy $ac_prog; ac_word=$2
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9136$as_echo_n "checking for $ac_word... " >&6; }
9137if ${ac_cv_path_LS+:} false; then :
9138  $as_echo_n "(cached) " >&6
9139else
9140  case $LS in
9141  [\\/]* | ?:[\\/]*)
9142  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9143  ;;
9144  *)
9145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9146for as_dir in $PATH
9147do
9148  IFS=$as_save_IFS
9149  test -z "$as_dir" && as_dir=.
9150    for ac_exec_ext in '' $ac_executable_extensions; do
9151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9152    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9154    break 2
9155  fi
9156done
9157  done
9158IFS=$as_save_IFS
9159
9160  ;;
9161esac
9162fi
9163LS=$ac_cv_path_LS
9164if test -n "$LS"; then
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9166$as_echo "$LS" >&6; }
9167else
9168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9169$as_echo "no" >&6; }
9170fi
9171
9172
9173  test -n "$LS" && break
9174done
9175
9176  else
9177    # The variable is set, but is it from the command line or the environment?
9178
9179    # Try to remove the string !LS! from our list.
9180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9182      # If it failed, the variable was not from the command line. Ignore it,
9183      # but warn the user (except for BASH, which is always set by the calling BASH).
9184      if test "xLS" != xBASH; then
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9186$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9187      fi
9188      # Try to locate tool using the code snippet
9189      for ac_prog in ls
9190do
9191  # Extract the first word of "$ac_prog", so it can be a program name with args.
9192set dummy $ac_prog; ac_word=$2
9193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9194$as_echo_n "checking for $ac_word... " >&6; }
9195if ${ac_cv_path_LS+:} false; then :
9196  $as_echo_n "(cached) " >&6
9197else
9198  case $LS in
9199  [\\/]* | ?:[\\/]*)
9200  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9201  ;;
9202  *)
9203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204for as_dir in $PATH
9205do
9206  IFS=$as_save_IFS
9207  test -z "$as_dir" && as_dir=.
9208    for ac_exec_ext in '' $ac_executable_extensions; do
9209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9210    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9212    break 2
9213  fi
9214done
9215  done
9216IFS=$as_save_IFS
9217
9218  ;;
9219esac
9220fi
9221LS=$ac_cv_path_LS
9222if test -n "$LS"; then
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9224$as_echo "$LS" >&6; }
9225else
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
9228fi
9229
9230
9231  test -n "$LS" && break
9232done
9233
9234    else
9235      # If it succeeded, then it was overridden by the user. We will use it
9236      # for the tool.
9237
9238      # First remove it from the list of overridden variables, so we can test
9239      # for unknown variables in the end.
9240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9241
9242      # Check if we try to supply an empty value
9243      if test "x$LS" = x; then
9244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9245$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9247$as_echo_n "checking for LS... " >&6; }
9248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9249$as_echo "disabled" >&6; }
9250      else
9251        # Check if the provided tool contains a complete path.
9252        tool_specified="$LS"
9253        tool_basename="${tool_specified##*/}"
9254        if test "x$tool_basename" = "x$tool_specified"; then
9255          # A command without a complete path is provided, search $PATH.
9256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9257$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9258          # Extract the first word of "$tool_basename", so it can be a program name with args.
9259set dummy $tool_basename; ac_word=$2
9260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9261$as_echo_n "checking for $ac_word... " >&6; }
9262if ${ac_cv_path_LS+:} false; then :
9263  $as_echo_n "(cached) " >&6
9264else
9265  case $LS in
9266  [\\/]* | ?:[\\/]*)
9267  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9268  ;;
9269  *)
9270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9271for as_dir in $PATH
9272do
9273  IFS=$as_save_IFS
9274  test -z "$as_dir" && as_dir=.
9275    for ac_exec_ext in '' $ac_executable_extensions; do
9276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9277    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9279    break 2
9280  fi
9281done
9282  done
9283IFS=$as_save_IFS
9284
9285  ;;
9286esac
9287fi
9288LS=$ac_cv_path_LS
9289if test -n "$LS"; then
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9291$as_echo "$LS" >&6; }
9292else
9293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9294$as_echo "no" >&6; }
9295fi
9296
9297
9298          if test "x$LS" = x; then
9299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9300          fi
9301        else
9302          # Otherwise we believe it is a complete path. Use it as it is.
9303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9304$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9306$as_echo_n "checking for LS... " >&6; }
9307          if test ! -x "$tool_specified"; then
9308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9309$as_echo "not found" >&6; }
9310            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9311          fi
9312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9313$as_echo "$tool_specified" >&6; }
9314        fi
9315      fi
9316    fi
9317
9318  fi
9319
9320
9321
9322  if test "x$LS" = x; then
9323    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9324  fi
9325
9326
9327
9328
9329
9330  # Publish this variable in the help.
9331
9332
9333  if [ -z "${MKDIR+x}" ]; then
9334    # The variable is not set by user, try to locate tool using the code snippet
9335    for ac_prog in mkdir
9336do
9337  # Extract the first word of "$ac_prog", so it can be a program name with args.
9338set dummy $ac_prog; ac_word=$2
9339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9340$as_echo_n "checking for $ac_word... " >&6; }
9341if ${ac_cv_path_MKDIR+:} false; then :
9342  $as_echo_n "(cached) " >&6
9343else
9344  case $MKDIR in
9345  [\\/]* | ?:[\\/]*)
9346  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9347  ;;
9348  *)
9349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9350for as_dir in $PATH
9351do
9352  IFS=$as_save_IFS
9353  test -z "$as_dir" && as_dir=.
9354    for ac_exec_ext in '' $ac_executable_extensions; do
9355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9356    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9358    break 2
9359  fi
9360done
9361  done
9362IFS=$as_save_IFS
9363
9364  ;;
9365esac
9366fi
9367MKDIR=$ac_cv_path_MKDIR
9368if test -n "$MKDIR"; then
9369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9370$as_echo "$MKDIR" >&6; }
9371else
9372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9373$as_echo "no" >&6; }
9374fi
9375
9376
9377  test -n "$MKDIR" && break
9378done
9379
9380  else
9381    # The variable is set, but is it from the command line or the environment?
9382
9383    # Try to remove the string !MKDIR! from our list.
9384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9386      # If it failed, the variable was not from the command line. Ignore it,
9387      # but warn the user (except for BASH, which is always set by the calling BASH).
9388      if test "xMKDIR" != xBASH; then
9389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9390$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9391      fi
9392      # Try to locate tool using the code snippet
9393      for ac_prog in mkdir
9394do
9395  # Extract the first word of "$ac_prog", so it can be a program name with args.
9396set dummy $ac_prog; ac_word=$2
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9398$as_echo_n "checking for $ac_word... " >&6; }
9399if ${ac_cv_path_MKDIR+:} false; then :
9400  $as_echo_n "(cached) " >&6
9401else
9402  case $MKDIR in
9403  [\\/]* | ?:[\\/]*)
9404  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9405  ;;
9406  *)
9407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9408for as_dir in $PATH
9409do
9410  IFS=$as_save_IFS
9411  test -z "$as_dir" && as_dir=.
9412    for ac_exec_ext in '' $ac_executable_extensions; do
9413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9414    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9416    break 2
9417  fi
9418done
9419  done
9420IFS=$as_save_IFS
9421
9422  ;;
9423esac
9424fi
9425MKDIR=$ac_cv_path_MKDIR
9426if test -n "$MKDIR"; then
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9428$as_echo "$MKDIR" >&6; }
9429else
9430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431$as_echo "no" >&6; }
9432fi
9433
9434
9435  test -n "$MKDIR" && break
9436done
9437
9438    else
9439      # If it succeeded, then it was overridden by the user. We will use it
9440      # for the tool.
9441
9442      # First remove it from the list of overridden variables, so we can test
9443      # for unknown variables in the end.
9444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9445
9446      # Check if we try to supply an empty value
9447      if test "x$MKDIR" = x; then
9448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9449$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9451$as_echo_n "checking for MKDIR... " >&6; }
9452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9453$as_echo "disabled" >&6; }
9454      else
9455        # Check if the provided tool contains a complete path.
9456        tool_specified="$MKDIR"
9457        tool_basename="${tool_specified##*/}"
9458        if test "x$tool_basename" = "x$tool_specified"; then
9459          # A command without a complete path is provided, search $PATH.
9460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9461$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9462          # Extract the first word of "$tool_basename", so it can be a program name with args.
9463set dummy $tool_basename; ac_word=$2
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9465$as_echo_n "checking for $ac_word... " >&6; }
9466if ${ac_cv_path_MKDIR+:} false; then :
9467  $as_echo_n "(cached) " >&6
9468else
9469  case $MKDIR in
9470  [\\/]* | ?:[\\/]*)
9471  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9472  ;;
9473  *)
9474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9475for as_dir in $PATH
9476do
9477  IFS=$as_save_IFS
9478  test -z "$as_dir" && as_dir=.
9479    for ac_exec_ext in '' $ac_executable_extensions; do
9480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9481    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9483    break 2
9484  fi
9485done
9486  done
9487IFS=$as_save_IFS
9488
9489  ;;
9490esac
9491fi
9492MKDIR=$ac_cv_path_MKDIR
9493if test -n "$MKDIR"; then
9494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9495$as_echo "$MKDIR" >&6; }
9496else
9497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9498$as_echo "no" >&6; }
9499fi
9500
9501
9502          if test "x$MKDIR" = x; then
9503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9504          fi
9505        else
9506          # Otherwise we believe it is a complete path. Use it as it is.
9507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9508$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9510$as_echo_n "checking for MKDIR... " >&6; }
9511          if test ! -x "$tool_specified"; then
9512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9513$as_echo "not found" >&6; }
9514            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9515          fi
9516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9517$as_echo "$tool_specified" >&6; }
9518        fi
9519      fi
9520    fi
9521
9522  fi
9523
9524
9525
9526  if test "x$MKDIR" = x; then
9527    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9528  fi
9529
9530
9531
9532
9533
9534  # Publish this variable in the help.
9535
9536
9537  if [ -z "${MKTEMP+x}" ]; then
9538    # The variable is not set by user, try to locate tool using the code snippet
9539    for ac_prog in mktemp
9540do
9541  # Extract the first word of "$ac_prog", so it can be a program name with args.
9542set dummy $ac_prog; ac_word=$2
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9544$as_echo_n "checking for $ac_word... " >&6; }
9545if ${ac_cv_path_MKTEMP+:} false; then :
9546  $as_echo_n "(cached) " >&6
9547else
9548  case $MKTEMP in
9549  [\\/]* | ?:[\\/]*)
9550  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9551  ;;
9552  *)
9553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9554for as_dir in $PATH
9555do
9556  IFS=$as_save_IFS
9557  test -z "$as_dir" && as_dir=.
9558    for ac_exec_ext in '' $ac_executable_extensions; do
9559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9560    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9562    break 2
9563  fi
9564done
9565  done
9566IFS=$as_save_IFS
9567
9568  ;;
9569esac
9570fi
9571MKTEMP=$ac_cv_path_MKTEMP
9572if test -n "$MKTEMP"; then
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9574$as_echo "$MKTEMP" >&6; }
9575else
9576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9577$as_echo "no" >&6; }
9578fi
9579
9580
9581  test -n "$MKTEMP" && break
9582done
9583
9584  else
9585    # The variable is set, but is it from the command line or the environment?
9586
9587    # Try to remove the string !MKTEMP! from our list.
9588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9590      # If it failed, the variable was not from the command line. Ignore it,
9591      # but warn the user (except for BASH, which is always set by the calling BASH).
9592      if test "xMKTEMP" != xBASH; then
9593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9594$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9595      fi
9596      # Try to locate tool using the code snippet
9597      for ac_prog in mktemp
9598do
9599  # Extract the first word of "$ac_prog", so it can be a program name with args.
9600set dummy $ac_prog; ac_word=$2
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9602$as_echo_n "checking for $ac_word... " >&6; }
9603if ${ac_cv_path_MKTEMP+:} false; then :
9604  $as_echo_n "(cached) " >&6
9605else
9606  case $MKTEMP in
9607  [\\/]* | ?:[\\/]*)
9608  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9609  ;;
9610  *)
9611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612for as_dir in $PATH
9613do
9614  IFS=$as_save_IFS
9615  test -z "$as_dir" && as_dir=.
9616    for ac_exec_ext in '' $ac_executable_extensions; do
9617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9618    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9620    break 2
9621  fi
9622done
9623  done
9624IFS=$as_save_IFS
9625
9626  ;;
9627esac
9628fi
9629MKTEMP=$ac_cv_path_MKTEMP
9630if test -n "$MKTEMP"; then
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9632$as_echo "$MKTEMP" >&6; }
9633else
9634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636fi
9637
9638
9639  test -n "$MKTEMP" && break
9640done
9641
9642    else
9643      # If it succeeded, then it was overridden by the user. We will use it
9644      # for the tool.
9645
9646      # First remove it from the list of overridden variables, so we can test
9647      # for unknown variables in the end.
9648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9649
9650      # Check if we try to supply an empty value
9651      if test "x$MKTEMP" = x; then
9652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9653$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9655$as_echo_n "checking for MKTEMP... " >&6; }
9656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9657$as_echo "disabled" >&6; }
9658      else
9659        # Check if the provided tool contains a complete path.
9660        tool_specified="$MKTEMP"
9661        tool_basename="${tool_specified##*/}"
9662        if test "x$tool_basename" = "x$tool_specified"; then
9663          # A command without a complete path is provided, search $PATH.
9664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9665$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9666          # Extract the first word of "$tool_basename", so it can be a program name with args.
9667set dummy $tool_basename; ac_word=$2
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9669$as_echo_n "checking for $ac_word... " >&6; }
9670if ${ac_cv_path_MKTEMP+:} false; then :
9671  $as_echo_n "(cached) " >&6
9672else
9673  case $MKTEMP in
9674  [\\/]* | ?:[\\/]*)
9675  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9676  ;;
9677  *)
9678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9679for as_dir in $PATH
9680do
9681  IFS=$as_save_IFS
9682  test -z "$as_dir" && as_dir=.
9683    for ac_exec_ext in '' $ac_executable_extensions; do
9684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9685    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9687    break 2
9688  fi
9689done
9690  done
9691IFS=$as_save_IFS
9692
9693  ;;
9694esac
9695fi
9696MKTEMP=$ac_cv_path_MKTEMP
9697if test -n "$MKTEMP"; then
9698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9699$as_echo "$MKTEMP" >&6; }
9700else
9701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9702$as_echo "no" >&6; }
9703fi
9704
9705
9706          if test "x$MKTEMP" = x; then
9707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9708          fi
9709        else
9710          # Otherwise we believe it is a complete path. Use it as it is.
9711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9712$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9714$as_echo_n "checking for MKTEMP... " >&6; }
9715          if test ! -x "$tool_specified"; then
9716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9717$as_echo "not found" >&6; }
9718            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9719          fi
9720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9721$as_echo "$tool_specified" >&6; }
9722        fi
9723      fi
9724    fi
9725
9726  fi
9727
9728
9729
9730  if test "x$MKTEMP" = x; then
9731    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9732  fi
9733
9734
9735
9736
9737
9738  # Publish this variable in the help.
9739
9740
9741  if [ -z "${MV+x}" ]; then
9742    # The variable is not set by user, try to locate tool using the code snippet
9743    for ac_prog in mv
9744do
9745  # Extract the first word of "$ac_prog", so it can be a program name with args.
9746set dummy $ac_prog; ac_word=$2
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9748$as_echo_n "checking for $ac_word... " >&6; }
9749if ${ac_cv_path_MV+:} false; then :
9750  $as_echo_n "(cached) " >&6
9751else
9752  case $MV in
9753  [\\/]* | ?:[\\/]*)
9754  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9755  ;;
9756  *)
9757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9758for as_dir in $PATH
9759do
9760  IFS=$as_save_IFS
9761  test -z "$as_dir" && as_dir=.
9762    for ac_exec_ext in '' $ac_executable_extensions; do
9763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9764    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9766    break 2
9767  fi
9768done
9769  done
9770IFS=$as_save_IFS
9771
9772  ;;
9773esac
9774fi
9775MV=$ac_cv_path_MV
9776if test -n "$MV"; then
9777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9778$as_echo "$MV" >&6; }
9779else
9780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
9782fi
9783
9784
9785  test -n "$MV" && break
9786done
9787
9788  else
9789    # The variable is set, but is it from the command line or the environment?
9790
9791    # Try to remove the string !MV! from our list.
9792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9794      # If it failed, the variable was not from the command line. Ignore it,
9795      # but warn the user (except for BASH, which is always set by the calling BASH).
9796      if test "xMV" != xBASH; then
9797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9798$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9799      fi
9800      # Try to locate tool using the code snippet
9801      for ac_prog in mv
9802do
9803  # Extract the first word of "$ac_prog", so it can be a program name with args.
9804set dummy $ac_prog; ac_word=$2
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9806$as_echo_n "checking for $ac_word... " >&6; }
9807if ${ac_cv_path_MV+:} false; then :
9808  $as_echo_n "(cached) " >&6
9809else
9810  case $MV in
9811  [\\/]* | ?:[\\/]*)
9812  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9813  ;;
9814  *)
9815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9816for as_dir in $PATH
9817do
9818  IFS=$as_save_IFS
9819  test -z "$as_dir" && as_dir=.
9820    for ac_exec_ext in '' $ac_executable_extensions; do
9821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9822    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9824    break 2
9825  fi
9826done
9827  done
9828IFS=$as_save_IFS
9829
9830  ;;
9831esac
9832fi
9833MV=$ac_cv_path_MV
9834if test -n "$MV"; then
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9836$as_echo "$MV" >&6; }
9837else
9838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839$as_echo "no" >&6; }
9840fi
9841
9842
9843  test -n "$MV" && break
9844done
9845
9846    else
9847      # If it succeeded, then it was overridden by the user. We will use it
9848      # for the tool.
9849
9850      # First remove it from the list of overridden variables, so we can test
9851      # for unknown variables in the end.
9852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9853
9854      # Check if we try to supply an empty value
9855      if test "x$MV" = x; then
9856        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9857$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9859$as_echo_n "checking for MV... " >&6; }
9860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9861$as_echo "disabled" >&6; }
9862      else
9863        # Check if the provided tool contains a complete path.
9864        tool_specified="$MV"
9865        tool_basename="${tool_specified##*/}"
9866        if test "x$tool_basename" = "x$tool_specified"; then
9867          # A command without a complete path is provided, search $PATH.
9868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9869$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9870          # Extract the first word of "$tool_basename", so it can be a program name with args.
9871set dummy $tool_basename; ac_word=$2
9872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9873$as_echo_n "checking for $ac_word... " >&6; }
9874if ${ac_cv_path_MV+:} false; then :
9875  $as_echo_n "(cached) " >&6
9876else
9877  case $MV in
9878  [\\/]* | ?:[\\/]*)
9879  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9880  ;;
9881  *)
9882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9883for as_dir in $PATH
9884do
9885  IFS=$as_save_IFS
9886  test -z "$as_dir" && as_dir=.
9887    for ac_exec_ext in '' $ac_executable_extensions; do
9888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9889    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9891    break 2
9892  fi
9893done
9894  done
9895IFS=$as_save_IFS
9896
9897  ;;
9898esac
9899fi
9900MV=$ac_cv_path_MV
9901if test -n "$MV"; then
9902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9903$as_echo "$MV" >&6; }
9904else
9905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906$as_echo "no" >&6; }
9907fi
9908
9909
9910          if test "x$MV" = x; then
9911            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9912          fi
9913        else
9914          # Otherwise we believe it is a complete path. Use it as it is.
9915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9916$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9918$as_echo_n "checking for MV... " >&6; }
9919          if test ! -x "$tool_specified"; then
9920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9921$as_echo "not found" >&6; }
9922            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9923          fi
9924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9925$as_echo "$tool_specified" >&6; }
9926        fi
9927      fi
9928    fi
9929
9930  fi
9931
9932
9933
9934  if test "x$MV" = x; then
9935    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9936  fi
9937
9938
9939
9940
9941
9942  # Publish this variable in the help.
9943
9944
9945  if [ -z "${NAWK+x}" ]; then
9946    # The variable is not set by user, try to locate tool using the code snippet
9947    for ac_prog in nawk gawk awk
9948do
9949  # Extract the first word of "$ac_prog", so it can be a program name with args.
9950set dummy $ac_prog; ac_word=$2
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952$as_echo_n "checking for $ac_word... " >&6; }
9953if ${ac_cv_path_NAWK+:} false; then :
9954  $as_echo_n "(cached) " >&6
9955else
9956  case $NAWK in
9957  [\\/]* | ?:[\\/]*)
9958  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9959  ;;
9960  *)
9961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962for as_dir in $PATH
9963do
9964  IFS=$as_save_IFS
9965  test -z "$as_dir" && as_dir=.
9966    for ac_exec_ext in '' $ac_executable_extensions; do
9967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970    break 2
9971  fi
9972done
9973  done
9974IFS=$as_save_IFS
9975
9976  ;;
9977esac
9978fi
9979NAWK=$ac_cv_path_NAWK
9980if test -n "$NAWK"; then
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9982$as_echo "$NAWK" >&6; }
9983else
9984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986fi
9987
9988
9989  test -n "$NAWK" && break
9990done
9991
9992  else
9993    # The variable is set, but is it from the command line or the environment?
9994
9995    # Try to remove the string !NAWK! from our list.
9996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9998      # If it failed, the variable was not from the command line. Ignore it,
9999      # but warn the user (except for BASH, which is always set by the calling BASH).
10000      if test "xNAWK" != xBASH; then
10001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
10002$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
10003      fi
10004      # Try to locate tool using the code snippet
10005      for ac_prog in nawk gawk awk
10006do
10007  # Extract the first word of "$ac_prog", so it can be a program name with args.
10008set dummy $ac_prog; ac_word=$2
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10010$as_echo_n "checking for $ac_word... " >&6; }
10011if ${ac_cv_path_NAWK+:} false; then :
10012  $as_echo_n "(cached) " >&6
10013else
10014  case $NAWK in
10015  [\\/]* | ?:[\\/]*)
10016  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10017  ;;
10018  *)
10019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022  IFS=$as_save_IFS
10023  test -z "$as_dir" && as_dir=.
10024    for ac_exec_ext in '' $ac_executable_extensions; do
10025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10026    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10028    break 2
10029  fi
10030done
10031  done
10032IFS=$as_save_IFS
10033
10034  ;;
10035esac
10036fi
10037NAWK=$ac_cv_path_NAWK
10038if test -n "$NAWK"; then
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10040$as_echo "$NAWK" >&6; }
10041else
10042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
10044fi
10045
10046
10047  test -n "$NAWK" && break
10048done
10049
10050    else
10051      # If it succeeded, then it was overridden by the user. We will use it
10052      # for the tool.
10053
10054      # First remove it from the list of overridden variables, so we can test
10055      # for unknown variables in the end.
10056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10057
10058      # Check if we try to supply an empty value
10059      if test "x$NAWK" = x; then
10060        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10061$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10063$as_echo_n "checking for NAWK... " >&6; }
10064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10065$as_echo "disabled" >&6; }
10066      else
10067        # Check if the provided tool contains a complete path.
10068        tool_specified="$NAWK"
10069        tool_basename="${tool_specified##*/}"
10070        if test "x$tool_basename" = "x$tool_specified"; then
10071          # A command without a complete path is provided, search $PATH.
10072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10073$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10074          # Extract the first word of "$tool_basename", so it can be a program name with args.
10075set dummy $tool_basename; ac_word=$2
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10077$as_echo_n "checking for $ac_word... " >&6; }
10078if ${ac_cv_path_NAWK+:} false; then :
10079  $as_echo_n "(cached) " >&6
10080else
10081  case $NAWK in
10082  [\\/]* | ?:[\\/]*)
10083  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10084  ;;
10085  *)
10086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10087for as_dir in $PATH
10088do
10089  IFS=$as_save_IFS
10090  test -z "$as_dir" && as_dir=.
10091    for ac_exec_ext in '' $ac_executable_extensions; do
10092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10093    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10095    break 2
10096  fi
10097done
10098  done
10099IFS=$as_save_IFS
10100
10101  ;;
10102esac
10103fi
10104NAWK=$ac_cv_path_NAWK
10105if test -n "$NAWK"; then
10106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10107$as_echo "$NAWK" >&6; }
10108else
10109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10110$as_echo "no" >&6; }
10111fi
10112
10113
10114          if test "x$NAWK" = x; then
10115            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10116          fi
10117        else
10118          # Otherwise we believe it is a complete path. Use it as it is.
10119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10120$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10121          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10122$as_echo_n "checking for NAWK... " >&6; }
10123          if test ! -x "$tool_specified"; then
10124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10125$as_echo "not found" >&6; }
10126            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10127          fi
10128          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10129$as_echo "$tool_specified" >&6; }
10130        fi
10131      fi
10132    fi
10133
10134  fi
10135
10136
10137
10138  if test "x$NAWK" = x; then
10139    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10140  fi
10141
10142
10143
10144
10145
10146  # Publish this variable in the help.
10147
10148
10149  if [ -z "${PRINTF+x}" ]; then
10150    # The variable is not set by user, try to locate tool using the code snippet
10151    for ac_prog in printf
10152do
10153  # Extract the first word of "$ac_prog", so it can be a program name with args.
10154set dummy $ac_prog; ac_word=$2
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10156$as_echo_n "checking for $ac_word... " >&6; }
10157if ${ac_cv_path_PRINTF+:} false; then :
10158  $as_echo_n "(cached) " >&6
10159else
10160  case $PRINTF in
10161  [\\/]* | ?:[\\/]*)
10162  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10163  ;;
10164  *)
10165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10166for as_dir in $PATH
10167do
10168  IFS=$as_save_IFS
10169  test -z "$as_dir" && as_dir=.
10170    for ac_exec_ext in '' $ac_executable_extensions; do
10171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10172    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10174    break 2
10175  fi
10176done
10177  done
10178IFS=$as_save_IFS
10179
10180  ;;
10181esac
10182fi
10183PRINTF=$ac_cv_path_PRINTF
10184if test -n "$PRINTF"; then
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10186$as_echo "$PRINTF" >&6; }
10187else
10188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10189$as_echo "no" >&6; }
10190fi
10191
10192
10193  test -n "$PRINTF" && break
10194done
10195
10196  else
10197    # The variable is set, but is it from the command line or the environment?
10198
10199    # Try to remove the string !PRINTF! from our list.
10200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10202      # If it failed, the variable was not from the command line. Ignore it,
10203      # but warn the user (except for BASH, which is always set by the calling BASH).
10204      if test "xPRINTF" != xBASH; then
10205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10206$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10207      fi
10208      # Try to locate tool using the code snippet
10209      for ac_prog in printf
10210do
10211  # Extract the first word of "$ac_prog", so it can be a program name with args.
10212set dummy $ac_prog; ac_word=$2
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10214$as_echo_n "checking for $ac_word... " >&6; }
10215if ${ac_cv_path_PRINTF+:} false; then :
10216  $as_echo_n "(cached) " >&6
10217else
10218  case $PRINTF in
10219  [\\/]* | ?:[\\/]*)
10220  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10221  ;;
10222  *)
10223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10224for as_dir in $PATH
10225do
10226  IFS=$as_save_IFS
10227  test -z "$as_dir" && as_dir=.
10228    for ac_exec_ext in '' $ac_executable_extensions; do
10229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10230    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10232    break 2
10233  fi
10234done
10235  done
10236IFS=$as_save_IFS
10237
10238  ;;
10239esac
10240fi
10241PRINTF=$ac_cv_path_PRINTF
10242if test -n "$PRINTF"; then
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10244$as_echo "$PRINTF" >&6; }
10245else
10246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247$as_echo "no" >&6; }
10248fi
10249
10250
10251  test -n "$PRINTF" && break
10252done
10253
10254    else
10255      # If it succeeded, then it was overridden by the user. We will use it
10256      # for the tool.
10257
10258      # First remove it from the list of overridden variables, so we can test
10259      # for unknown variables in the end.
10260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10261
10262      # Check if we try to supply an empty value
10263      if test "x$PRINTF" = x; then
10264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10265$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10267$as_echo_n "checking for PRINTF... " >&6; }
10268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10269$as_echo "disabled" >&6; }
10270      else
10271        # Check if the provided tool contains a complete path.
10272        tool_specified="$PRINTF"
10273        tool_basename="${tool_specified##*/}"
10274        if test "x$tool_basename" = "x$tool_specified"; then
10275          # A command without a complete path is provided, search $PATH.
10276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10277$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10278          # Extract the first word of "$tool_basename", so it can be a program name with args.
10279set dummy $tool_basename; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if ${ac_cv_path_PRINTF+:} false; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  case $PRINTF in
10286  [\\/]* | ?:[\\/]*)
10287  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10288  ;;
10289  *)
10290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291for as_dir in $PATH
10292do
10293  IFS=$as_save_IFS
10294  test -z "$as_dir" && as_dir=.
10295    for ac_exec_ext in '' $ac_executable_extensions; do
10296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299    break 2
10300  fi
10301done
10302  done
10303IFS=$as_save_IFS
10304
10305  ;;
10306esac
10307fi
10308PRINTF=$ac_cv_path_PRINTF
10309if test -n "$PRINTF"; then
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10311$as_echo "$PRINTF" >&6; }
10312else
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315fi
10316
10317
10318          if test "x$PRINTF" = x; then
10319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10320          fi
10321        else
10322          # Otherwise we believe it is a complete path. Use it as it is.
10323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10324$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10326$as_echo_n "checking for PRINTF... " >&6; }
10327          if test ! -x "$tool_specified"; then
10328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10329$as_echo "not found" >&6; }
10330            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10331          fi
10332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10333$as_echo "$tool_specified" >&6; }
10334        fi
10335      fi
10336    fi
10337
10338  fi
10339
10340
10341
10342  if test "x$PRINTF" = x; then
10343    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10344  fi
10345
10346
10347
10348
10349
10350  # Publish this variable in the help.
10351
10352
10353  if [ -z "${RM+x}" ]; then
10354    # The variable is not set by user, try to locate tool using the code snippet
10355    for ac_prog in rm
10356do
10357  # Extract the first word of "$ac_prog", so it can be a program name with args.
10358set dummy $ac_prog; ac_word=$2
10359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360$as_echo_n "checking for $ac_word... " >&6; }
10361if ${ac_cv_path_RM+:} false; then :
10362  $as_echo_n "(cached) " >&6
10363else
10364  case $RM in
10365  [\\/]* | ?:[\\/]*)
10366  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10367  ;;
10368  *)
10369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370for as_dir in $PATH
10371do
10372  IFS=$as_save_IFS
10373  test -z "$as_dir" && as_dir=.
10374    for ac_exec_ext in '' $ac_executable_extensions; do
10375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10376    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378    break 2
10379  fi
10380done
10381  done
10382IFS=$as_save_IFS
10383
10384  ;;
10385esac
10386fi
10387RM=$ac_cv_path_RM
10388if test -n "$RM"; then
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10390$as_echo "$RM" >&6; }
10391else
10392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
10394fi
10395
10396
10397  test -n "$RM" && break
10398done
10399
10400  else
10401    # The variable is set, but is it from the command line or the environment?
10402
10403    # Try to remove the string !RM! from our list.
10404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10406      # If it failed, the variable was not from the command line. Ignore it,
10407      # but warn the user (except for BASH, which is always set by the calling BASH).
10408      if test "xRM" != xBASH; then
10409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10410$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10411      fi
10412      # Try to locate tool using the code snippet
10413      for ac_prog in rm
10414do
10415  # Extract the first word of "$ac_prog", so it can be a program name with args.
10416set dummy $ac_prog; ac_word=$2
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10418$as_echo_n "checking for $ac_word... " >&6; }
10419if ${ac_cv_path_RM+:} false; then :
10420  $as_echo_n "(cached) " >&6
10421else
10422  case $RM in
10423  [\\/]* | ?:[\\/]*)
10424  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10425  ;;
10426  *)
10427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10428for as_dir in $PATH
10429do
10430  IFS=$as_save_IFS
10431  test -z "$as_dir" && as_dir=.
10432    for ac_exec_ext in '' $ac_executable_extensions; do
10433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10434    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10436    break 2
10437  fi
10438done
10439  done
10440IFS=$as_save_IFS
10441
10442  ;;
10443esac
10444fi
10445RM=$ac_cv_path_RM
10446if test -n "$RM"; then
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10448$as_echo "$RM" >&6; }
10449else
10450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451$as_echo "no" >&6; }
10452fi
10453
10454
10455  test -n "$RM" && break
10456done
10457
10458    else
10459      # If it succeeded, then it was overridden by the user. We will use it
10460      # for the tool.
10461
10462      # First remove it from the list of overridden variables, so we can test
10463      # for unknown variables in the end.
10464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10465
10466      # Check if we try to supply an empty value
10467      if test "x$RM" = x; then
10468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10469$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10471$as_echo_n "checking for RM... " >&6; }
10472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10473$as_echo "disabled" >&6; }
10474      else
10475        # Check if the provided tool contains a complete path.
10476        tool_specified="$RM"
10477        tool_basename="${tool_specified##*/}"
10478        if test "x$tool_basename" = "x$tool_specified"; then
10479          # A command without a complete path is provided, search $PATH.
10480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10481$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10482          # Extract the first word of "$tool_basename", so it can be a program name with args.
10483set dummy $tool_basename; ac_word=$2
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10485$as_echo_n "checking for $ac_word... " >&6; }
10486if ${ac_cv_path_RM+:} false; then :
10487  $as_echo_n "(cached) " >&6
10488else
10489  case $RM in
10490  [\\/]* | ?:[\\/]*)
10491  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10492  ;;
10493  *)
10494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10495for as_dir in $PATH
10496do
10497  IFS=$as_save_IFS
10498  test -z "$as_dir" && as_dir=.
10499    for ac_exec_ext in '' $ac_executable_extensions; do
10500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10501    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10503    break 2
10504  fi
10505done
10506  done
10507IFS=$as_save_IFS
10508
10509  ;;
10510esac
10511fi
10512RM=$ac_cv_path_RM
10513if test -n "$RM"; then
10514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10515$as_echo "$RM" >&6; }
10516else
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518$as_echo "no" >&6; }
10519fi
10520
10521
10522          if test "x$RM" = x; then
10523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10524          fi
10525        else
10526          # Otherwise we believe it is a complete path. Use it as it is.
10527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10528$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10530$as_echo_n "checking for RM... " >&6; }
10531          if test ! -x "$tool_specified"; then
10532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10533$as_echo "not found" >&6; }
10534            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10535          fi
10536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10537$as_echo "$tool_specified" >&6; }
10538        fi
10539      fi
10540    fi
10541
10542  fi
10543
10544
10545
10546  if test "x$RM" = x; then
10547    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10548  fi
10549
10550
10551
10552
10553
10554  # Publish this variable in the help.
10555
10556
10557  if [ -z "${RMDIR+x}" ]; then
10558    # The variable is not set by user, try to locate tool using the code snippet
10559    for ac_prog in rmdir
10560do
10561  # Extract the first word of "$ac_prog", so it can be a program name with args.
10562set dummy $ac_prog; ac_word=$2
10563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10564$as_echo_n "checking for $ac_word... " >&6; }
10565if ${ac_cv_path_RMDIR+:} false; then :
10566  $as_echo_n "(cached) " >&6
10567else
10568  case $RMDIR in
10569  [\\/]* | ?:[\\/]*)
10570  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10571  ;;
10572  *)
10573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10574for as_dir in $PATH
10575do
10576  IFS=$as_save_IFS
10577  test -z "$as_dir" && as_dir=.
10578    for ac_exec_ext in '' $ac_executable_extensions; do
10579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10580    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10582    break 2
10583  fi
10584done
10585  done
10586IFS=$as_save_IFS
10587
10588  ;;
10589esac
10590fi
10591RMDIR=$ac_cv_path_RMDIR
10592if test -n "$RMDIR"; then
10593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10594$as_echo "$RMDIR" >&6; }
10595else
10596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10597$as_echo "no" >&6; }
10598fi
10599
10600
10601  test -n "$RMDIR" && break
10602done
10603
10604  else
10605    # The variable is set, but is it from the command line or the environment?
10606
10607    # Try to remove the string !RMDIR! from our list.
10608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10610      # If it failed, the variable was not from the command line. Ignore it,
10611      # but warn the user (except for BASH, which is always set by the calling BASH).
10612      if test "xRMDIR" != xBASH; then
10613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10614$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10615      fi
10616      # Try to locate tool using the code snippet
10617      for ac_prog in rmdir
10618do
10619  # Extract the first word of "$ac_prog", so it can be a program name with args.
10620set dummy $ac_prog; ac_word=$2
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622$as_echo_n "checking for $ac_word... " >&6; }
10623if ${ac_cv_path_RMDIR+:} false; then :
10624  $as_echo_n "(cached) " >&6
10625else
10626  case $RMDIR in
10627  [\\/]* | ?:[\\/]*)
10628  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10629  ;;
10630  *)
10631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632for as_dir in $PATH
10633do
10634  IFS=$as_save_IFS
10635  test -z "$as_dir" && as_dir=.
10636    for ac_exec_ext in '' $ac_executable_extensions; do
10637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10638    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10640    break 2
10641  fi
10642done
10643  done
10644IFS=$as_save_IFS
10645
10646  ;;
10647esac
10648fi
10649RMDIR=$ac_cv_path_RMDIR
10650if test -n "$RMDIR"; then
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10652$as_echo "$RMDIR" >&6; }
10653else
10654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
10656fi
10657
10658
10659  test -n "$RMDIR" && break
10660done
10661
10662    else
10663      # If it succeeded, then it was overridden by the user. We will use it
10664      # for the tool.
10665
10666      # First remove it from the list of overridden variables, so we can test
10667      # for unknown variables in the end.
10668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10669
10670      # Check if we try to supply an empty value
10671      if test "x$RMDIR" = x; then
10672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10673$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10675$as_echo_n "checking for RMDIR... " >&6; }
10676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10677$as_echo "disabled" >&6; }
10678      else
10679        # Check if the provided tool contains a complete path.
10680        tool_specified="$RMDIR"
10681        tool_basename="${tool_specified##*/}"
10682        if test "x$tool_basename" = "x$tool_specified"; then
10683          # A command without a complete path is provided, search $PATH.
10684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10685$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10686          # Extract the first word of "$tool_basename", so it can be a program name with args.
10687set dummy $tool_basename; ac_word=$2
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10689$as_echo_n "checking for $ac_word... " >&6; }
10690if ${ac_cv_path_RMDIR+:} false; then :
10691  $as_echo_n "(cached) " >&6
10692else
10693  case $RMDIR in
10694  [\\/]* | ?:[\\/]*)
10695  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10696  ;;
10697  *)
10698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10699for as_dir in $PATH
10700do
10701  IFS=$as_save_IFS
10702  test -z "$as_dir" && as_dir=.
10703    for ac_exec_ext in '' $ac_executable_extensions; do
10704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10705    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10707    break 2
10708  fi
10709done
10710  done
10711IFS=$as_save_IFS
10712
10713  ;;
10714esac
10715fi
10716RMDIR=$ac_cv_path_RMDIR
10717if test -n "$RMDIR"; then
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10719$as_echo "$RMDIR" >&6; }
10720else
10721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
10723fi
10724
10725
10726          if test "x$RMDIR" = x; then
10727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10728          fi
10729        else
10730          # Otherwise we believe it is a complete path. Use it as it is.
10731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10732$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10734$as_echo_n "checking for RMDIR... " >&6; }
10735          if test ! -x "$tool_specified"; then
10736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10737$as_echo "not found" >&6; }
10738            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10739          fi
10740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10741$as_echo "$tool_specified" >&6; }
10742        fi
10743      fi
10744    fi
10745
10746  fi
10747
10748
10749
10750  if test "x$RMDIR" = x; then
10751    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10752  fi
10753
10754
10755
10756
10757
10758  # Publish this variable in the help.
10759
10760
10761  if [ -z "${SH+x}" ]; then
10762    # The variable is not set by user, try to locate tool using the code snippet
10763    for ac_prog in sh
10764do
10765  # Extract the first word of "$ac_prog", so it can be a program name with args.
10766set dummy $ac_prog; ac_word=$2
10767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10768$as_echo_n "checking for $ac_word... " >&6; }
10769if ${ac_cv_path_SH+:} false; then :
10770  $as_echo_n "(cached) " >&6
10771else
10772  case $SH in
10773  [\\/]* | ?:[\\/]*)
10774  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10775  ;;
10776  *)
10777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10778for as_dir in $PATH
10779do
10780  IFS=$as_save_IFS
10781  test -z "$as_dir" && as_dir=.
10782    for ac_exec_ext in '' $ac_executable_extensions; do
10783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10784    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10786    break 2
10787  fi
10788done
10789  done
10790IFS=$as_save_IFS
10791
10792  ;;
10793esac
10794fi
10795SH=$ac_cv_path_SH
10796if test -n "$SH"; then
10797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10798$as_echo "$SH" >&6; }
10799else
10800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10801$as_echo "no" >&6; }
10802fi
10803
10804
10805  test -n "$SH" && break
10806done
10807
10808  else
10809    # The variable is set, but is it from the command line or the environment?
10810
10811    # Try to remove the string !SH! from our list.
10812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10814      # If it failed, the variable was not from the command line. Ignore it,
10815      # but warn the user (except for BASH, which is always set by the calling BASH).
10816      if test "xSH" != xBASH; then
10817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10818$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10819      fi
10820      # Try to locate tool using the code snippet
10821      for ac_prog in sh
10822do
10823  # Extract the first word of "$ac_prog", so it can be a program name with args.
10824set dummy $ac_prog; ac_word=$2
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10826$as_echo_n "checking for $ac_word... " >&6; }
10827if ${ac_cv_path_SH+:} false; then :
10828  $as_echo_n "(cached) " >&6
10829else
10830  case $SH in
10831  [\\/]* | ?:[\\/]*)
10832  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10833  ;;
10834  *)
10835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10836for as_dir in $PATH
10837do
10838  IFS=$as_save_IFS
10839  test -z "$as_dir" && as_dir=.
10840    for ac_exec_ext in '' $ac_executable_extensions; do
10841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10842    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10844    break 2
10845  fi
10846done
10847  done
10848IFS=$as_save_IFS
10849
10850  ;;
10851esac
10852fi
10853SH=$ac_cv_path_SH
10854if test -n "$SH"; then
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10856$as_echo "$SH" >&6; }
10857else
10858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10859$as_echo "no" >&6; }
10860fi
10861
10862
10863  test -n "$SH" && break
10864done
10865
10866    else
10867      # If it succeeded, then it was overridden by the user. We will use it
10868      # for the tool.
10869
10870      # First remove it from the list of overridden variables, so we can test
10871      # for unknown variables in the end.
10872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10873
10874      # Check if we try to supply an empty value
10875      if test "x$SH" = x; then
10876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10877$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10879$as_echo_n "checking for SH... " >&6; }
10880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10881$as_echo "disabled" >&6; }
10882      else
10883        # Check if the provided tool contains a complete path.
10884        tool_specified="$SH"
10885        tool_basename="${tool_specified##*/}"
10886        if test "x$tool_basename" = "x$tool_specified"; then
10887          # A command without a complete path is provided, search $PATH.
10888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10889$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10890          # Extract the first word of "$tool_basename", so it can be a program name with args.
10891set dummy $tool_basename; ac_word=$2
10892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10893$as_echo_n "checking for $ac_word... " >&6; }
10894if ${ac_cv_path_SH+:} false; then :
10895  $as_echo_n "(cached) " >&6
10896else
10897  case $SH in
10898  [\\/]* | ?:[\\/]*)
10899  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10900  ;;
10901  *)
10902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10903for as_dir in $PATH
10904do
10905  IFS=$as_save_IFS
10906  test -z "$as_dir" && as_dir=.
10907    for ac_exec_ext in '' $ac_executable_extensions; do
10908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10909    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10911    break 2
10912  fi
10913done
10914  done
10915IFS=$as_save_IFS
10916
10917  ;;
10918esac
10919fi
10920SH=$ac_cv_path_SH
10921if test -n "$SH"; then
10922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10923$as_echo "$SH" >&6; }
10924else
10925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
10927fi
10928
10929
10930          if test "x$SH" = x; then
10931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10932          fi
10933        else
10934          # Otherwise we believe it is a complete path. Use it as it is.
10935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10936$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10938$as_echo_n "checking for SH... " >&6; }
10939          if test ! -x "$tool_specified"; then
10940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10941$as_echo "not found" >&6; }
10942            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10943          fi
10944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10945$as_echo "$tool_specified" >&6; }
10946        fi
10947      fi
10948    fi
10949
10950  fi
10951
10952
10953
10954  if test "x$SH" = x; then
10955    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10956  fi
10957
10958
10959
10960
10961
10962  # Publish this variable in the help.
10963
10964
10965  if [ -z "${SORT+x}" ]; then
10966    # The variable is not set by user, try to locate tool using the code snippet
10967    for ac_prog in sort
10968do
10969  # Extract the first word of "$ac_prog", so it can be a program name with args.
10970set dummy $ac_prog; ac_word=$2
10971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10972$as_echo_n "checking for $ac_word... " >&6; }
10973if ${ac_cv_path_SORT+:} false; then :
10974  $as_echo_n "(cached) " >&6
10975else
10976  case $SORT in
10977  [\\/]* | ?:[\\/]*)
10978  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10979  ;;
10980  *)
10981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10982for as_dir in $PATH
10983do
10984  IFS=$as_save_IFS
10985  test -z "$as_dir" && as_dir=.
10986    for ac_exec_ext in '' $ac_executable_extensions; do
10987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10988    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10990    break 2
10991  fi
10992done
10993  done
10994IFS=$as_save_IFS
10995
10996  ;;
10997esac
10998fi
10999SORT=$ac_cv_path_SORT
11000if test -n "$SORT"; then
11001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11002$as_echo "$SORT" >&6; }
11003else
11004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
11006fi
11007
11008
11009  test -n "$SORT" && break
11010done
11011
11012  else
11013    # The variable is set, but is it from the command line or the environment?
11014
11015    # Try to remove the string !SORT! from our list.
11016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11018      # If it failed, the variable was not from the command line. Ignore it,
11019      # but warn the user (except for BASH, which is always set by the calling BASH).
11020      if test "xSORT" != xBASH; then
11021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11022$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11023      fi
11024      # Try to locate tool using the code snippet
11025      for ac_prog in sort
11026do
11027  # Extract the first word of "$ac_prog", so it can be a program name with args.
11028set dummy $ac_prog; ac_word=$2
11029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11030$as_echo_n "checking for $ac_word... " >&6; }
11031if ${ac_cv_path_SORT+:} false; then :
11032  $as_echo_n "(cached) " >&6
11033else
11034  case $SORT in
11035  [\\/]* | ?:[\\/]*)
11036  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11037  ;;
11038  *)
11039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11040for as_dir in $PATH
11041do
11042  IFS=$as_save_IFS
11043  test -z "$as_dir" && as_dir=.
11044    for ac_exec_ext in '' $ac_executable_extensions; do
11045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11046    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11048    break 2
11049  fi
11050done
11051  done
11052IFS=$as_save_IFS
11053
11054  ;;
11055esac
11056fi
11057SORT=$ac_cv_path_SORT
11058if test -n "$SORT"; then
11059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11060$as_echo "$SORT" >&6; }
11061else
11062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11063$as_echo "no" >&6; }
11064fi
11065
11066
11067  test -n "$SORT" && break
11068done
11069
11070    else
11071      # If it succeeded, then it was overridden by the user. We will use it
11072      # for the tool.
11073
11074      # First remove it from the list of overridden variables, so we can test
11075      # for unknown variables in the end.
11076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11077
11078      # Check if we try to supply an empty value
11079      if test "x$SORT" = x; then
11080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11081$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11083$as_echo_n "checking for SORT... " >&6; }
11084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11085$as_echo "disabled" >&6; }
11086      else
11087        # Check if the provided tool contains a complete path.
11088        tool_specified="$SORT"
11089        tool_basename="${tool_specified##*/}"
11090        if test "x$tool_basename" = "x$tool_specified"; then
11091          # A command without a complete path is provided, search $PATH.
11092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11093$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11094          # Extract the first word of "$tool_basename", so it can be a program name with args.
11095set dummy $tool_basename; ac_word=$2
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11097$as_echo_n "checking for $ac_word... " >&6; }
11098if ${ac_cv_path_SORT+:} false; then :
11099  $as_echo_n "(cached) " >&6
11100else
11101  case $SORT in
11102  [\\/]* | ?:[\\/]*)
11103  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11104  ;;
11105  *)
11106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11107for as_dir in $PATH
11108do
11109  IFS=$as_save_IFS
11110  test -z "$as_dir" && as_dir=.
11111    for ac_exec_ext in '' $ac_executable_extensions; do
11112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11113    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11115    break 2
11116  fi
11117done
11118  done
11119IFS=$as_save_IFS
11120
11121  ;;
11122esac
11123fi
11124SORT=$ac_cv_path_SORT
11125if test -n "$SORT"; then
11126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11127$as_echo "$SORT" >&6; }
11128else
11129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11130$as_echo "no" >&6; }
11131fi
11132
11133
11134          if test "x$SORT" = x; then
11135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11136          fi
11137        else
11138          # Otherwise we believe it is a complete path. Use it as it is.
11139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11140$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11142$as_echo_n "checking for SORT... " >&6; }
11143          if test ! -x "$tool_specified"; then
11144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11145$as_echo "not found" >&6; }
11146            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11147          fi
11148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11149$as_echo "$tool_specified" >&6; }
11150        fi
11151      fi
11152    fi
11153
11154  fi
11155
11156
11157
11158  if test "x$SORT" = x; then
11159    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11160  fi
11161
11162
11163
11164
11165
11166  # Publish this variable in the help.
11167
11168
11169  if [ -z "${TAIL+x}" ]; then
11170    # The variable is not set by user, try to locate tool using the code snippet
11171    for ac_prog in tail
11172do
11173  # Extract the first word of "$ac_prog", so it can be a program name with args.
11174set dummy $ac_prog; ac_word=$2
11175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11176$as_echo_n "checking for $ac_word... " >&6; }
11177if ${ac_cv_path_TAIL+:} false; then :
11178  $as_echo_n "(cached) " >&6
11179else
11180  case $TAIL in
11181  [\\/]* | ?:[\\/]*)
11182  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11183  ;;
11184  *)
11185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11186for as_dir in $PATH
11187do
11188  IFS=$as_save_IFS
11189  test -z "$as_dir" && as_dir=.
11190    for ac_exec_ext in '' $ac_executable_extensions; do
11191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11192    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11194    break 2
11195  fi
11196done
11197  done
11198IFS=$as_save_IFS
11199
11200  ;;
11201esac
11202fi
11203TAIL=$ac_cv_path_TAIL
11204if test -n "$TAIL"; then
11205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11206$as_echo "$TAIL" >&6; }
11207else
11208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11209$as_echo "no" >&6; }
11210fi
11211
11212
11213  test -n "$TAIL" && break
11214done
11215
11216  else
11217    # The variable is set, but is it from the command line or the environment?
11218
11219    # Try to remove the string !TAIL! from our list.
11220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11222      # If it failed, the variable was not from the command line. Ignore it,
11223      # but warn the user (except for BASH, which is always set by the calling BASH).
11224      if test "xTAIL" != xBASH; then
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11226$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11227      fi
11228      # Try to locate tool using the code snippet
11229      for ac_prog in tail
11230do
11231  # Extract the first word of "$ac_prog", so it can be a program name with args.
11232set dummy $ac_prog; ac_word=$2
11233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11234$as_echo_n "checking for $ac_word... " >&6; }
11235if ${ac_cv_path_TAIL+:} false; then :
11236  $as_echo_n "(cached) " >&6
11237else
11238  case $TAIL in
11239  [\\/]* | ?:[\\/]*)
11240  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11241  ;;
11242  *)
11243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11244for as_dir in $PATH
11245do
11246  IFS=$as_save_IFS
11247  test -z "$as_dir" && as_dir=.
11248    for ac_exec_ext in '' $ac_executable_extensions; do
11249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11250    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11252    break 2
11253  fi
11254done
11255  done
11256IFS=$as_save_IFS
11257
11258  ;;
11259esac
11260fi
11261TAIL=$ac_cv_path_TAIL
11262if test -n "$TAIL"; then
11263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11264$as_echo "$TAIL" >&6; }
11265else
11266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11267$as_echo "no" >&6; }
11268fi
11269
11270
11271  test -n "$TAIL" && break
11272done
11273
11274    else
11275      # If it succeeded, then it was overridden by the user. We will use it
11276      # for the tool.
11277
11278      # First remove it from the list of overridden variables, so we can test
11279      # for unknown variables in the end.
11280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11281
11282      # Check if we try to supply an empty value
11283      if test "x$TAIL" = x; then
11284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11285$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11287$as_echo_n "checking for TAIL... " >&6; }
11288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11289$as_echo "disabled" >&6; }
11290      else
11291        # Check if the provided tool contains a complete path.
11292        tool_specified="$TAIL"
11293        tool_basename="${tool_specified##*/}"
11294        if test "x$tool_basename" = "x$tool_specified"; then
11295          # A command without a complete path is provided, search $PATH.
11296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11297$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11298          # Extract the first word of "$tool_basename", so it can be a program name with args.
11299set dummy $tool_basename; ac_word=$2
11300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11301$as_echo_n "checking for $ac_word... " >&6; }
11302if ${ac_cv_path_TAIL+:} false; then :
11303  $as_echo_n "(cached) " >&6
11304else
11305  case $TAIL in
11306  [\\/]* | ?:[\\/]*)
11307  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11308  ;;
11309  *)
11310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11311for as_dir in $PATH
11312do
11313  IFS=$as_save_IFS
11314  test -z "$as_dir" && as_dir=.
11315    for ac_exec_ext in '' $ac_executable_extensions; do
11316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11317    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11319    break 2
11320  fi
11321done
11322  done
11323IFS=$as_save_IFS
11324
11325  ;;
11326esac
11327fi
11328TAIL=$ac_cv_path_TAIL
11329if test -n "$TAIL"; then
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11331$as_echo "$TAIL" >&6; }
11332else
11333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
11335fi
11336
11337
11338          if test "x$TAIL" = x; then
11339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11340          fi
11341        else
11342          # Otherwise we believe it is a complete path. Use it as it is.
11343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11344$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11346$as_echo_n "checking for TAIL... " >&6; }
11347          if test ! -x "$tool_specified"; then
11348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11349$as_echo "not found" >&6; }
11350            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11351          fi
11352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11353$as_echo "$tool_specified" >&6; }
11354        fi
11355      fi
11356    fi
11357
11358  fi
11359
11360
11361
11362  if test "x$TAIL" = x; then
11363    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11364  fi
11365
11366
11367
11368
11369
11370  # Publish this variable in the help.
11371
11372
11373  if [ -z "${TAR+x}" ]; then
11374    # The variable is not set by user, try to locate tool using the code snippet
11375    for ac_prog in gtar tar
11376do
11377  # Extract the first word of "$ac_prog", so it can be a program name with args.
11378set dummy $ac_prog; ac_word=$2
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11380$as_echo_n "checking for $ac_word... " >&6; }
11381if ${ac_cv_path_TAR+:} false; then :
11382  $as_echo_n "(cached) " >&6
11383else
11384  case $TAR in
11385  [\\/]* | ?:[\\/]*)
11386  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11387  ;;
11388  *)
11389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11390for as_dir in $PATH
11391do
11392  IFS=$as_save_IFS
11393  test -z "$as_dir" && as_dir=.
11394    for ac_exec_ext in '' $ac_executable_extensions; do
11395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11396    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11398    break 2
11399  fi
11400done
11401  done
11402IFS=$as_save_IFS
11403
11404  ;;
11405esac
11406fi
11407TAR=$ac_cv_path_TAR
11408if test -n "$TAR"; then
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11410$as_echo "$TAR" >&6; }
11411else
11412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
11414fi
11415
11416
11417  test -n "$TAR" && break
11418done
11419
11420  else
11421    # The variable is set, but is it from the command line or the environment?
11422
11423    # Try to remove the string !TAR! from our list.
11424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11426      # If it failed, the variable was not from the command line. Ignore it,
11427      # but warn the user (except for BASH, which is always set by the calling BASH).
11428      if test "xTAR" != xBASH; then
11429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11430$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11431      fi
11432      # Try to locate tool using the code snippet
11433      for ac_prog in gtar tar
11434do
11435  # Extract the first word of "$ac_prog", so it can be a program name with args.
11436set dummy $ac_prog; ac_word=$2
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11438$as_echo_n "checking for $ac_word... " >&6; }
11439if ${ac_cv_path_TAR+:} false; then :
11440  $as_echo_n "(cached) " >&6
11441else
11442  case $TAR in
11443  [\\/]* | ?:[\\/]*)
11444  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11445  ;;
11446  *)
11447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11448for as_dir in $PATH
11449do
11450  IFS=$as_save_IFS
11451  test -z "$as_dir" && as_dir=.
11452    for ac_exec_ext in '' $ac_executable_extensions; do
11453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11454    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11456    break 2
11457  fi
11458done
11459  done
11460IFS=$as_save_IFS
11461
11462  ;;
11463esac
11464fi
11465TAR=$ac_cv_path_TAR
11466if test -n "$TAR"; then
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11468$as_echo "$TAR" >&6; }
11469else
11470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11471$as_echo "no" >&6; }
11472fi
11473
11474
11475  test -n "$TAR" && break
11476done
11477
11478    else
11479      # If it succeeded, then it was overridden by the user. We will use it
11480      # for the tool.
11481
11482      # First remove it from the list of overridden variables, so we can test
11483      # for unknown variables in the end.
11484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11485
11486      # Check if we try to supply an empty value
11487      if test "x$TAR" = x; then
11488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11489$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11491$as_echo_n "checking for TAR... " >&6; }
11492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11493$as_echo "disabled" >&6; }
11494      else
11495        # Check if the provided tool contains a complete path.
11496        tool_specified="$TAR"
11497        tool_basename="${tool_specified##*/}"
11498        if test "x$tool_basename" = "x$tool_specified"; then
11499          # A command without a complete path is provided, search $PATH.
11500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11501$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11502          # Extract the first word of "$tool_basename", so it can be a program name with args.
11503set dummy $tool_basename; ac_word=$2
11504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11505$as_echo_n "checking for $ac_word... " >&6; }
11506if ${ac_cv_path_TAR+:} false; then :
11507  $as_echo_n "(cached) " >&6
11508else
11509  case $TAR in
11510  [\\/]* | ?:[\\/]*)
11511  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11512  ;;
11513  *)
11514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11515for as_dir in $PATH
11516do
11517  IFS=$as_save_IFS
11518  test -z "$as_dir" && as_dir=.
11519    for ac_exec_ext in '' $ac_executable_extensions; do
11520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11521    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11523    break 2
11524  fi
11525done
11526  done
11527IFS=$as_save_IFS
11528
11529  ;;
11530esac
11531fi
11532TAR=$ac_cv_path_TAR
11533if test -n "$TAR"; then
11534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11535$as_echo "$TAR" >&6; }
11536else
11537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11538$as_echo "no" >&6; }
11539fi
11540
11541
11542          if test "x$TAR" = x; then
11543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11544          fi
11545        else
11546          # Otherwise we believe it is a complete path. Use it as it is.
11547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11548$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11550$as_echo_n "checking for TAR... " >&6; }
11551          if test ! -x "$tool_specified"; then
11552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11553$as_echo "not found" >&6; }
11554            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11555          fi
11556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11557$as_echo "$tool_specified" >&6; }
11558        fi
11559      fi
11560    fi
11561
11562  fi
11563
11564
11565
11566  if test "x$TAR" = x; then
11567    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11568  fi
11569
11570
11571
11572
11573
11574  # Publish this variable in the help.
11575
11576
11577  if [ -z "${TEE+x}" ]; then
11578    # The variable is not set by user, try to locate tool using the code snippet
11579    for ac_prog in tee
11580do
11581  # Extract the first word of "$ac_prog", so it can be a program name with args.
11582set dummy $ac_prog; ac_word=$2
11583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11584$as_echo_n "checking for $ac_word... " >&6; }
11585if ${ac_cv_path_TEE+:} false; then :
11586  $as_echo_n "(cached) " >&6
11587else
11588  case $TEE in
11589  [\\/]* | ?:[\\/]*)
11590  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11591  ;;
11592  *)
11593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11594for as_dir in $PATH
11595do
11596  IFS=$as_save_IFS
11597  test -z "$as_dir" && as_dir=.
11598    for ac_exec_ext in '' $ac_executable_extensions; do
11599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11600    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11602    break 2
11603  fi
11604done
11605  done
11606IFS=$as_save_IFS
11607
11608  ;;
11609esac
11610fi
11611TEE=$ac_cv_path_TEE
11612if test -n "$TEE"; then
11613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11614$as_echo "$TEE" >&6; }
11615else
11616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
11618fi
11619
11620
11621  test -n "$TEE" && break
11622done
11623
11624  else
11625    # The variable is set, but is it from the command line or the environment?
11626
11627    # Try to remove the string !TEE! from our list.
11628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11630      # If it failed, the variable was not from the command line. Ignore it,
11631      # but warn the user (except for BASH, which is always set by the calling BASH).
11632      if test "xTEE" != xBASH; then
11633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11634$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11635      fi
11636      # Try to locate tool using the code snippet
11637      for ac_prog in tee
11638do
11639  # Extract the first word of "$ac_prog", so it can be a program name with args.
11640set dummy $ac_prog; ac_word=$2
11641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11642$as_echo_n "checking for $ac_word... " >&6; }
11643if ${ac_cv_path_TEE+:} false; then :
11644  $as_echo_n "(cached) " >&6
11645else
11646  case $TEE in
11647  [\\/]* | ?:[\\/]*)
11648  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11649  ;;
11650  *)
11651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11652for as_dir in $PATH
11653do
11654  IFS=$as_save_IFS
11655  test -z "$as_dir" && as_dir=.
11656    for ac_exec_ext in '' $ac_executable_extensions; do
11657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11658    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11660    break 2
11661  fi
11662done
11663  done
11664IFS=$as_save_IFS
11665
11666  ;;
11667esac
11668fi
11669TEE=$ac_cv_path_TEE
11670if test -n "$TEE"; then
11671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11672$as_echo "$TEE" >&6; }
11673else
11674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
11676fi
11677
11678
11679  test -n "$TEE" && break
11680done
11681
11682    else
11683      # If it succeeded, then it was overridden by the user. We will use it
11684      # for the tool.
11685
11686      # First remove it from the list of overridden variables, so we can test
11687      # for unknown variables in the end.
11688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11689
11690      # Check if we try to supply an empty value
11691      if test "x$TEE" = x; then
11692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11693$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11695$as_echo_n "checking for TEE... " >&6; }
11696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11697$as_echo "disabled" >&6; }
11698      else
11699        # Check if the provided tool contains a complete path.
11700        tool_specified="$TEE"
11701        tool_basename="${tool_specified##*/}"
11702        if test "x$tool_basename" = "x$tool_specified"; then
11703          # A command without a complete path is provided, search $PATH.
11704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11705$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11706          # Extract the first word of "$tool_basename", so it can be a program name with args.
11707set dummy $tool_basename; ac_word=$2
11708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11709$as_echo_n "checking for $ac_word... " >&6; }
11710if ${ac_cv_path_TEE+:} false; then :
11711  $as_echo_n "(cached) " >&6
11712else
11713  case $TEE in
11714  [\\/]* | ?:[\\/]*)
11715  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11716  ;;
11717  *)
11718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11719for as_dir in $PATH
11720do
11721  IFS=$as_save_IFS
11722  test -z "$as_dir" && as_dir=.
11723    for ac_exec_ext in '' $ac_executable_extensions; do
11724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11725    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11727    break 2
11728  fi
11729done
11730  done
11731IFS=$as_save_IFS
11732
11733  ;;
11734esac
11735fi
11736TEE=$ac_cv_path_TEE
11737if test -n "$TEE"; then
11738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11739$as_echo "$TEE" >&6; }
11740else
11741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11742$as_echo "no" >&6; }
11743fi
11744
11745
11746          if test "x$TEE" = x; then
11747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11748          fi
11749        else
11750          # Otherwise we believe it is a complete path. Use it as it is.
11751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11752$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11754$as_echo_n "checking for TEE... " >&6; }
11755          if test ! -x "$tool_specified"; then
11756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11757$as_echo "not found" >&6; }
11758            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11759          fi
11760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11761$as_echo "$tool_specified" >&6; }
11762        fi
11763      fi
11764    fi
11765
11766  fi
11767
11768
11769
11770  if test "x$TEE" = x; then
11771    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11772  fi
11773
11774
11775
11776
11777
11778  # Publish this variable in the help.
11779
11780
11781  if [ -z "${TOUCH+x}" ]; then
11782    # The variable is not set by user, try to locate tool using the code snippet
11783    for ac_prog in touch
11784do
11785  # Extract the first word of "$ac_prog", so it can be a program name with args.
11786set dummy $ac_prog; ac_word=$2
11787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11788$as_echo_n "checking for $ac_word... " >&6; }
11789if ${ac_cv_path_TOUCH+:} false; then :
11790  $as_echo_n "(cached) " >&6
11791else
11792  case $TOUCH in
11793  [\\/]* | ?:[\\/]*)
11794  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11795  ;;
11796  *)
11797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11798for as_dir in $PATH
11799do
11800  IFS=$as_save_IFS
11801  test -z "$as_dir" && as_dir=.
11802    for ac_exec_ext in '' $ac_executable_extensions; do
11803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11804    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11806    break 2
11807  fi
11808done
11809  done
11810IFS=$as_save_IFS
11811
11812  ;;
11813esac
11814fi
11815TOUCH=$ac_cv_path_TOUCH
11816if test -n "$TOUCH"; then
11817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11818$as_echo "$TOUCH" >&6; }
11819else
11820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11821$as_echo "no" >&6; }
11822fi
11823
11824
11825  test -n "$TOUCH" && break
11826done
11827
11828  else
11829    # The variable is set, but is it from the command line or the environment?
11830
11831    # Try to remove the string !TOUCH! from our list.
11832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11834      # If it failed, the variable was not from the command line. Ignore it,
11835      # but warn the user (except for BASH, which is always set by the calling BASH).
11836      if test "xTOUCH" != xBASH; then
11837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11838$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11839      fi
11840      # Try to locate tool using the code snippet
11841      for ac_prog in touch
11842do
11843  # Extract the first word of "$ac_prog", so it can be a program name with args.
11844set dummy $ac_prog; ac_word=$2
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11846$as_echo_n "checking for $ac_word... " >&6; }
11847if ${ac_cv_path_TOUCH+:} false; then :
11848  $as_echo_n "(cached) " >&6
11849else
11850  case $TOUCH in
11851  [\\/]* | ?:[\\/]*)
11852  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11853  ;;
11854  *)
11855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11856for as_dir in $PATH
11857do
11858  IFS=$as_save_IFS
11859  test -z "$as_dir" && as_dir=.
11860    for ac_exec_ext in '' $ac_executable_extensions; do
11861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11862    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11864    break 2
11865  fi
11866done
11867  done
11868IFS=$as_save_IFS
11869
11870  ;;
11871esac
11872fi
11873TOUCH=$ac_cv_path_TOUCH
11874if test -n "$TOUCH"; then
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11876$as_echo "$TOUCH" >&6; }
11877else
11878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11879$as_echo "no" >&6; }
11880fi
11881
11882
11883  test -n "$TOUCH" && break
11884done
11885
11886    else
11887      # If it succeeded, then it was overridden by the user. We will use it
11888      # for the tool.
11889
11890      # First remove it from the list of overridden variables, so we can test
11891      # for unknown variables in the end.
11892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11893
11894      # Check if we try to supply an empty value
11895      if test "x$TOUCH" = x; then
11896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11897$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11899$as_echo_n "checking for TOUCH... " >&6; }
11900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11901$as_echo "disabled" >&6; }
11902      else
11903        # Check if the provided tool contains a complete path.
11904        tool_specified="$TOUCH"
11905        tool_basename="${tool_specified##*/}"
11906        if test "x$tool_basename" = "x$tool_specified"; then
11907          # A command without a complete path is provided, search $PATH.
11908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11909$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11910          # Extract the first word of "$tool_basename", so it can be a program name with args.
11911set dummy $tool_basename; ac_word=$2
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11913$as_echo_n "checking for $ac_word... " >&6; }
11914if ${ac_cv_path_TOUCH+:} false; then :
11915  $as_echo_n "(cached) " >&6
11916else
11917  case $TOUCH in
11918  [\\/]* | ?:[\\/]*)
11919  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11920  ;;
11921  *)
11922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11923for as_dir in $PATH
11924do
11925  IFS=$as_save_IFS
11926  test -z "$as_dir" && as_dir=.
11927    for ac_exec_ext in '' $ac_executable_extensions; do
11928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11929    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11931    break 2
11932  fi
11933done
11934  done
11935IFS=$as_save_IFS
11936
11937  ;;
11938esac
11939fi
11940TOUCH=$ac_cv_path_TOUCH
11941if test -n "$TOUCH"; then
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11943$as_echo "$TOUCH" >&6; }
11944else
11945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11946$as_echo "no" >&6; }
11947fi
11948
11949
11950          if test "x$TOUCH" = x; then
11951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11952          fi
11953        else
11954          # Otherwise we believe it is a complete path. Use it as it is.
11955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11956$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11958$as_echo_n "checking for TOUCH... " >&6; }
11959          if test ! -x "$tool_specified"; then
11960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11961$as_echo "not found" >&6; }
11962            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11963          fi
11964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11965$as_echo "$tool_specified" >&6; }
11966        fi
11967      fi
11968    fi
11969
11970  fi
11971
11972
11973
11974  if test "x$TOUCH" = x; then
11975    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11976  fi
11977
11978
11979
11980
11981
11982  # Publish this variable in the help.
11983
11984
11985  if [ -z "${TR+x}" ]; then
11986    # The variable is not set by user, try to locate tool using the code snippet
11987    for ac_prog in tr
11988do
11989  # Extract the first word of "$ac_prog", so it can be a program name with args.
11990set dummy $ac_prog; ac_word=$2
11991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11992$as_echo_n "checking for $ac_word... " >&6; }
11993if ${ac_cv_path_TR+:} false; then :
11994  $as_echo_n "(cached) " >&6
11995else
11996  case $TR in
11997  [\\/]* | ?:[\\/]*)
11998  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11999  ;;
12000  *)
12001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12002for as_dir in $PATH
12003do
12004  IFS=$as_save_IFS
12005  test -z "$as_dir" && as_dir=.
12006    for ac_exec_ext in '' $ac_executable_extensions; do
12007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12008    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12010    break 2
12011  fi
12012done
12013  done
12014IFS=$as_save_IFS
12015
12016  ;;
12017esac
12018fi
12019TR=$ac_cv_path_TR
12020if test -n "$TR"; then
12021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12022$as_echo "$TR" >&6; }
12023else
12024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12025$as_echo "no" >&6; }
12026fi
12027
12028
12029  test -n "$TR" && break
12030done
12031
12032  else
12033    # The variable is set, but is it from the command line or the environment?
12034
12035    # Try to remove the string !TR! from our list.
12036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12038      # If it failed, the variable was not from the command line. Ignore it,
12039      # but warn the user (except for BASH, which is always set by the calling BASH).
12040      if test "xTR" != xBASH; then
12041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12042$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12043      fi
12044      # Try to locate tool using the code snippet
12045      for ac_prog in tr
12046do
12047  # Extract the first word of "$ac_prog", so it can be a program name with args.
12048set dummy $ac_prog; ac_word=$2
12049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12050$as_echo_n "checking for $ac_word... " >&6; }
12051if ${ac_cv_path_TR+:} false; then :
12052  $as_echo_n "(cached) " >&6
12053else
12054  case $TR in
12055  [\\/]* | ?:[\\/]*)
12056  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12057  ;;
12058  *)
12059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12060for as_dir in $PATH
12061do
12062  IFS=$as_save_IFS
12063  test -z "$as_dir" && as_dir=.
12064    for ac_exec_ext in '' $ac_executable_extensions; do
12065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12066    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12068    break 2
12069  fi
12070done
12071  done
12072IFS=$as_save_IFS
12073
12074  ;;
12075esac
12076fi
12077TR=$ac_cv_path_TR
12078if test -n "$TR"; then
12079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12080$as_echo "$TR" >&6; }
12081else
12082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12083$as_echo "no" >&6; }
12084fi
12085
12086
12087  test -n "$TR" && break
12088done
12089
12090    else
12091      # If it succeeded, then it was overridden by the user. We will use it
12092      # for the tool.
12093
12094      # First remove it from the list of overridden variables, so we can test
12095      # for unknown variables in the end.
12096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12097
12098      # Check if we try to supply an empty value
12099      if test "x$TR" = x; then
12100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12101$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12103$as_echo_n "checking for TR... " >&6; }
12104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12105$as_echo "disabled" >&6; }
12106      else
12107        # Check if the provided tool contains a complete path.
12108        tool_specified="$TR"
12109        tool_basename="${tool_specified##*/}"
12110        if test "x$tool_basename" = "x$tool_specified"; then
12111          # A command without a complete path is provided, search $PATH.
12112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12113$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12114          # Extract the first word of "$tool_basename", so it can be a program name with args.
12115set dummy $tool_basename; ac_word=$2
12116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12117$as_echo_n "checking for $ac_word... " >&6; }
12118if ${ac_cv_path_TR+:} false; then :
12119  $as_echo_n "(cached) " >&6
12120else
12121  case $TR in
12122  [\\/]* | ?:[\\/]*)
12123  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12124  ;;
12125  *)
12126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12127for as_dir in $PATH
12128do
12129  IFS=$as_save_IFS
12130  test -z "$as_dir" && as_dir=.
12131    for ac_exec_ext in '' $ac_executable_extensions; do
12132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12133    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12135    break 2
12136  fi
12137done
12138  done
12139IFS=$as_save_IFS
12140
12141  ;;
12142esac
12143fi
12144TR=$ac_cv_path_TR
12145if test -n "$TR"; then
12146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12147$as_echo "$TR" >&6; }
12148else
12149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150$as_echo "no" >&6; }
12151fi
12152
12153
12154          if test "x$TR" = x; then
12155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12156          fi
12157        else
12158          # Otherwise we believe it is a complete path. Use it as it is.
12159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12160$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12162$as_echo_n "checking for TR... " >&6; }
12163          if test ! -x "$tool_specified"; then
12164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12165$as_echo "not found" >&6; }
12166            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12167          fi
12168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12169$as_echo "$tool_specified" >&6; }
12170        fi
12171      fi
12172    fi
12173
12174  fi
12175
12176
12177
12178  if test "x$TR" = x; then
12179    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12180  fi
12181
12182
12183
12184
12185
12186  # Publish this variable in the help.
12187
12188
12189  if [ -z "${UNAME+x}" ]; then
12190    # The variable is not set by user, try to locate tool using the code snippet
12191    for ac_prog in uname
12192do
12193  # Extract the first word of "$ac_prog", so it can be a program name with args.
12194set dummy $ac_prog; ac_word=$2
12195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12196$as_echo_n "checking for $ac_word... " >&6; }
12197if ${ac_cv_path_UNAME+:} false; then :
12198  $as_echo_n "(cached) " >&6
12199else
12200  case $UNAME in
12201  [\\/]* | ?:[\\/]*)
12202  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12203  ;;
12204  *)
12205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12206for as_dir in $PATH
12207do
12208  IFS=$as_save_IFS
12209  test -z "$as_dir" && as_dir=.
12210    for ac_exec_ext in '' $ac_executable_extensions; do
12211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12212    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12214    break 2
12215  fi
12216done
12217  done
12218IFS=$as_save_IFS
12219
12220  ;;
12221esac
12222fi
12223UNAME=$ac_cv_path_UNAME
12224if test -n "$UNAME"; then
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12226$as_echo "$UNAME" >&6; }
12227else
12228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12229$as_echo "no" >&6; }
12230fi
12231
12232
12233  test -n "$UNAME" && break
12234done
12235
12236  else
12237    # The variable is set, but is it from the command line or the environment?
12238
12239    # Try to remove the string !UNAME! from our list.
12240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12242      # If it failed, the variable was not from the command line. Ignore it,
12243      # but warn the user (except for BASH, which is always set by the calling BASH).
12244      if test "xUNAME" != xBASH; then
12245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12246$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12247      fi
12248      # Try to locate tool using the code snippet
12249      for ac_prog in uname
12250do
12251  # Extract the first word of "$ac_prog", so it can be a program name with args.
12252set dummy $ac_prog; ac_word=$2
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12254$as_echo_n "checking for $ac_word... " >&6; }
12255if ${ac_cv_path_UNAME+:} false; then :
12256  $as_echo_n "(cached) " >&6
12257else
12258  case $UNAME in
12259  [\\/]* | ?:[\\/]*)
12260  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12261  ;;
12262  *)
12263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12264for as_dir in $PATH
12265do
12266  IFS=$as_save_IFS
12267  test -z "$as_dir" && as_dir=.
12268    for ac_exec_ext in '' $ac_executable_extensions; do
12269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12270    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12272    break 2
12273  fi
12274done
12275  done
12276IFS=$as_save_IFS
12277
12278  ;;
12279esac
12280fi
12281UNAME=$ac_cv_path_UNAME
12282if test -n "$UNAME"; then
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12284$as_echo "$UNAME" >&6; }
12285else
12286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12287$as_echo "no" >&6; }
12288fi
12289
12290
12291  test -n "$UNAME" && break
12292done
12293
12294    else
12295      # If it succeeded, then it was overridden by the user. We will use it
12296      # for the tool.
12297
12298      # First remove it from the list of overridden variables, so we can test
12299      # for unknown variables in the end.
12300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12301
12302      # Check if we try to supply an empty value
12303      if test "x$UNAME" = x; then
12304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12305$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12307$as_echo_n "checking for UNAME... " >&6; }
12308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12309$as_echo "disabled" >&6; }
12310      else
12311        # Check if the provided tool contains a complete path.
12312        tool_specified="$UNAME"
12313        tool_basename="${tool_specified##*/}"
12314        if test "x$tool_basename" = "x$tool_specified"; then
12315          # A command without a complete path is provided, search $PATH.
12316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12317$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12318          # Extract the first word of "$tool_basename", so it can be a program name with args.
12319set dummy $tool_basename; ac_word=$2
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12321$as_echo_n "checking for $ac_word... " >&6; }
12322if ${ac_cv_path_UNAME+:} false; then :
12323  $as_echo_n "(cached) " >&6
12324else
12325  case $UNAME in
12326  [\\/]* | ?:[\\/]*)
12327  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12328  ;;
12329  *)
12330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12331for as_dir in $PATH
12332do
12333  IFS=$as_save_IFS
12334  test -z "$as_dir" && as_dir=.
12335    for ac_exec_ext in '' $ac_executable_extensions; do
12336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12337    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12339    break 2
12340  fi
12341done
12342  done
12343IFS=$as_save_IFS
12344
12345  ;;
12346esac
12347fi
12348UNAME=$ac_cv_path_UNAME
12349if test -n "$UNAME"; then
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12351$as_echo "$UNAME" >&6; }
12352else
12353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
12355fi
12356
12357
12358          if test "x$UNAME" = x; then
12359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12360          fi
12361        else
12362          # Otherwise we believe it is a complete path. Use it as it is.
12363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12364$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12366$as_echo_n "checking for UNAME... " >&6; }
12367          if test ! -x "$tool_specified"; then
12368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12369$as_echo "not found" >&6; }
12370            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12371          fi
12372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12373$as_echo "$tool_specified" >&6; }
12374        fi
12375      fi
12376    fi
12377
12378  fi
12379
12380
12381
12382  if test "x$UNAME" = x; then
12383    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12384  fi
12385
12386
12387
12388
12389
12390  # Publish this variable in the help.
12391
12392
12393  if [ -z "${UNIQ+x}" ]; then
12394    # The variable is not set by user, try to locate tool using the code snippet
12395    for ac_prog in uniq
12396do
12397  # Extract the first word of "$ac_prog", so it can be a program name with args.
12398set dummy $ac_prog; ac_word=$2
12399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12400$as_echo_n "checking for $ac_word... " >&6; }
12401if ${ac_cv_path_UNIQ+:} false; then :
12402  $as_echo_n "(cached) " >&6
12403else
12404  case $UNIQ in
12405  [\\/]* | ?:[\\/]*)
12406  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12407  ;;
12408  *)
12409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12410for as_dir in $PATH
12411do
12412  IFS=$as_save_IFS
12413  test -z "$as_dir" && as_dir=.
12414    for ac_exec_ext in '' $ac_executable_extensions; do
12415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12416    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12418    break 2
12419  fi
12420done
12421  done
12422IFS=$as_save_IFS
12423
12424  ;;
12425esac
12426fi
12427UNIQ=$ac_cv_path_UNIQ
12428if test -n "$UNIQ"; then
12429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12430$as_echo "$UNIQ" >&6; }
12431else
12432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12433$as_echo "no" >&6; }
12434fi
12435
12436
12437  test -n "$UNIQ" && break
12438done
12439
12440  else
12441    # The variable is set, but is it from the command line or the environment?
12442
12443    # Try to remove the string !UNIQ! from our list.
12444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12446      # If it failed, the variable was not from the command line. Ignore it,
12447      # but warn the user (except for BASH, which is always set by the calling BASH).
12448      if test "xUNIQ" != xBASH; then
12449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12450$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12451      fi
12452      # Try to locate tool using the code snippet
12453      for ac_prog in uniq
12454do
12455  # Extract the first word of "$ac_prog", so it can be a program name with args.
12456set dummy $ac_prog; ac_word=$2
12457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12458$as_echo_n "checking for $ac_word... " >&6; }
12459if ${ac_cv_path_UNIQ+:} false; then :
12460  $as_echo_n "(cached) " >&6
12461else
12462  case $UNIQ in
12463  [\\/]* | ?:[\\/]*)
12464  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12465  ;;
12466  *)
12467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12468for as_dir in $PATH
12469do
12470  IFS=$as_save_IFS
12471  test -z "$as_dir" && as_dir=.
12472    for ac_exec_ext in '' $ac_executable_extensions; do
12473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12474    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12476    break 2
12477  fi
12478done
12479  done
12480IFS=$as_save_IFS
12481
12482  ;;
12483esac
12484fi
12485UNIQ=$ac_cv_path_UNIQ
12486if test -n "$UNIQ"; then
12487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12488$as_echo "$UNIQ" >&6; }
12489else
12490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12491$as_echo "no" >&6; }
12492fi
12493
12494
12495  test -n "$UNIQ" && break
12496done
12497
12498    else
12499      # If it succeeded, then it was overridden by the user. We will use it
12500      # for the tool.
12501
12502      # First remove it from the list of overridden variables, so we can test
12503      # for unknown variables in the end.
12504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12505
12506      # Check if we try to supply an empty value
12507      if test "x$UNIQ" = x; then
12508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12509$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12511$as_echo_n "checking for UNIQ... " >&6; }
12512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12513$as_echo "disabled" >&6; }
12514      else
12515        # Check if the provided tool contains a complete path.
12516        tool_specified="$UNIQ"
12517        tool_basename="${tool_specified##*/}"
12518        if test "x$tool_basename" = "x$tool_specified"; then
12519          # A command without a complete path is provided, search $PATH.
12520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12521$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12522          # Extract the first word of "$tool_basename", so it can be a program name with args.
12523set dummy $tool_basename; ac_word=$2
12524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12525$as_echo_n "checking for $ac_word... " >&6; }
12526if ${ac_cv_path_UNIQ+:} false; then :
12527  $as_echo_n "(cached) " >&6
12528else
12529  case $UNIQ in
12530  [\\/]* | ?:[\\/]*)
12531  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12532  ;;
12533  *)
12534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12535for as_dir in $PATH
12536do
12537  IFS=$as_save_IFS
12538  test -z "$as_dir" && as_dir=.
12539    for ac_exec_ext in '' $ac_executable_extensions; do
12540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12541    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12543    break 2
12544  fi
12545done
12546  done
12547IFS=$as_save_IFS
12548
12549  ;;
12550esac
12551fi
12552UNIQ=$ac_cv_path_UNIQ
12553if test -n "$UNIQ"; then
12554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12555$as_echo "$UNIQ" >&6; }
12556else
12557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12558$as_echo "no" >&6; }
12559fi
12560
12561
12562          if test "x$UNIQ" = x; then
12563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12564          fi
12565        else
12566          # Otherwise we believe it is a complete path. Use it as it is.
12567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12568$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12570$as_echo_n "checking for UNIQ... " >&6; }
12571          if test ! -x "$tool_specified"; then
12572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12573$as_echo "not found" >&6; }
12574            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12575          fi
12576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12577$as_echo "$tool_specified" >&6; }
12578        fi
12579      fi
12580    fi
12581
12582  fi
12583
12584
12585
12586  if test "x$UNIQ" = x; then
12587    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12588  fi
12589
12590
12591
12592
12593
12594  # Publish this variable in the help.
12595
12596
12597  if [ -z "${WC+x}" ]; then
12598    # The variable is not set by user, try to locate tool using the code snippet
12599    for ac_prog in wc
12600do
12601  # Extract the first word of "$ac_prog", so it can be a program name with args.
12602set dummy $ac_prog; ac_word=$2
12603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12604$as_echo_n "checking for $ac_word... " >&6; }
12605if ${ac_cv_path_WC+:} false; then :
12606  $as_echo_n "(cached) " >&6
12607else
12608  case $WC in
12609  [\\/]* | ?:[\\/]*)
12610  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12611  ;;
12612  *)
12613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12614for as_dir in $PATH
12615do
12616  IFS=$as_save_IFS
12617  test -z "$as_dir" && as_dir=.
12618    for ac_exec_ext in '' $ac_executable_extensions; do
12619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12620    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12622    break 2
12623  fi
12624done
12625  done
12626IFS=$as_save_IFS
12627
12628  ;;
12629esac
12630fi
12631WC=$ac_cv_path_WC
12632if test -n "$WC"; then
12633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12634$as_echo "$WC" >&6; }
12635else
12636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12637$as_echo "no" >&6; }
12638fi
12639
12640
12641  test -n "$WC" && break
12642done
12643
12644  else
12645    # The variable is set, but is it from the command line or the environment?
12646
12647    # Try to remove the string !WC! from our list.
12648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12650      # If it failed, the variable was not from the command line. Ignore it,
12651      # but warn the user (except for BASH, which is always set by the calling BASH).
12652      if test "xWC" != xBASH; then
12653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12654$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12655      fi
12656      # Try to locate tool using the code snippet
12657      for ac_prog in wc
12658do
12659  # Extract the first word of "$ac_prog", so it can be a program name with args.
12660set dummy $ac_prog; ac_word=$2
12661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12662$as_echo_n "checking for $ac_word... " >&6; }
12663if ${ac_cv_path_WC+:} false; then :
12664  $as_echo_n "(cached) " >&6
12665else
12666  case $WC in
12667  [\\/]* | ?:[\\/]*)
12668  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12669  ;;
12670  *)
12671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12672for as_dir in $PATH
12673do
12674  IFS=$as_save_IFS
12675  test -z "$as_dir" && as_dir=.
12676    for ac_exec_ext in '' $ac_executable_extensions; do
12677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12678    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12680    break 2
12681  fi
12682done
12683  done
12684IFS=$as_save_IFS
12685
12686  ;;
12687esac
12688fi
12689WC=$ac_cv_path_WC
12690if test -n "$WC"; then
12691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12692$as_echo "$WC" >&6; }
12693else
12694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12695$as_echo "no" >&6; }
12696fi
12697
12698
12699  test -n "$WC" && break
12700done
12701
12702    else
12703      # If it succeeded, then it was overridden by the user. We will use it
12704      # for the tool.
12705
12706      # First remove it from the list of overridden variables, so we can test
12707      # for unknown variables in the end.
12708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12709
12710      # Check if we try to supply an empty value
12711      if test "x$WC" = x; then
12712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12713$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12715$as_echo_n "checking for WC... " >&6; }
12716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12717$as_echo "disabled" >&6; }
12718      else
12719        # Check if the provided tool contains a complete path.
12720        tool_specified="$WC"
12721        tool_basename="${tool_specified##*/}"
12722        if test "x$tool_basename" = "x$tool_specified"; then
12723          # A command without a complete path is provided, search $PATH.
12724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12725$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12726          # Extract the first word of "$tool_basename", so it can be a program name with args.
12727set dummy $tool_basename; ac_word=$2
12728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12729$as_echo_n "checking for $ac_word... " >&6; }
12730if ${ac_cv_path_WC+:} false; then :
12731  $as_echo_n "(cached) " >&6
12732else
12733  case $WC in
12734  [\\/]* | ?:[\\/]*)
12735  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12736  ;;
12737  *)
12738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12739for as_dir in $PATH
12740do
12741  IFS=$as_save_IFS
12742  test -z "$as_dir" && as_dir=.
12743    for ac_exec_ext in '' $ac_executable_extensions; do
12744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12745    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12747    break 2
12748  fi
12749done
12750  done
12751IFS=$as_save_IFS
12752
12753  ;;
12754esac
12755fi
12756WC=$ac_cv_path_WC
12757if test -n "$WC"; then
12758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12759$as_echo "$WC" >&6; }
12760else
12761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12762$as_echo "no" >&6; }
12763fi
12764
12765
12766          if test "x$WC" = x; then
12767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12768          fi
12769        else
12770          # Otherwise we believe it is a complete path. Use it as it is.
12771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12772$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12774$as_echo_n "checking for WC... " >&6; }
12775          if test ! -x "$tool_specified"; then
12776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12777$as_echo "not found" >&6; }
12778            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12779          fi
12780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12781$as_echo "$tool_specified" >&6; }
12782        fi
12783      fi
12784    fi
12785
12786  fi
12787
12788
12789
12790  if test "x$WC" = x; then
12791    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12792  fi
12793
12794
12795
12796
12797
12798  # Publish this variable in the help.
12799
12800
12801  if [ -z "${WHICH+x}" ]; then
12802    # The variable is not set by user, try to locate tool using the code snippet
12803    for ac_prog in which
12804do
12805  # Extract the first word of "$ac_prog", so it can be a program name with args.
12806set dummy $ac_prog; ac_word=$2
12807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12808$as_echo_n "checking for $ac_word... " >&6; }
12809if ${ac_cv_path_WHICH+:} false; then :
12810  $as_echo_n "(cached) " >&6
12811else
12812  case $WHICH in
12813  [\\/]* | ?:[\\/]*)
12814  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12815  ;;
12816  *)
12817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12818for as_dir in $PATH
12819do
12820  IFS=$as_save_IFS
12821  test -z "$as_dir" && as_dir=.
12822    for ac_exec_ext in '' $ac_executable_extensions; do
12823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12824    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12826    break 2
12827  fi
12828done
12829  done
12830IFS=$as_save_IFS
12831
12832  ;;
12833esac
12834fi
12835WHICH=$ac_cv_path_WHICH
12836if test -n "$WHICH"; then
12837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12838$as_echo "$WHICH" >&6; }
12839else
12840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12841$as_echo "no" >&6; }
12842fi
12843
12844
12845  test -n "$WHICH" && break
12846done
12847
12848  else
12849    # The variable is set, but is it from the command line or the environment?
12850
12851    # Try to remove the string !WHICH! from our list.
12852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12854      # If it failed, the variable was not from the command line. Ignore it,
12855      # but warn the user (except for BASH, which is always set by the calling BASH).
12856      if test "xWHICH" != xBASH; then
12857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12858$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12859      fi
12860      # Try to locate tool using the code snippet
12861      for ac_prog in which
12862do
12863  # Extract the first word of "$ac_prog", so it can be a program name with args.
12864set dummy $ac_prog; ac_word=$2
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12866$as_echo_n "checking for $ac_word... " >&6; }
12867if ${ac_cv_path_WHICH+:} false; then :
12868  $as_echo_n "(cached) " >&6
12869else
12870  case $WHICH in
12871  [\\/]* | ?:[\\/]*)
12872  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12873  ;;
12874  *)
12875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12876for as_dir in $PATH
12877do
12878  IFS=$as_save_IFS
12879  test -z "$as_dir" && as_dir=.
12880    for ac_exec_ext in '' $ac_executable_extensions; do
12881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12882    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12884    break 2
12885  fi
12886done
12887  done
12888IFS=$as_save_IFS
12889
12890  ;;
12891esac
12892fi
12893WHICH=$ac_cv_path_WHICH
12894if test -n "$WHICH"; then
12895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12896$as_echo "$WHICH" >&6; }
12897else
12898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12899$as_echo "no" >&6; }
12900fi
12901
12902
12903  test -n "$WHICH" && break
12904done
12905
12906    else
12907      # If it succeeded, then it was overridden by the user. We will use it
12908      # for the tool.
12909
12910      # First remove it from the list of overridden variables, so we can test
12911      # for unknown variables in the end.
12912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12913
12914      # Check if we try to supply an empty value
12915      if test "x$WHICH" = x; then
12916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12917$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12919$as_echo_n "checking for WHICH... " >&6; }
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12921$as_echo "disabled" >&6; }
12922      else
12923        # Check if the provided tool contains a complete path.
12924        tool_specified="$WHICH"
12925        tool_basename="${tool_specified##*/}"
12926        if test "x$tool_basename" = "x$tool_specified"; then
12927          # A command without a complete path is provided, search $PATH.
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12929$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12930          # Extract the first word of "$tool_basename", so it can be a program name with args.
12931set dummy $tool_basename; ac_word=$2
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12933$as_echo_n "checking for $ac_word... " >&6; }
12934if ${ac_cv_path_WHICH+:} false; then :
12935  $as_echo_n "(cached) " >&6
12936else
12937  case $WHICH in
12938  [\\/]* | ?:[\\/]*)
12939  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12940  ;;
12941  *)
12942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12943for as_dir in $PATH
12944do
12945  IFS=$as_save_IFS
12946  test -z "$as_dir" && as_dir=.
12947    for ac_exec_ext in '' $ac_executable_extensions; do
12948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12949    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12951    break 2
12952  fi
12953done
12954  done
12955IFS=$as_save_IFS
12956
12957  ;;
12958esac
12959fi
12960WHICH=$ac_cv_path_WHICH
12961if test -n "$WHICH"; then
12962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12963$as_echo "$WHICH" >&6; }
12964else
12965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12966$as_echo "no" >&6; }
12967fi
12968
12969
12970          if test "x$WHICH" = x; then
12971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12972          fi
12973        else
12974          # Otherwise we believe it is a complete path. Use it as it is.
12975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12976$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12978$as_echo_n "checking for WHICH... " >&6; }
12979          if test ! -x "$tool_specified"; then
12980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12981$as_echo "not found" >&6; }
12982            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12983          fi
12984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12985$as_echo "$tool_specified" >&6; }
12986        fi
12987      fi
12988    fi
12989
12990  fi
12991
12992
12993
12994  if test "x$WHICH" = x; then
12995    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12996  fi
12997
12998
12999
13000
13001
13002  # Publish this variable in the help.
13003
13004
13005  if [ -z "${XARGS+x}" ]; then
13006    # The variable is not set by user, try to locate tool using the code snippet
13007    for ac_prog in xargs
13008do
13009  # Extract the first word of "$ac_prog", so it can be a program name with args.
13010set dummy $ac_prog; ac_word=$2
13011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13012$as_echo_n "checking for $ac_word... " >&6; }
13013if ${ac_cv_path_XARGS+:} false; then :
13014  $as_echo_n "(cached) " >&6
13015else
13016  case $XARGS in
13017  [\\/]* | ?:[\\/]*)
13018  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13019  ;;
13020  *)
13021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13022for as_dir in $PATH
13023do
13024  IFS=$as_save_IFS
13025  test -z "$as_dir" && as_dir=.
13026    for ac_exec_ext in '' $ac_executable_extensions; do
13027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13028    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13030    break 2
13031  fi
13032done
13033  done
13034IFS=$as_save_IFS
13035
13036  ;;
13037esac
13038fi
13039XARGS=$ac_cv_path_XARGS
13040if test -n "$XARGS"; then
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13042$as_echo "$XARGS" >&6; }
13043else
13044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13045$as_echo "no" >&6; }
13046fi
13047
13048
13049  test -n "$XARGS" && break
13050done
13051
13052  else
13053    # The variable is set, but is it from the command line or the environment?
13054
13055    # Try to remove the string !XARGS! from our list.
13056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13058      # If it failed, the variable was not from the command line. Ignore it,
13059      # but warn the user (except for BASH, which is always set by the calling BASH).
13060      if test "xXARGS" != xBASH; then
13061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13062$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13063      fi
13064      # Try to locate tool using the code snippet
13065      for ac_prog in xargs
13066do
13067  # Extract the first word of "$ac_prog", so it can be a program name with args.
13068set dummy $ac_prog; ac_word=$2
13069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13070$as_echo_n "checking for $ac_word... " >&6; }
13071if ${ac_cv_path_XARGS+:} false; then :
13072  $as_echo_n "(cached) " >&6
13073else
13074  case $XARGS in
13075  [\\/]* | ?:[\\/]*)
13076  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13077  ;;
13078  *)
13079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13080for as_dir in $PATH
13081do
13082  IFS=$as_save_IFS
13083  test -z "$as_dir" && as_dir=.
13084    for ac_exec_ext in '' $ac_executable_extensions; do
13085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13086    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13088    break 2
13089  fi
13090done
13091  done
13092IFS=$as_save_IFS
13093
13094  ;;
13095esac
13096fi
13097XARGS=$ac_cv_path_XARGS
13098if test -n "$XARGS"; then
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13100$as_echo "$XARGS" >&6; }
13101else
13102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13103$as_echo "no" >&6; }
13104fi
13105
13106
13107  test -n "$XARGS" && break
13108done
13109
13110    else
13111      # If it succeeded, then it was overridden by the user. We will use it
13112      # for the tool.
13113
13114      # First remove it from the list of overridden variables, so we can test
13115      # for unknown variables in the end.
13116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13117
13118      # Check if we try to supply an empty value
13119      if test "x$XARGS" = x; then
13120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13121$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13123$as_echo_n "checking for XARGS... " >&6; }
13124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13125$as_echo "disabled" >&6; }
13126      else
13127        # Check if the provided tool contains a complete path.
13128        tool_specified="$XARGS"
13129        tool_basename="${tool_specified##*/}"
13130        if test "x$tool_basename" = "x$tool_specified"; then
13131          # A command without a complete path is provided, search $PATH.
13132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13133$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13134          # Extract the first word of "$tool_basename", so it can be a program name with args.
13135set dummy $tool_basename; ac_word=$2
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137$as_echo_n "checking for $ac_word... " >&6; }
13138if ${ac_cv_path_XARGS+:} false; then :
13139  $as_echo_n "(cached) " >&6
13140else
13141  case $XARGS in
13142  [\\/]* | ?:[\\/]*)
13143  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13144  ;;
13145  *)
13146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149  IFS=$as_save_IFS
13150  test -z "$as_dir" && as_dir=.
13151    for ac_exec_ext in '' $ac_executable_extensions; do
13152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155    break 2
13156  fi
13157done
13158  done
13159IFS=$as_save_IFS
13160
13161  ;;
13162esac
13163fi
13164XARGS=$ac_cv_path_XARGS
13165if test -n "$XARGS"; then
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13167$as_echo "$XARGS" >&6; }
13168else
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170$as_echo "no" >&6; }
13171fi
13172
13173
13174          if test "x$XARGS" = x; then
13175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13176          fi
13177        else
13178          # Otherwise we believe it is a complete path. Use it as it is.
13179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13180$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13182$as_echo_n "checking for XARGS... " >&6; }
13183          if test ! -x "$tool_specified"; then
13184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13185$as_echo "not found" >&6; }
13186            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13187          fi
13188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13189$as_echo "$tool_specified" >&6; }
13190        fi
13191      fi
13192    fi
13193
13194  fi
13195
13196
13197
13198  if test "x$XARGS" = x; then
13199    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13200  fi
13201
13202
13203
13204  # Then required tools that require some special treatment.
13205
13206
13207  # Publish this variable in the help.
13208
13209
13210  if [ -z "${AWK+x}" ]; then
13211    # The variable is not set by user, try to locate tool using the code snippet
13212    for ac_prog in gawk mawk nawk awk
13213do
13214  # Extract the first word of "$ac_prog", so it can be a program name with args.
13215set dummy $ac_prog; ac_word=$2
13216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13217$as_echo_n "checking for $ac_word... " >&6; }
13218if ${ac_cv_prog_AWK+:} false; then :
13219  $as_echo_n "(cached) " >&6
13220else
13221  if test -n "$AWK"; then
13222  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13223else
13224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13225for as_dir in $PATH
13226do
13227  IFS=$as_save_IFS
13228  test -z "$as_dir" && as_dir=.
13229    for ac_exec_ext in '' $ac_executable_extensions; do
13230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13231    ac_cv_prog_AWK="$ac_prog"
13232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13233    break 2
13234  fi
13235done
13236  done
13237IFS=$as_save_IFS
13238
13239fi
13240fi
13241AWK=$ac_cv_prog_AWK
13242if test -n "$AWK"; then
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13244$as_echo "$AWK" >&6; }
13245else
13246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13247$as_echo "no" >&6; }
13248fi
13249
13250
13251  test -n "$AWK" && break
13252done
13253
13254  else
13255    # The variable is set, but is it from the command line or the environment?
13256
13257    # Try to remove the string !AWK! from our list.
13258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13260      # If it failed, the variable was not from the command line. Ignore it,
13261      # but warn the user (except for BASH, which is always set by the calling BASH).
13262      if test "xAWK" != xBASH; then
13263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13264$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13265      fi
13266      # Try to locate tool using the code snippet
13267      for ac_prog in gawk mawk nawk awk
13268do
13269  # Extract the first word of "$ac_prog", so it can be a program name with args.
13270set dummy $ac_prog; ac_word=$2
13271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13272$as_echo_n "checking for $ac_word... " >&6; }
13273if ${ac_cv_prog_AWK+:} false; then :
13274  $as_echo_n "(cached) " >&6
13275else
13276  if test -n "$AWK"; then
13277  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13278else
13279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13280for as_dir in $PATH
13281do
13282  IFS=$as_save_IFS
13283  test -z "$as_dir" && as_dir=.
13284    for ac_exec_ext in '' $ac_executable_extensions; do
13285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13286    ac_cv_prog_AWK="$ac_prog"
13287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13288    break 2
13289  fi
13290done
13291  done
13292IFS=$as_save_IFS
13293
13294fi
13295fi
13296AWK=$ac_cv_prog_AWK
13297if test -n "$AWK"; then
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13299$as_echo "$AWK" >&6; }
13300else
13301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13302$as_echo "no" >&6; }
13303fi
13304
13305
13306  test -n "$AWK" && break
13307done
13308
13309    else
13310      # If it succeeded, then it was overridden by the user. We will use it
13311      # for the tool.
13312
13313      # First remove it from the list of overridden variables, so we can test
13314      # for unknown variables in the end.
13315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13316
13317      # Check if we try to supply an empty value
13318      if test "x$AWK" = x; then
13319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13320$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13322$as_echo_n "checking for AWK... " >&6; }
13323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13324$as_echo "disabled" >&6; }
13325      else
13326        # Check if the provided tool contains a complete path.
13327        tool_specified="$AWK"
13328        tool_basename="${tool_specified##*/}"
13329        if test "x$tool_basename" = "x$tool_specified"; then
13330          # A command without a complete path is provided, search $PATH.
13331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13332$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13333          # Extract the first word of "$tool_basename", so it can be a program name with args.
13334set dummy $tool_basename; ac_word=$2
13335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13336$as_echo_n "checking for $ac_word... " >&6; }
13337if ${ac_cv_path_AWK+:} false; then :
13338  $as_echo_n "(cached) " >&6
13339else
13340  case $AWK in
13341  [\\/]* | ?:[\\/]*)
13342  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13343  ;;
13344  *)
13345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13346for as_dir in $PATH
13347do
13348  IFS=$as_save_IFS
13349  test -z "$as_dir" && as_dir=.
13350    for ac_exec_ext in '' $ac_executable_extensions; do
13351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13352    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13354    break 2
13355  fi
13356done
13357  done
13358IFS=$as_save_IFS
13359
13360  ;;
13361esac
13362fi
13363AWK=$ac_cv_path_AWK
13364if test -n "$AWK"; then
13365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13366$as_echo "$AWK" >&6; }
13367else
13368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13369$as_echo "no" >&6; }
13370fi
13371
13372
13373          if test "x$AWK" = x; then
13374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13375          fi
13376        else
13377          # Otherwise we believe it is a complete path. Use it as it is.
13378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13379$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13381$as_echo_n "checking for AWK... " >&6; }
13382          if test ! -x "$tool_specified"; then
13383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13384$as_echo "not found" >&6; }
13385            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13386          fi
13387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13388$as_echo "$tool_specified" >&6; }
13389        fi
13390      fi
13391    fi
13392
13393  fi
13394
13395
13396  if test "x$AWK" = x; then
13397    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13398  fi
13399
13400
13401
13402
13403  # Publish this variable in the help.
13404
13405
13406  if [ -z "${GREP+x}" ]; then
13407    # The variable is not set by user, try to locate tool using the code snippet
13408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13409$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13410if ${ac_cv_path_GREP+:} false; then :
13411  $as_echo_n "(cached) " >&6
13412else
13413  if test -z "$GREP"; then
13414  ac_path_GREP_found=false
13415  # Loop through the user's path and test for each of PROGNAME-LIST
13416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13417for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13418do
13419  IFS=$as_save_IFS
13420  test -z "$as_dir" && as_dir=.
13421    for ac_prog in grep ggrep; do
13422    for ac_exec_ext in '' $ac_executable_extensions; do
13423      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13424      as_fn_executable_p "$ac_path_GREP" || continue
13425# Check for GNU ac_path_GREP and select it if it is found.
13426  # Check for GNU $ac_path_GREP
13427case `"$ac_path_GREP" --version 2>&1` in
13428*GNU*)
13429  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13430*)
13431  ac_count=0
13432  $as_echo_n 0123456789 >"conftest.in"
13433  while :
13434  do
13435    cat "conftest.in" "conftest.in" >"conftest.tmp"
13436    mv "conftest.tmp" "conftest.in"
13437    cp "conftest.in" "conftest.nl"
13438    $as_echo 'GREP' >> "conftest.nl"
13439    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13440    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13441    as_fn_arith $ac_count + 1 && ac_count=$as_val
13442    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13443      # Best one so far, save it but keep looking for a better one
13444      ac_cv_path_GREP="$ac_path_GREP"
13445      ac_path_GREP_max=$ac_count
13446    fi
13447    # 10*(2^10) chars as input seems more than enough
13448    test $ac_count -gt 10 && break
13449  done
13450  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13451esac
13452
13453      $ac_path_GREP_found && break 3
13454    done
13455  done
13456  done
13457IFS=$as_save_IFS
13458  if test -z "$ac_cv_path_GREP"; then
13459    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13460  fi
13461else
13462  ac_cv_path_GREP=$GREP
13463fi
13464
13465fi
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13467$as_echo "$ac_cv_path_GREP" >&6; }
13468 GREP="$ac_cv_path_GREP"
13469
13470
13471  else
13472    # The variable is set, but is it from the command line or the environment?
13473
13474    # Try to remove the string !GREP! from our list.
13475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13477      # If it failed, the variable was not from the command line. Ignore it,
13478      # but warn the user (except for BASH, which is always set by the calling BASH).
13479      if test "xGREP" != xBASH; then
13480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13481$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13482      fi
13483      # Try to locate tool using the code snippet
13484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13485$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13486if ${ac_cv_path_GREP+:} false; then :
13487  $as_echo_n "(cached) " >&6
13488else
13489  if test -z "$GREP"; then
13490  ac_path_GREP_found=false
13491  # Loop through the user's path and test for each of PROGNAME-LIST
13492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13493for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13494do
13495  IFS=$as_save_IFS
13496  test -z "$as_dir" && as_dir=.
13497    for ac_prog in grep ggrep; do
13498    for ac_exec_ext in '' $ac_executable_extensions; do
13499      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13500      as_fn_executable_p "$ac_path_GREP" || continue
13501# Check for GNU ac_path_GREP and select it if it is found.
13502  # Check for GNU $ac_path_GREP
13503case `"$ac_path_GREP" --version 2>&1` in
13504*GNU*)
13505  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13506*)
13507  ac_count=0
13508  $as_echo_n 0123456789 >"conftest.in"
13509  while :
13510  do
13511    cat "conftest.in" "conftest.in" >"conftest.tmp"
13512    mv "conftest.tmp" "conftest.in"
13513    cp "conftest.in" "conftest.nl"
13514    $as_echo 'GREP' >> "conftest.nl"
13515    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13516    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13517    as_fn_arith $ac_count + 1 && ac_count=$as_val
13518    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13519      # Best one so far, save it but keep looking for a better one
13520      ac_cv_path_GREP="$ac_path_GREP"
13521      ac_path_GREP_max=$ac_count
13522    fi
13523    # 10*(2^10) chars as input seems more than enough
13524    test $ac_count -gt 10 && break
13525  done
13526  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13527esac
13528
13529      $ac_path_GREP_found && break 3
13530    done
13531  done
13532  done
13533IFS=$as_save_IFS
13534  if test -z "$ac_cv_path_GREP"; then
13535    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13536  fi
13537else
13538  ac_cv_path_GREP=$GREP
13539fi
13540
13541fi
13542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13543$as_echo "$ac_cv_path_GREP" >&6; }
13544 GREP="$ac_cv_path_GREP"
13545
13546
13547    else
13548      # If it succeeded, then it was overridden by the user. We will use it
13549      # for the tool.
13550
13551      # First remove it from the list of overridden variables, so we can test
13552      # for unknown variables in the end.
13553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13554
13555      # Check if we try to supply an empty value
13556      if test "x$GREP" = x; then
13557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13558$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13560$as_echo_n "checking for GREP... " >&6; }
13561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13562$as_echo "disabled" >&6; }
13563      else
13564        # Check if the provided tool contains a complete path.
13565        tool_specified="$GREP"
13566        tool_basename="${tool_specified##*/}"
13567        if test "x$tool_basename" = "x$tool_specified"; then
13568          # A command without a complete path is provided, search $PATH.
13569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13570$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13571          # Extract the first word of "$tool_basename", so it can be a program name with args.
13572set dummy $tool_basename; ac_word=$2
13573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13574$as_echo_n "checking for $ac_word... " >&6; }
13575if ${ac_cv_path_GREP+:} false; then :
13576  $as_echo_n "(cached) " >&6
13577else
13578  case $GREP in
13579  [\\/]* | ?:[\\/]*)
13580  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13581  ;;
13582  *)
13583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13584for as_dir in $PATH
13585do
13586  IFS=$as_save_IFS
13587  test -z "$as_dir" && as_dir=.
13588    for ac_exec_ext in '' $ac_executable_extensions; do
13589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13590    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13592    break 2
13593  fi
13594done
13595  done
13596IFS=$as_save_IFS
13597
13598  ;;
13599esac
13600fi
13601GREP=$ac_cv_path_GREP
13602if test -n "$GREP"; then
13603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13604$as_echo "$GREP" >&6; }
13605else
13606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13607$as_echo "no" >&6; }
13608fi
13609
13610
13611          if test "x$GREP" = x; then
13612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13613          fi
13614        else
13615          # Otherwise we believe it is a complete path. Use it as it is.
13616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13617$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13619$as_echo_n "checking for GREP... " >&6; }
13620          if test ! -x "$tool_specified"; then
13621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13622$as_echo "not found" >&6; }
13623            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13624          fi
13625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13626$as_echo "$tool_specified" >&6; }
13627        fi
13628      fi
13629    fi
13630
13631  fi
13632
13633
13634  if test "x$GREP" = x; then
13635    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13636  fi
13637
13638
13639
13640
13641  # Publish this variable in the help.
13642
13643
13644  if [ -z "${EGREP+x}" ]; then
13645    # The variable is not set by user, try to locate tool using the code snippet
13646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13647$as_echo_n "checking for egrep... " >&6; }
13648if ${ac_cv_path_EGREP+:} false; then :
13649  $as_echo_n "(cached) " >&6
13650else
13651  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13652   then ac_cv_path_EGREP="$GREP -E"
13653   else
13654     if test -z "$EGREP"; then
13655  ac_path_EGREP_found=false
13656  # Loop through the user's path and test for each of PROGNAME-LIST
13657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13658for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13659do
13660  IFS=$as_save_IFS
13661  test -z "$as_dir" && as_dir=.
13662    for ac_prog in egrep; do
13663    for ac_exec_ext in '' $ac_executable_extensions; do
13664      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13665      as_fn_executable_p "$ac_path_EGREP" || continue
13666# Check for GNU ac_path_EGREP and select it if it is found.
13667  # Check for GNU $ac_path_EGREP
13668case `"$ac_path_EGREP" --version 2>&1` in
13669*GNU*)
13670  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13671*)
13672  ac_count=0
13673  $as_echo_n 0123456789 >"conftest.in"
13674  while :
13675  do
13676    cat "conftest.in" "conftest.in" >"conftest.tmp"
13677    mv "conftest.tmp" "conftest.in"
13678    cp "conftest.in" "conftest.nl"
13679    $as_echo 'EGREP' >> "conftest.nl"
13680    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13681    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13682    as_fn_arith $ac_count + 1 && ac_count=$as_val
13683    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13684      # Best one so far, save it but keep looking for a better one
13685      ac_cv_path_EGREP="$ac_path_EGREP"
13686      ac_path_EGREP_max=$ac_count
13687    fi
13688    # 10*(2^10) chars as input seems more than enough
13689    test $ac_count -gt 10 && break
13690  done
13691  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13692esac
13693
13694      $ac_path_EGREP_found && break 3
13695    done
13696  done
13697  done
13698IFS=$as_save_IFS
13699  if test -z "$ac_cv_path_EGREP"; then
13700    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13701  fi
13702else
13703  ac_cv_path_EGREP=$EGREP
13704fi
13705
13706   fi
13707fi
13708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13709$as_echo "$ac_cv_path_EGREP" >&6; }
13710 EGREP="$ac_cv_path_EGREP"
13711
13712
13713  else
13714    # The variable is set, but is it from the command line or the environment?
13715
13716    # Try to remove the string !EGREP! from our list.
13717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13719      # If it failed, the variable was not from the command line. Ignore it,
13720      # but warn the user (except for BASH, which is always set by the calling BASH).
13721      if test "xEGREP" != xBASH; then
13722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13723$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13724      fi
13725      # Try to locate tool using the code snippet
13726      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13727$as_echo_n "checking for egrep... " >&6; }
13728if ${ac_cv_path_EGREP+:} false; then :
13729  $as_echo_n "(cached) " >&6
13730else
13731  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13732   then ac_cv_path_EGREP="$GREP -E"
13733   else
13734     if test -z "$EGREP"; then
13735  ac_path_EGREP_found=false
13736  # Loop through the user's path and test for each of PROGNAME-LIST
13737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13738for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13739do
13740  IFS=$as_save_IFS
13741  test -z "$as_dir" && as_dir=.
13742    for ac_prog in egrep; do
13743    for ac_exec_ext in '' $ac_executable_extensions; do
13744      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13745      as_fn_executable_p "$ac_path_EGREP" || continue
13746# Check for GNU ac_path_EGREP and select it if it is found.
13747  # Check for GNU $ac_path_EGREP
13748case `"$ac_path_EGREP" --version 2>&1` in
13749*GNU*)
13750  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13751*)
13752  ac_count=0
13753  $as_echo_n 0123456789 >"conftest.in"
13754  while :
13755  do
13756    cat "conftest.in" "conftest.in" >"conftest.tmp"
13757    mv "conftest.tmp" "conftest.in"
13758    cp "conftest.in" "conftest.nl"
13759    $as_echo 'EGREP' >> "conftest.nl"
13760    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13761    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13762    as_fn_arith $ac_count + 1 && ac_count=$as_val
13763    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13764      # Best one so far, save it but keep looking for a better one
13765      ac_cv_path_EGREP="$ac_path_EGREP"
13766      ac_path_EGREP_max=$ac_count
13767    fi
13768    # 10*(2^10) chars as input seems more than enough
13769    test $ac_count -gt 10 && break
13770  done
13771  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13772esac
13773
13774      $ac_path_EGREP_found && break 3
13775    done
13776  done
13777  done
13778IFS=$as_save_IFS
13779  if test -z "$ac_cv_path_EGREP"; then
13780    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13781  fi
13782else
13783  ac_cv_path_EGREP=$EGREP
13784fi
13785
13786   fi
13787fi
13788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13789$as_echo "$ac_cv_path_EGREP" >&6; }
13790 EGREP="$ac_cv_path_EGREP"
13791
13792
13793    else
13794      # If it succeeded, then it was overridden by the user. We will use it
13795      # for the tool.
13796
13797      # First remove it from the list of overridden variables, so we can test
13798      # for unknown variables in the end.
13799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13800
13801      # Check if we try to supply an empty value
13802      if test "x$EGREP" = x; then
13803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13804$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13806$as_echo_n "checking for EGREP... " >&6; }
13807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13808$as_echo "disabled" >&6; }
13809      else
13810        # Check if the provided tool contains a complete path.
13811        tool_specified="$EGREP"
13812        tool_basename="${tool_specified##*/}"
13813        if test "x$tool_basename" = "x$tool_specified"; then
13814          # A command without a complete path is provided, search $PATH.
13815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13816$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13817          # Extract the first word of "$tool_basename", so it can be a program name with args.
13818set dummy $tool_basename; ac_word=$2
13819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13820$as_echo_n "checking for $ac_word... " >&6; }
13821if ${ac_cv_path_EGREP+:} false; then :
13822  $as_echo_n "(cached) " >&6
13823else
13824  case $EGREP in
13825  [\\/]* | ?:[\\/]*)
13826  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13827  ;;
13828  *)
13829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13830for as_dir in $PATH
13831do
13832  IFS=$as_save_IFS
13833  test -z "$as_dir" && as_dir=.
13834    for ac_exec_ext in '' $ac_executable_extensions; do
13835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13836    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13838    break 2
13839  fi
13840done
13841  done
13842IFS=$as_save_IFS
13843
13844  ;;
13845esac
13846fi
13847EGREP=$ac_cv_path_EGREP
13848if test -n "$EGREP"; then
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13850$as_echo "$EGREP" >&6; }
13851else
13852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13853$as_echo "no" >&6; }
13854fi
13855
13856
13857          if test "x$EGREP" = x; then
13858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13859          fi
13860        else
13861          # Otherwise we believe it is a complete path. Use it as it is.
13862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13863$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13865$as_echo_n "checking for EGREP... " >&6; }
13866          if test ! -x "$tool_specified"; then
13867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13868$as_echo "not found" >&6; }
13869            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13870          fi
13871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13872$as_echo "$tool_specified" >&6; }
13873        fi
13874      fi
13875    fi
13876
13877  fi
13878
13879
13880  if test "x$EGREP" = x; then
13881    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13882  fi
13883
13884
13885
13886
13887  # Publish this variable in the help.
13888
13889
13890  if [ -z "${FGREP+x}" ]; then
13891    # The variable is not set by user, try to locate tool using the code snippet
13892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13893$as_echo_n "checking for fgrep... " >&6; }
13894if ${ac_cv_path_FGREP+:} false; then :
13895  $as_echo_n "(cached) " >&6
13896else
13897  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13898   then ac_cv_path_FGREP="$GREP -F"
13899   else
13900     if test -z "$FGREP"; then
13901  ac_path_FGREP_found=false
13902  # Loop through the user's path and test for each of PROGNAME-LIST
13903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13904for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13905do
13906  IFS=$as_save_IFS
13907  test -z "$as_dir" && as_dir=.
13908    for ac_prog in fgrep; do
13909    for ac_exec_ext in '' $ac_executable_extensions; do
13910      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13911      as_fn_executable_p "$ac_path_FGREP" || continue
13912# Check for GNU ac_path_FGREP and select it if it is found.
13913  # Check for GNU $ac_path_FGREP
13914case `"$ac_path_FGREP" --version 2>&1` in
13915*GNU*)
13916  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13917*)
13918  ac_count=0
13919  $as_echo_n 0123456789 >"conftest.in"
13920  while :
13921  do
13922    cat "conftest.in" "conftest.in" >"conftest.tmp"
13923    mv "conftest.tmp" "conftest.in"
13924    cp "conftest.in" "conftest.nl"
13925    $as_echo 'FGREP' >> "conftest.nl"
13926    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13927    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13928    as_fn_arith $ac_count + 1 && ac_count=$as_val
13929    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13930      # Best one so far, save it but keep looking for a better one
13931      ac_cv_path_FGREP="$ac_path_FGREP"
13932      ac_path_FGREP_max=$ac_count
13933    fi
13934    # 10*(2^10) chars as input seems more than enough
13935    test $ac_count -gt 10 && break
13936  done
13937  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13938esac
13939
13940      $ac_path_FGREP_found && break 3
13941    done
13942  done
13943  done
13944IFS=$as_save_IFS
13945  if test -z "$ac_cv_path_FGREP"; then
13946    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13947  fi
13948else
13949  ac_cv_path_FGREP=$FGREP
13950fi
13951
13952   fi
13953fi
13954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13955$as_echo "$ac_cv_path_FGREP" >&6; }
13956 FGREP="$ac_cv_path_FGREP"
13957
13958
13959  else
13960    # The variable is set, but is it from the command line or the environment?
13961
13962    # Try to remove the string !FGREP! from our list.
13963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13965      # If it failed, the variable was not from the command line. Ignore it,
13966      # but warn the user (except for BASH, which is always set by the calling BASH).
13967      if test "xFGREP" != xBASH; then
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13969$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13970      fi
13971      # Try to locate tool using the code snippet
13972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13973$as_echo_n "checking for fgrep... " >&6; }
13974if ${ac_cv_path_FGREP+:} false; then :
13975  $as_echo_n "(cached) " >&6
13976else
13977  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13978   then ac_cv_path_FGREP="$GREP -F"
13979   else
13980     if test -z "$FGREP"; then
13981  ac_path_FGREP_found=false
13982  # Loop through the user's path and test for each of PROGNAME-LIST
13983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13984for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13985do
13986  IFS=$as_save_IFS
13987  test -z "$as_dir" && as_dir=.
13988    for ac_prog in fgrep; do
13989    for ac_exec_ext in '' $ac_executable_extensions; do
13990      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13991      as_fn_executable_p "$ac_path_FGREP" || continue
13992# Check for GNU ac_path_FGREP and select it if it is found.
13993  # Check for GNU $ac_path_FGREP
13994case `"$ac_path_FGREP" --version 2>&1` in
13995*GNU*)
13996  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13997*)
13998  ac_count=0
13999  $as_echo_n 0123456789 >"conftest.in"
14000  while :
14001  do
14002    cat "conftest.in" "conftest.in" >"conftest.tmp"
14003    mv "conftest.tmp" "conftest.in"
14004    cp "conftest.in" "conftest.nl"
14005    $as_echo 'FGREP' >> "conftest.nl"
14006    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14007    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14008    as_fn_arith $ac_count + 1 && ac_count=$as_val
14009    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14010      # Best one so far, save it but keep looking for a better one
14011      ac_cv_path_FGREP="$ac_path_FGREP"
14012      ac_path_FGREP_max=$ac_count
14013    fi
14014    # 10*(2^10) chars as input seems more than enough
14015    test $ac_count -gt 10 && break
14016  done
14017  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14018esac
14019
14020      $ac_path_FGREP_found && break 3
14021    done
14022  done
14023  done
14024IFS=$as_save_IFS
14025  if test -z "$ac_cv_path_FGREP"; then
14026    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14027  fi
14028else
14029  ac_cv_path_FGREP=$FGREP
14030fi
14031
14032   fi
14033fi
14034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14035$as_echo "$ac_cv_path_FGREP" >&6; }
14036 FGREP="$ac_cv_path_FGREP"
14037
14038
14039    else
14040      # If it succeeded, then it was overridden by the user. We will use it
14041      # for the tool.
14042
14043      # First remove it from the list of overridden variables, so we can test
14044      # for unknown variables in the end.
14045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14046
14047      # Check if we try to supply an empty value
14048      if test "x$FGREP" = x; then
14049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14050$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14052$as_echo_n "checking for FGREP... " >&6; }
14053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14054$as_echo "disabled" >&6; }
14055      else
14056        # Check if the provided tool contains a complete path.
14057        tool_specified="$FGREP"
14058        tool_basename="${tool_specified##*/}"
14059        if test "x$tool_basename" = "x$tool_specified"; then
14060          # A command without a complete path is provided, search $PATH.
14061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14062$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14063          # Extract the first word of "$tool_basename", so it can be a program name with args.
14064set dummy $tool_basename; ac_word=$2
14065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14066$as_echo_n "checking for $ac_word... " >&6; }
14067if ${ac_cv_path_FGREP+:} false; then :
14068  $as_echo_n "(cached) " >&6
14069else
14070  case $FGREP in
14071  [\\/]* | ?:[\\/]*)
14072  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14073  ;;
14074  *)
14075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14076for as_dir in $PATH
14077do
14078  IFS=$as_save_IFS
14079  test -z "$as_dir" && as_dir=.
14080    for ac_exec_ext in '' $ac_executable_extensions; do
14081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14082    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14084    break 2
14085  fi
14086done
14087  done
14088IFS=$as_save_IFS
14089
14090  ;;
14091esac
14092fi
14093FGREP=$ac_cv_path_FGREP
14094if test -n "$FGREP"; then
14095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14096$as_echo "$FGREP" >&6; }
14097else
14098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14099$as_echo "no" >&6; }
14100fi
14101
14102
14103          if test "x$FGREP" = x; then
14104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14105          fi
14106        else
14107          # Otherwise we believe it is a complete path. Use it as it is.
14108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14109$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14111$as_echo_n "checking for FGREP... " >&6; }
14112          if test ! -x "$tool_specified"; then
14113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14114$as_echo "not found" >&6; }
14115            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14116          fi
14117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14118$as_echo "$tool_specified" >&6; }
14119        fi
14120      fi
14121    fi
14122
14123  fi
14124
14125
14126  if test "x$FGREP" = x; then
14127    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14128  fi
14129
14130
14131
14132
14133  # Publish this variable in the help.
14134
14135
14136  if [ -z "${SED+x}" ]; then
14137    # The variable is not set by user, try to locate tool using the code snippet
14138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14139$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14140if ${ac_cv_path_SED+:} false; then :
14141  $as_echo_n "(cached) " >&6
14142else
14143            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14144     for ac_i in 1 2 3 4 5 6 7; do
14145       ac_script="$ac_script$as_nl$ac_script"
14146     done
14147     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14148     { ac_script=; unset ac_script;}
14149     if test -z "$SED"; then
14150  ac_path_SED_found=false
14151  # Loop through the user's path and test for each of PROGNAME-LIST
14152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14153for as_dir in $PATH
14154do
14155  IFS=$as_save_IFS
14156  test -z "$as_dir" && as_dir=.
14157    for ac_prog in sed gsed; do
14158    for ac_exec_ext in '' $ac_executable_extensions; do
14159      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14160      as_fn_executable_p "$ac_path_SED" || continue
14161# Check for GNU ac_path_SED and select it if it is found.
14162  # Check for GNU $ac_path_SED
14163case `"$ac_path_SED" --version 2>&1` in
14164*GNU*)
14165  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14166*)
14167  ac_count=0
14168  $as_echo_n 0123456789 >"conftest.in"
14169  while :
14170  do
14171    cat "conftest.in" "conftest.in" >"conftest.tmp"
14172    mv "conftest.tmp" "conftest.in"
14173    cp "conftest.in" "conftest.nl"
14174    $as_echo '' >> "conftest.nl"
14175    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14176    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14177    as_fn_arith $ac_count + 1 && ac_count=$as_val
14178    if test $ac_count -gt ${ac_path_SED_max-0}; then
14179      # Best one so far, save it but keep looking for a better one
14180      ac_cv_path_SED="$ac_path_SED"
14181      ac_path_SED_max=$ac_count
14182    fi
14183    # 10*(2^10) chars as input seems more than enough
14184    test $ac_count -gt 10 && break
14185  done
14186  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14187esac
14188
14189      $ac_path_SED_found && break 3
14190    done
14191  done
14192  done
14193IFS=$as_save_IFS
14194  if test -z "$ac_cv_path_SED"; then
14195    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14196  fi
14197else
14198  ac_cv_path_SED=$SED
14199fi
14200
14201fi
14202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14203$as_echo "$ac_cv_path_SED" >&6; }
14204 SED="$ac_cv_path_SED"
14205  rm -f conftest.sed
14206
14207  else
14208    # The variable is set, but is it from the command line or the environment?
14209
14210    # Try to remove the string !SED! from our list.
14211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14213      # If it failed, the variable was not from the command line. Ignore it,
14214      # but warn the user (except for BASH, which is always set by the calling BASH).
14215      if test "xSED" != xBASH; then
14216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14217$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14218      fi
14219      # Try to locate tool using the code snippet
14220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14221$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14222if ${ac_cv_path_SED+:} false; then :
14223  $as_echo_n "(cached) " >&6
14224else
14225            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14226     for ac_i in 1 2 3 4 5 6 7; do
14227       ac_script="$ac_script$as_nl$ac_script"
14228     done
14229     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14230     { ac_script=; unset ac_script;}
14231     if test -z "$SED"; then
14232  ac_path_SED_found=false
14233  # Loop through the user's path and test for each of PROGNAME-LIST
14234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14235for as_dir in $PATH
14236do
14237  IFS=$as_save_IFS
14238  test -z "$as_dir" && as_dir=.
14239    for ac_prog in sed gsed; do
14240    for ac_exec_ext in '' $ac_executable_extensions; do
14241      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14242      as_fn_executable_p "$ac_path_SED" || continue
14243# Check for GNU ac_path_SED and select it if it is found.
14244  # Check for GNU $ac_path_SED
14245case `"$ac_path_SED" --version 2>&1` in
14246*GNU*)
14247  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14248*)
14249  ac_count=0
14250  $as_echo_n 0123456789 >"conftest.in"
14251  while :
14252  do
14253    cat "conftest.in" "conftest.in" >"conftest.tmp"
14254    mv "conftest.tmp" "conftest.in"
14255    cp "conftest.in" "conftest.nl"
14256    $as_echo '' >> "conftest.nl"
14257    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14258    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14259    as_fn_arith $ac_count + 1 && ac_count=$as_val
14260    if test $ac_count -gt ${ac_path_SED_max-0}; then
14261      # Best one so far, save it but keep looking for a better one
14262      ac_cv_path_SED="$ac_path_SED"
14263      ac_path_SED_max=$ac_count
14264    fi
14265    # 10*(2^10) chars as input seems more than enough
14266    test $ac_count -gt 10 && break
14267  done
14268  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14269esac
14270
14271      $ac_path_SED_found && break 3
14272    done
14273  done
14274  done
14275IFS=$as_save_IFS
14276  if test -z "$ac_cv_path_SED"; then
14277    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14278  fi
14279else
14280  ac_cv_path_SED=$SED
14281fi
14282
14283fi
14284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14285$as_echo "$ac_cv_path_SED" >&6; }
14286 SED="$ac_cv_path_SED"
14287  rm -f conftest.sed
14288
14289    else
14290      # If it succeeded, then it was overridden by the user. We will use it
14291      # for the tool.
14292
14293      # First remove it from the list of overridden variables, so we can test
14294      # for unknown variables in the end.
14295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14296
14297      # Check if we try to supply an empty value
14298      if test "x$SED" = x; then
14299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14300$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14302$as_echo_n "checking for SED... " >&6; }
14303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14304$as_echo "disabled" >&6; }
14305      else
14306        # Check if the provided tool contains a complete path.
14307        tool_specified="$SED"
14308        tool_basename="${tool_specified##*/}"
14309        if test "x$tool_basename" = "x$tool_specified"; then
14310          # A command without a complete path is provided, search $PATH.
14311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14312$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14313          # Extract the first word of "$tool_basename", so it can be a program name with args.
14314set dummy $tool_basename; ac_word=$2
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14316$as_echo_n "checking for $ac_word... " >&6; }
14317if ${ac_cv_path_SED+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  case $SED in
14321  [\\/]* | ?:[\\/]*)
14322  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14323  ;;
14324  *)
14325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14326for as_dir in $PATH
14327do
14328  IFS=$as_save_IFS
14329  test -z "$as_dir" && as_dir=.
14330    for ac_exec_ext in '' $ac_executable_extensions; do
14331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14332    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14334    break 2
14335  fi
14336done
14337  done
14338IFS=$as_save_IFS
14339
14340  ;;
14341esac
14342fi
14343SED=$ac_cv_path_SED
14344if test -n "$SED"; then
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14346$as_echo "$SED" >&6; }
14347else
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349$as_echo "no" >&6; }
14350fi
14351
14352
14353          if test "x$SED" = x; then
14354            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14355          fi
14356        else
14357          # Otherwise we believe it is a complete path. Use it as it is.
14358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14359$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14361$as_echo_n "checking for SED... " >&6; }
14362          if test ! -x "$tool_specified"; then
14363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14364$as_echo "not found" >&6; }
14365            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14366          fi
14367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14368$as_echo "$tool_specified" >&6; }
14369        fi
14370      fi
14371    fi
14372
14373  fi
14374
14375
14376  if test "x$SED" = x; then
14377    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14378  fi
14379
14380
14381
14382  # Always force rm.
14383  RM="$RM -f"
14384
14385  # pwd behaves differently on various platforms and some don't support the -L flag.
14386  # Always use the bash builtin pwd to get uniform behavior.
14387  THEPWDCMD=pwd
14388
14389  # These are not required on all platforms
14390
14391
14392  # Publish this variable in the help.
14393
14394
14395  if [ -z "${CYGPATH+x}" ]; then
14396    # The variable is not set by user, try to locate tool using the code snippet
14397    for ac_prog in cygpath
14398do
14399  # Extract the first word of "$ac_prog", so it can be a program name with args.
14400set dummy $ac_prog; ac_word=$2
14401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14402$as_echo_n "checking for $ac_word... " >&6; }
14403if ${ac_cv_path_CYGPATH+:} false; then :
14404  $as_echo_n "(cached) " >&6
14405else
14406  case $CYGPATH in
14407  [\\/]* | ?:[\\/]*)
14408  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14409  ;;
14410  *)
14411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14412for as_dir in $PATH
14413do
14414  IFS=$as_save_IFS
14415  test -z "$as_dir" && as_dir=.
14416    for ac_exec_ext in '' $ac_executable_extensions; do
14417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14418    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14420    break 2
14421  fi
14422done
14423  done
14424IFS=$as_save_IFS
14425
14426  ;;
14427esac
14428fi
14429CYGPATH=$ac_cv_path_CYGPATH
14430if test -n "$CYGPATH"; then
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14432$as_echo "$CYGPATH" >&6; }
14433else
14434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14435$as_echo "no" >&6; }
14436fi
14437
14438
14439  test -n "$CYGPATH" && break
14440done
14441
14442  else
14443    # The variable is set, but is it from the command line or the environment?
14444
14445    # Try to remove the string !CYGPATH! from our list.
14446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14448      # If it failed, the variable was not from the command line. Ignore it,
14449      # but warn the user (except for BASH, which is always set by the calling BASH).
14450      if test "xCYGPATH" != xBASH; then
14451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14452$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14453      fi
14454      # Try to locate tool using the code snippet
14455      for ac_prog in cygpath
14456do
14457  # Extract the first word of "$ac_prog", so it can be a program name with args.
14458set dummy $ac_prog; ac_word=$2
14459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14460$as_echo_n "checking for $ac_word... " >&6; }
14461if ${ac_cv_path_CYGPATH+:} false; then :
14462  $as_echo_n "(cached) " >&6
14463else
14464  case $CYGPATH in
14465  [\\/]* | ?:[\\/]*)
14466  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14467  ;;
14468  *)
14469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14470for as_dir in $PATH
14471do
14472  IFS=$as_save_IFS
14473  test -z "$as_dir" && as_dir=.
14474    for ac_exec_ext in '' $ac_executable_extensions; do
14475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14476    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14478    break 2
14479  fi
14480done
14481  done
14482IFS=$as_save_IFS
14483
14484  ;;
14485esac
14486fi
14487CYGPATH=$ac_cv_path_CYGPATH
14488if test -n "$CYGPATH"; then
14489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14490$as_echo "$CYGPATH" >&6; }
14491else
14492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14493$as_echo "no" >&6; }
14494fi
14495
14496
14497  test -n "$CYGPATH" && break
14498done
14499
14500    else
14501      # If it succeeded, then it was overridden by the user. We will use it
14502      # for the tool.
14503
14504      # First remove it from the list of overridden variables, so we can test
14505      # for unknown variables in the end.
14506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14507
14508      # Check if we try to supply an empty value
14509      if test "x$CYGPATH" = x; then
14510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14511$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14513$as_echo_n "checking for CYGPATH... " >&6; }
14514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14515$as_echo "disabled" >&6; }
14516      else
14517        # Check if the provided tool contains a complete path.
14518        tool_specified="$CYGPATH"
14519        tool_basename="${tool_specified##*/}"
14520        if test "x$tool_basename" = "x$tool_specified"; then
14521          # A command without a complete path is provided, search $PATH.
14522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14523$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14524          # Extract the first word of "$tool_basename", so it can be a program name with args.
14525set dummy $tool_basename; ac_word=$2
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14527$as_echo_n "checking for $ac_word... " >&6; }
14528if ${ac_cv_path_CYGPATH+:} false; then :
14529  $as_echo_n "(cached) " >&6
14530else
14531  case $CYGPATH in
14532  [\\/]* | ?:[\\/]*)
14533  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14534  ;;
14535  *)
14536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14537for as_dir in $PATH
14538do
14539  IFS=$as_save_IFS
14540  test -z "$as_dir" && as_dir=.
14541    for ac_exec_ext in '' $ac_executable_extensions; do
14542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14543    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14545    break 2
14546  fi
14547done
14548  done
14549IFS=$as_save_IFS
14550
14551  ;;
14552esac
14553fi
14554CYGPATH=$ac_cv_path_CYGPATH
14555if test -n "$CYGPATH"; then
14556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14557$as_echo "$CYGPATH" >&6; }
14558else
14559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560$as_echo "no" >&6; }
14561fi
14562
14563
14564          if test "x$CYGPATH" = x; then
14565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14566          fi
14567        else
14568          # Otherwise we believe it is a complete path. Use it as it is.
14569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14570$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14572$as_echo_n "checking for CYGPATH... " >&6; }
14573          if test ! -x "$tool_specified"; then
14574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14575$as_echo "not found" >&6; }
14576            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14577          fi
14578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14579$as_echo "$tool_specified" >&6; }
14580        fi
14581      fi
14582    fi
14583
14584  fi
14585
14586
14587
14588
14589  # Publish this variable in the help.
14590
14591
14592  if [ -z "${READLINK+x}" ]; then
14593    # The variable is not set by user, try to locate tool using the code snippet
14594    for ac_prog in greadlink readlink
14595do
14596  # Extract the first word of "$ac_prog", so it can be a program name with args.
14597set dummy $ac_prog; ac_word=$2
14598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14599$as_echo_n "checking for $ac_word... " >&6; }
14600if ${ac_cv_path_READLINK+:} false; then :
14601  $as_echo_n "(cached) " >&6
14602else
14603  case $READLINK in
14604  [\\/]* | ?:[\\/]*)
14605  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14606  ;;
14607  *)
14608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14609for as_dir in $PATH
14610do
14611  IFS=$as_save_IFS
14612  test -z "$as_dir" && as_dir=.
14613    for ac_exec_ext in '' $ac_executable_extensions; do
14614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14615    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14617    break 2
14618  fi
14619done
14620  done
14621IFS=$as_save_IFS
14622
14623  ;;
14624esac
14625fi
14626READLINK=$ac_cv_path_READLINK
14627if test -n "$READLINK"; then
14628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14629$as_echo "$READLINK" >&6; }
14630else
14631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14632$as_echo "no" >&6; }
14633fi
14634
14635
14636  test -n "$READLINK" && break
14637done
14638
14639  else
14640    # The variable is set, but is it from the command line or the environment?
14641
14642    # Try to remove the string !READLINK! from our list.
14643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14645      # If it failed, the variable was not from the command line. Ignore it,
14646      # but warn the user (except for BASH, which is always set by the calling BASH).
14647      if test "xREADLINK" != xBASH; then
14648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14649$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14650      fi
14651      # Try to locate tool using the code snippet
14652      for ac_prog in greadlink readlink
14653do
14654  # Extract the first word of "$ac_prog", so it can be a program name with args.
14655set dummy $ac_prog; ac_word=$2
14656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14657$as_echo_n "checking for $ac_word... " >&6; }
14658if ${ac_cv_path_READLINK+:} false; then :
14659  $as_echo_n "(cached) " >&6
14660else
14661  case $READLINK in
14662  [\\/]* | ?:[\\/]*)
14663  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14664  ;;
14665  *)
14666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14667for as_dir in $PATH
14668do
14669  IFS=$as_save_IFS
14670  test -z "$as_dir" && as_dir=.
14671    for ac_exec_ext in '' $ac_executable_extensions; do
14672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14673    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14675    break 2
14676  fi
14677done
14678  done
14679IFS=$as_save_IFS
14680
14681  ;;
14682esac
14683fi
14684READLINK=$ac_cv_path_READLINK
14685if test -n "$READLINK"; then
14686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14687$as_echo "$READLINK" >&6; }
14688else
14689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14690$as_echo "no" >&6; }
14691fi
14692
14693
14694  test -n "$READLINK" && break
14695done
14696
14697    else
14698      # If it succeeded, then it was overridden by the user. We will use it
14699      # for the tool.
14700
14701      # First remove it from the list of overridden variables, so we can test
14702      # for unknown variables in the end.
14703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14704
14705      # Check if we try to supply an empty value
14706      if test "x$READLINK" = x; then
14707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14708$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14710$as_echo_n "checking for READLINK... " >&6; }
14711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14712$as_echo "disabled" >&6; }
14713      else
14714        # Check if the provided tool contains a complete path.
14715        tool_specified="$READLINK"
14716        tool_basename="${tool_specified##*/}"
14717        if test "x$tool_basename" = "x$tool_specified"; then
14718          # A command without a complete path is provided, search $PATH.
14719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14720$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14721          # Extract the first word of "$tool_basename", so it can be a program name with args.
14722set dummy $tool_basename; ac_word=$2
14723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14724$as_echo_n "checking for $ac_word... " >&6; }
14725if ${ac_cv_path_READLINK+:} false; then :
14726  $as_echo_n "(cached) " >&6
14727else
14728  case $READLINK in
14729  [\\/]* | ?:[\\/]*)
14730  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14731  ;;
14732  *)
14733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14734for as_dir in $PATH
14735do
14736  IFS=$as_save_IFS
14737  test -z "$as_dir" && as_dir=.
14738    for ac_exec_ext in '' $ac_executable_extensions; do
14739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14740    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14742    break 2
14743  fi
14744done
14745  done
14746IFS=$as_save_IFS
14747
14748  ;;
14749esac
14750fi
14751READLINK=$ac_cv_path_READLINK
14752if test -n "$READLINK"; then
14753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14754$as_echo "$READLINK" >&6; }
14755else
14756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14757$as_echo "no" >&6; }
14758fi
14759
14760
14761          if test "x$READLINK" = x; then
14762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14763          fi
14764        else
14765          # Otherwise we believe it is a complete path. Use it as it is.
14766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14767$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14769$as_echo_n "checking for READLINK... " >&6; }
14770          if test ! -x "$tool_specified"; then
14771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14772$as_echo "not found" >&6; }
14773            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14774          fi
14775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14776$as_echo "$tool_specified" >&6; }
14777        fi
14778      fi
14779    fi
14780
14781  fi
14782
14783
14784
14785
14786  # Publish this variable in the help.
14787
14788
14789  if [ -z "${DF+x}" ]; then
14790    # The variable is not set by user, try to locate tool using the code snippet
14791    for ac_prog in df
14792do
14793  # Extract the first word of "$ac_prog", so it can be a program name with args.
14794set dummy $ac_prog; ac_word=$2
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14796$as_echo_n "checking for $ac_word... " >&6; }
14797if ${ac_cv_path_DF+:} false; then :
14798  $as_echo_n "(cached) " >&6
14799else
14800  case $DF in
14801  [\\/]* | ?:[\\/]*)
14802  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14803  ;;
14804  *)
14805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14806for as_dir in $PATH
14807do
14808  IFS=$as_save_IFS
14809  test -z "$as_dir" && as_dir=.
14810    for ac_exec_ext in '' $ac_executable_extensions; do
14811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14812    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14814    break 2
14815  fi
14816done
14817  done
14818IFS=$as_save_IFS
14819
14820  ;;
14821esac
14822fi
14823DF=$ac_cv_path_DF
14824if test -n "$DF"; then
14825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14826$as_echo "$DF" >&6; }
14827else
14828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14829$as_echo "no" >&6; }
14830fi
14831
14832
14833  test -n "$DF" && break
14834done
14835
14836  else
14837    # The variable is set, but is it from the command line or the environment?
14838
14839    # Try to remove the string !DF! from our list.
14840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14842      # If it failed, the variable was not from the command line. Ignore it,
14843      # but warn the user (except for BASH, which is always set by the calling BASH).
14844      if test "xDF" != xBASH; then
14845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14846$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14847      fi
14848      # Try to locate tool using the code snippet
14849      for ac_prog in df
14850do
14851  # Extract the first word of "$ac_prog", so it can be a program name with args.
14852set dummy $ac_prog; ac_word=$2
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14854$as_echo_n "checking for $ac_word... " >&6; }
14855if ${ac_cv_path_DF+:} false; then :
14856  $as_echo_n "(cached) " >&6
14857else
14858  case $DF in
14859  [\\/]* | ?:[\\/]*)
14860  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14861  ;;
14862  *)
14863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14864for as_dir in $PATH
14865do
14866  IFS=$as_save_IFS
14867  test -z "$as_dir" && as_dir=.
14868    for ac_exec_ext in '' $ac_executable_extensions; do
14869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14870    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14872    break 2
14873  fi
14874done
14875  done
14876IFS=$as_save_IFS
14877
14878  ;;
14879esac
14880fi
14881DF=$ac_cv_path_DF
14882if test -n "$DF"; then
14883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14884$as_echo "$DF" >&6; }
14885else
14886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14887$as_echo "no" >&6; }
14888fi
14889
14890
14891  test -n "$DF" && break
14892done
14893
14894    else
14895      # If it succeeded, then it was overridden by the user. We will use it
14896      # for the tool.
14897
14898      # First remove it from the list of overridden variables, so we can test
14899      # for unknown variables in the end.
14900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14901
14902      # Check if we try to supply an empty value
14903      if test "x$DF" = x; then
14904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14905$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14907$as_echo_n "checking for DF... " >&6; }
14908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14909$as_echo "disabled" >&6; }
14910      else
14911        # Check if the provided tool contains a complete path.
14912        tool_specified="$DF"
14913        tool_basename="${tool_specified##*/}"
14914        if test "x$tool_basename" = "x$tool_specified"; then
14915          # A command without a complete path is provided, search $PATH.
14916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14917$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14918          # Extract the first word of "$tool_basename", so it can be a program name with args.
14919set dummy $tool_basename; ac_word=$2
14920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14921$as_echo_n "checking for $ac_word... " >&6; }
14922if ${ac_cv_path_DF+:} false; then :
14923  $as_echo_n "(cached) " >&6
14924else
14925  case $DF in
14926  [\\/]* | ?:[\\/]*)
14927  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14928  ;;
14929  *)
14930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14931for as_dir in $PATH
14932do
14933  IFS=$as_save_IFS
14934  test -z "$as_dir" && as_dir=.
14935    for ac_exec_ext in '' $ac_executable_extensions; do
14936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14937    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14939    break 2
14940  fi
14941done
14942  done
14943IFS=$as_save_IFS
14944
14945  ;;
14946esac
14947fi
14948DF=$ac_cv_path_DF
14949if test -n "$DF"; then
14950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14951$as_echo "$DF" >&6; }
14952else
14953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14954$as_echo "no" >&6; }
14955fi
14956
14957
14958          if test "x$DF" = x; then
14959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14960          fi
14961        else
14962          # Otherwise we believe it is a complete path. Use it as it is.
14963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14964$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14966$as_echo_n "checking for DF... " >&6; }
14967          if test ! -x "$tool_specified"; then
14968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14969$as_echo "not found" >&6; }
14970            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14971          fi
14972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14973$as_echo "$tool_specified" >&6; }
14974        fi
14975      fi
14976    fi
14977
14978  fi
14979
14980
14981
14982
14983  # Publish this variable in the help.
14984
14985
14986  if [ -z "${CPIO+x}" ]; then
14987    # The variable is not set by user, try to locate tool using the code snippet
14988    for ac_prog in cpio bsdcpio
14989do
14990  # Extract the first word of "$ac_prog", so it can be a program name with args.
14991set dummy $ac_prog; ac_word=$2
14992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14993$as_echo_n "checking for $ac_word... " >&6; }
14994if ${ac_cv_path_CPIO+:} false; then :
14995  $as_echo_n "(cached) " >&6
14996else
14997  case $CPIO in
14998  [\\/]* | ?:[\\/]*)
14999  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15000  ;;
15001  *)
15002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15003for as_dir in $PATH
15004do
15005  IFS=$as_save_IFS
15006  test -z "$as_dir" && as_dir=.
15007    for ac_exec_ext in '' $ac_executable_extensions; do
15008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15009    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15011    break 2
15012  fi
15013done
15014  done
15015IFS=$as_save_IFS
15016
15017  ;;
15018esac
15019fi
15020CPIO=$ac_cv_path_CPIO
15021if test -n "$CPIO"; then
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15023$as_echo "$CPIO" >&6; }
15024else
15025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15026$as_echo "no" >&6; }
15027fi
15028
15029
15030  test -n "$CPIO" && break
15031done
15032
15033  else
15034    # The variable is set, but is it from the command line or the environment?
15035
15036    # Try to remove the string !CPIO! from our list.
15037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15039      # If it failed, the variable was not from the command line. Ignore it,
15040      # but warn the user (except for BASH, which is always set by the calling BASH).
15041      if test "xCPIO" != xBASH; then
15042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15043$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15044      fi
15045      # Try to locate tool using the code snippet
15046      for ac_prog in cpio bsdcpio
15047do
15048  # Extract the first word of "$ac_prog", so it can be a program name with args.
15049set dummy $ac_prog; ac_word=$2
15050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15051$as_echo_n "checking for $ac_word... " >&6; }
15052if ${ac_cv_path_CPIO+:} false; then :
15053  $as_echo_n "(cached) " >&6
15054else
15055  case $CPIO in
15056  [\\/]* | ?:[\\/]*)
15057  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15058  ;;
15059  *)
15060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15061for as_dir in $PATH
15062do
15063  IFS=$as_save_IFS
15064  test -z "$as_dir" && as_dir=.
15065    for ac_exec_ext in '' $ac_executable_extensions; do
15066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15067    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15069    break 2
15070  fi
15071done
15072  done
15073IFS=$as_save_IFS
15074
15075  ;;
15076esac
15077fi
15078CPIO=$ac_cv_path_CPIO
15079if test -n "$CPIO"; then
15080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15081$as_echo "$CPIO" >&6; }
15082else
15083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15084$as_echo "no" >&6; }
15085fi
15086
15087
15088  test -n "$CPIO" && break
15089done
15090
15091    else
15092      # If it succeeded, then it was overridden by the user. We will use it
15093      # for the tool.
15094
15095      # First remove it from the list of overridden variables, so we can test
15096      # for unknown variables in the end.
15097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15098
15099      # Check if we try to supply an empty value
15100      if test "x$CPIO" = x; then
15101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15102$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15104$as_echo_n "checking for CPIO... " >&6; }
15105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15106$as_echo "disabled" >&6; }
15107      else
15108        # Check if the provided tool contains a complete path.
15109        tool_specified="$CPIO"
15110        tool_basename="${tool_specified##*/}"
15111        if test "x$tool_basename" = "x$tool_specified"; then
15112          # A command without a complete path is provided, search $PATH.
15113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15114$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15115          # Extract the first word of "$tool_basename", so it can be a program name with args.
15116set dummy $tool_basename; ac_word=$2
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15118$as_echo_n "checking for $ac_word... " >&6; }
15119if ${ac_cv_path_CPIO+:} false; then :
15120  $as_echo_n "(cached) " >&6
15121else
15122  case $CPIO in
15123  [\\/]* | ?:[\\/]*)
15124  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15125  ;;
15126  *)
15127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15128for as_dir in $PATH
15129do
15130  IFS=$as_save_IFS
15131  test -z "$as_dir" && as_dir=.
15132    for ac_exec_ext in '' $ac_executable_extensions; do
15133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15134    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15136    break 2
15137  fi
15138done
15139  done
15140IFS=$as_save_IFS
15141
15142  ;;
15143esac
15144fi
15145CPIO=$ac_cv_path_CPIO
15146if test -n "$CPIO"; then
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15148$as_echo "$CPIO" >&6; }
15149else
15150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15151$as_echo "no" >&6; }
15152fi
15153
15154
15155          if test "x$CPIO" = x; then
15156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15157          fi
15158        else
15159          # Otherwise we believe it is a complete path. Use it as it is.
15160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15161$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15163$as_echo_n "checking for CPIO... " >&6; }
15164          if test ! -x "$tool_specified"; then
15165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15166$as_echo "not found" >&6; }
15167            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15168          fi
15169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15170$as_echo "$tool_specified" >&6; }
15171        fi
15172      fi
15173    fi
15174
15175  fi
15176
15177
15178
15179
15180  # Publish this variable in the help.
15181
15182
15183  if [ -z "${NICE+x}" ]; then
15184    # The variable is not set by user, try to locate tool using the code snippet
15185    for ac_prog in nice
15186do
15187  # Extract the first word of "$ac_prog", so it can be a program name with args.
15188set dummy $ac_prog; ac_word=$2
15189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15190$as_echo_n "checking for $ac_word... " >&6; }
15191if ${ac_cv_path_NICE+:} false; then :
15192  $as_echo_n "(cached) " >&6
15193else
15194  case $NICE in
15195  [\\/]* | ?:[\\/]*)
15196  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15197  ;;
15198  *)
15199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15200for as_dir in $PATH
15201do
15202  IFS=$as_save_IFS
15203  test -z "$as_dir" && as_dir=.
15204    for ac_exec_ext in '' $ac_executable_extensions; do
15205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15206    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15208    break 2
15209  fi
15210done
15211  done
15212IFS=$as_save_IFS
15213
15214  ;;
15215esac
15216fi
15217NICE=$ac_cv_path_NICE
15218if test -n "$NICE"; then
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15220$as_echo "$NICE" >&6; }
15221else
15222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15223$as_echo "no" >&6; }
15224fi
15225
15226
15227  test -n "$NICE" && break
15228done
15229
15230  else
15231    # The variable is set, but is it from the command line or the environment?
15232
15233    # Try to remove the string !NICE! from our list.
15234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15236      # If it failed, the variable was not from the command line. Ignore it,
15237      # but warn the user (except for BASH, which is always set by the calling BASH).
15238      if test "xNICE" != xBASH; then
15239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15240$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15241      fi
15242      # Try to locate tool using the code snippet
15243      for ac_prog in nice
15244do
15245  # Extract the first word of "$ac_prog", so it can be a program name with args.
15246set dummy $ac_prog; ac_word=$2
15247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15248$as_echo_n "checking for $ac_word... " >&6; }
15249if ${ac_cv_path_NICE+:} false; then :
15250  $as_echo_n "(cached) " >&6
15251else
15252  case $NICE in
15253  [\\/]* | ?:[\\/]*)
15254  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15255  ;;
15256  *)
15257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15258for as_dir in $PATH
15259do
15260  IFS=$as_save_IFS
15261  test -z "$as_dir" && as_dir=.
15262    for ac_exec_ext in '' $ac_executable_extensions; do
15263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15264    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15266    break 2
15267  fi
15268done
15269  done
15270IFS=$as_save_IFS
15271
15272  ;;
15273esac
15274fi
15275NICE=$ac_cv_path_NICE
15276if test -n "$NICE"; then
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15278$as_echo "$NICE" >&6; }
15279else
15280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15281$as_echo "no" >&6; }
15282fi
15283
15284
15285  test -n "$NICE" && break
15286done
15287
15288    else
15289      # If it succeeded, then it was overridden by the user. We will use it
15290      # for the tool.
15291
15292      # First remove it from the list of overridden variables, so we can test
15293      # for unknown variables in the end.
15294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15295
15296      # Check if we try to supply an empty value
15297      if test "x$NICE" = x; then
15298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15299$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15301$as_echo_n "checking for NICE... " >&6; }
15302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15303$as_echo "disabled" >&6; }
15304      else
15305        # Check if the provided tool contains a complete path.
15306        tool_specified="$NICE"
15307        tool_basename="${tool_specified##*/}"
15308        if test "x$tool_basename" = "x$tool_specified"; then
15309          # A command without a complete path is provided, search $PATH.
15310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15311$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15312          # Extract the first word of "$tool_basename", so it can be a program name with args.
15313set dummy $tool_basename; ac_word=$2
15314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15315$as_echo_n "checking for $ac_word... " >&6; }
15316if ${ac_cv_path_NICE+:} false; then :
15317  $as_echo_n "(cached) " >&6
15318else
15319  case $NICE in
15320  [\\/]* | ?:[\\/]*)
15321  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15322  ;;
15323  *)
15324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15325for as_dir in $PATH
15326do
15327  IFS=$as_save_IFS
15328  test -z "$as_dir" && as_dir=.
15329    for ac_exec_ext in '' $ac_executable_extensions; do
15330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15331    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15333    break 2
15334  fi
15335done
15336  done
15337IFS=$as_save_IFS
15338
15339  ;;
15340esac
15341fi
15342NICE=$ac_cv_path_NICE
15343if test -n "$NICE"; then
15344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15345$as_echo "$NICE" >&6; }
15346else
15347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15348$as_echo "no" >&6; }
15349fi
15350
15351
15352          if test "x$NICE" = x; then
15353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15354          fi
15355        else
15356          # Otherwise we believe it is a complete path. Use it as it is.
15357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15358$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15360$as_echo_n "checking for NICE... " >&6; }
15361          if test ! -x "$tool_specified"; then
15362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15363$as_echo "not found" >&6; }
15364            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15365          fi
15366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15367$as_echo "$tool_specified" >&6; }
15368        fi
15369      fi
15370    fi
15371
15372  fi
15373
15374
15375
15376
15377  # Publish this variable in the help.
15378
15379
15380  if [ -z "${PANDOC+x}" ]; then
15381    # The variable is not set by user, try to locate tool using the code snippet
15382    for ac_prog in pandoc
15383do
15384  # Extract the first word of "$ac_prog", so it can be a program name with args.
15385set dummy $ac_prog; ac_word=$2
15386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15387$as_echo_n "checking for $ac_word... " >&6; }
15388if ${ac_cv_path_PANDOC+:} false; then :
15389  $as_echo_n "(cached) " >&6
15390else
15391  case $PANDOC in
15392  [\\/]* | ?:[\\/]*)
15393  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15394  ;;
15395  *)
15396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15397for as_dir in $PATH
15398do
15399  IFS=$as_save_IFS
15400  test -z "$as_dir" && as_dir=.
15401    for ac_exec_ext in '' $ac_executable_extensions; do
15402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15403    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15405    break 2
15406  fi
15407done
15408  done
15409IFS=$as_save_IFS
15410
15411  ;;
15412esac
15413fi
15414PANDOC=$ac_cv_path_PANDOC
15415if test -n "$PANDOC"; then
15416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15417$as_echo "$PANDOC" >&6; }
15418else
15419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15420$as_echo "no" >&6; }
15421fi
15422
15423
15424  test -n "$PANDOC" && break
15425done
15426
15427  else
15428    # The variable is set, but is it from the command line or the environment?
15429
15430    # Try to remove the string !PANDOC! from our list.
15431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15432    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15433      # If it failed, the variable was not from the command line. Ignore it,
15434      # but warn the user (except for BASH, which is always set by the calling BASH).
15435      if test "xPANDOC" != xBASH; then
15436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15437$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15438      fi
15439      # Try to locate tool using the code snippet
15440      for ac_prog in pandoc
15441do
15442  # Extract the first word of "$ac_prog", so it can be a program name with args.
15443set dummy $ac_prog; ac_word=$2
15444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15445$as_echo_n "checking for $ac_word... " >&6; }
15446if ${ac_cv_path_PANDOC+:} false; then :
15447  $as_echo_n "(cached) " >&6
15448else
15449  case $PANDOC in
15450  [\\/]* | ?:[\\/]*)
15451  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15452  ;;
15453  *)
15454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15455for as_dir in $PATH
15456do
15457  IFS=$as_save_IFS
15458  test -z "$as_dir" && as_dir=.
15459    for ac_exec_ext in '' $ac_executable_extensions; do
15460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15461    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15463    break 2
15464  fi
15465done
15466  done
15467IFS=$as_save_IFS
15468
15469  ;;
15470esac
15471fi
15472PANDOC=$ac_cv_path_PANDOC
15473if test -n "$PANDOC"; then
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15475$as_echo "$PANDOC" >&6; }
15476else
15477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15478$as_echo "no" >&6; }
15479fi
15480
15481
15482  test -n "$PANDOC" && break
15483done
15484
15485    else
15486      # If it succeeded, then it was overridden by the user. We will use it
15487      # for the tool.
15488
15489      # First remove it from the list of overridden variables, so we can test
15490      # for unknown variables in the end.
15491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15492
15493      # Check if we try to supply an empty value
15494      if test "x$PANDOC" = x; then
15495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15496$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15498$as_echo_n "checking for PANDOC... " >&6; }
15499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15500$as_echo "disabled" >&6; }
15501      else
15502        # Check if the provided tool contains a complete path.
15503        tool_specified="$PANDOC"
15504        tool_basename="${tool_specified##*/}"
15505        if test "x$tool_basename" = "x$tool_specified"; then
15506          # A command without a complete path is provided, search $PATH.
15507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15508$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15509          # Extract the first word of "$tool_basename", so it can be a program name with args.
15510set dummy $tool_basename; ac_word=$2
15511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15512$as_echo_n "checking for $ac_word... " >&6; }
15513if ${ac_cv_path_PANDOC+:} false; then :
15514  $as_echo_n "(cached) " >&6
15515else
15516  case $PANDOC in
15517  [\\/]* | ?:[\\/]*)
15518  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15519  ;;
15520  *)
15521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15522for as_dir in $PATH
15523do
15524  IFS=$as_save_IFS
15525  test -z "$as_dir" && as_dir=.
15526    for ac_exec_ext in '' $ac_executable_extensions; do
15527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15528    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15530    break 2
15531  fi
15532done
15533  done
15534IFS=$as_save_IFS
15535
15536  ;;
15537esac
15538fi
15539PANDOC=$ac_cv_path_PANDOC
15540if test -n "$PANDOC"; then
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15542$as_echo "$PANDOC" >&6; }
15543else
15544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15545$as_echo "no" >&6; }
15546fi
15547
15548
15549          if test "x$PANDOC" = x; then
15550            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15551          fi
15552        else
15553          # Otherwise we believe it is a complete path. Use it as it is.
15554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15555$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15557$as_echo_n "checking for PANDOC... " >&6; }
15558          if test ! -x "$tool_specified"; then
15559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15560$as_echo "not found" >&6; }
15561            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15562          fi
15563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15564$as_echo "$tool_specified" >&6; }
15565        fi
15566      fi
15567    fi
15568
15569  fi
15570
15571
15572
15573
15574# Now we can determine OpenJDK build and target platforms. This is required to
15575# have early on.
15576# Make sure we can run config.sub.
15577$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15578  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15579
15580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15581$as_echo_n "checking build system type... " >&6; }
15582if ${ac_cv_build+:} false; then :
15583  $as_echo_n "(cached) " >&6
15584else
15585  ac_build_alias=$build_alias
15586test "x$ac_build_alias" = x &&
15587  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15588test "x$ac_build_alias" = x &&
15589  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15590ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15591  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15592
15593fi
15594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15595$as_echo "$ac_cv_build" >&6; }
15596case $ac_cv_build in
15597*-*-*) ;;
15598*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15599esac
15600build=$ac_cv_build
15601ac_save_IFS=$IFS; IFS='-'
15602set x $ac_cv_build
15603shift
15604build_cpu=$1
15605build_vendor=$2
15606shift; shift
15607# Remember, the first character of IFS is used to create $*,
15608# except with old shells:
15609build_os=$*
15610IFS=$ac_save_IFS
15611case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15612
15613
15614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15615$as_echo_n "checking host system type... " >&6; }
15616if ${ac_cv_host+:} false; then :
15617  $as_echo_n "(cached) " >&6
15618else
15619  if test "x$host_alias" = x; then
15620  ac_cv_host=$ac_cv_build
15621else
15622  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15623    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15624fi
15625
15626fi
15627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15628$as_echo "$ac_cv_host" >&6; }
15629case $ac_cv_host in
15630*-*-*) ;;
15631*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15632esac
15633host=$ac_cv_host
15634ac_save_IFS=$IFS; IFS='-'
15635set x $ac_cv_host
15636shift
15637host_cpu=$1
15638host_vendor=$2
15639shift; shift
15640# Remember, the first character of IFS is used to create $*,
15641# except with old shells:
15642host_os=$*
15643IFS=$ac_save_IFS
15644case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15645
15646
15647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15648$as_echo_n "checking target system type... " >&6; }
15649if ${ac_cv_target+:} false; then :
15650  $as_echo_n "(cached) " >&6
15651else
15652  if test "x$target_alias" = x; then
15653  ac_cv_target=$ac_cv_host
15654else
15655  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15656    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15657fi
15658
15659fi
15660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15661$as_echo "$ac_cv_target" >&6; }
15662case $ac_cv_target in
15663*-*-*) ;;
15664*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15665esac
15666target=$ac_cv_target
15667ac_save_IFS=$IFS; IFS='-'
15668set x $ac_cv_target
15669shift
15670target_cpu=$1
15671target_vendor=$2
15672shift; shift
15673# Remember, the first character of IFS is used to create $*,
15674# except with old shells:
15675target_os=$*
15676IFS=$ac_save_IFS
15677case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15678
15679
15680# The aliases save the names the user supplied, while $host etc.
15681# will get canonicalized.
15682test -n "$target_alias" &&
15683  test "$program_prefix$program_suffix$program_transform_name" = \
15684    NONENONEs,x,x, &&
15685  program_prefix=${target_alias}-
15686
15687  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15688  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15689  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15690  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15691  # to use the configure naming style.
15692
15693
15694
15695
15696
15697  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15698  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15699  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15700  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15701  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15702  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15703
15704
15705
15706  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15707
15708  case "$build_os" in
15709    *linux*)
15710      VAR_OS=linux
15711      VAR_OS_TYPE=unix
15712      ;;
15713    *solaris*)
15714      VAR_OS=solaris
15715      VAR_OS_TYPE=unix
15716      ;;
15717    *darwin*)
15718      VAR_OS=macosx
15719      VAR_OS_TYPE=unix
15720      ;;
15721    *bsd*)
15722      VAR_OS=bsd
15723      VAR_OS_TYPE=unix
15724      ;;
15725    *cygwin*)
15726      VAR_OS=windows
15727      VAR_OS_ENV=windows.cygwin
15728      ;;
15729    *mingw*)
15730      VAR_OS=windows
15731      VAR_OS_ENV=windows.msys
15732      ;;
15733    *aix*)
15734      VAR_OS=aix
15735      VAR_OS_TYPE=unix
15736      ;;
15737    *)
15738      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15739      ;;
15740  esac
15741
15742
15743  # First argument is the cpu name from the trip/quad
15744  case "$build_cpu" in
15745    x86_64)
15746      VAR_CPU=x86_64
15747      VAR_CPU_ARCH=x86
15748      VAR_CPU_BITS=64
15749      VAR_CPU_ENDIAN=little
15750      ;;
15751    i?86)
15752      VAR_CPU=x86
15753      VAR_CPU_ARCH=x86
15754      VAR_CPU_BITS=32
15755      VAR_CPU_ENDIAN=little
15756      ;;
15757    arm*)
15758      VAR_CPU=arm
15759      VAR_CPU_ARCH=arm
15760      VAR_CPU_BITS=32
15761      VAR_CPU_ENDIAN=little
15762      ;;
15763    aarch64)
15764      VAR_CPU=aarch64
15765      VAR_CPU_ARCH=aarch64
15766      VAR_CPU_BITS=64
15767      VAR_CPU_ENDIAN=little
15768      ;;
15769    powerpc)
15770      VAR_CPU=ppc
15771      VAR_CPU_ARCH=ppc
15772      VAR_CPU_BITS=32
15773      VAR_CPU_ENDIAN=big
15774      ;;
15775    powerpc64)
15776      VAR_CPU=ppc64
15777      VAR_CPU_ARCH=ppc
15778      VAR_CPU_BITS=64
15779      VAR_CPU_ENDIAN=big
15780      ;;
15781    powerpc64le)
15782      VAR_CPU=ppc64le
15783      VAR_CPU_ARCH=ppc
15784      VAR_CPU_BITS=64
15785      VAR_CPU_ENDIAN=little
15786      ;;
15787    s390)
15788      VAR_CPU=s390
15789      VAR_CPU_ARCH=s390
15790      VAR_CPU_BITS=32
15791      VAR_CPU_ENDIAN=big
15792      ;;
15793    s390x)
15794      VAR_CPU=s390x
15795      VAR_CPU_ARCH=s390
15796      VAR_CPU_BITS=64
15797      VAR_CPU_ENDIAN=big
15798      ;;
15799    sparc)
15800      VAR_CPU=sparc
15801      VAR_CPU_ARCH=sparc
15802      VAR_CPU_BITS=32
15803      VAR_CPU_ENDIAN=big
15804      ;;
15805    sparcv9|sparc64)
15806      VAR_CPU=sparcv9
15807      VAR_CPU_ARCH=sparc
15808      VAR_CPU_BITS=64
15809      VAR_CPU_ENDIAN=big
15810      ;;
15811    *)
15812      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15813      ;;
15814  esac
15815
15816  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15817  OPENJDK_BUILD_OS="$VAR_OS"
15818  if test "x$VAR_OS_TYPE" != x; then
15819    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15820  else
15821    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15822  fi
15823  if test "x$VAR_OS_ENV" != x; then
15824    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15825  else
15826    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15827  fi
15828  OPENJDK_BUILD_CPU="$VAR_CPU"
15829  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15830  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15831  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15832
15833
15834
15835
15836
15837
15838
15839
15840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15841$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15843$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15844
15845  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15846
15847  case "$host_os" in
15848    *linux*)
15849      VAR_OS=linux
15850      VAR_OS_TYPE=unix
15851      ;;
15852    *solaris*)
15853      VAR_OS=solaris
15854      VAR_OS_TYPE=unix
15855      ;;
15856    *darwin*)
15857      VAR_OS=macosx
15858      VAR_OS_TYPE=unix
15859      ;;
15860    *bsd*)
15861      VAR_OS=bsd
15862      VAR_OS_TYPE=unix
15863      ;;
15864    *cygwin*)
15865      VAR_OS=windows
15866      VAR_OS_ENV=windows.cygwin
15867      ;;
15868    *mingw*)
15869      VAR_OS=windows
15870      VAR_OS_ENV=windows.msys
15871      ;;
15872    *aix*)
15873      VAR_OS=aix
15874      VAR_OS_TYPE=unix
15875      ;;
15876    *)
15877      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15878      ;;
15879  esac
15880
15881
15882  # First argument is the cpu name from the trip/quad
15883  case "$host_cpu" in
15884    x86_64)
15885      VAR_CPU=x86_64
15886      VAR_CPU_ARCH=x86
15887      VAR_CPU_BITS=64
15888      VAR_CPU_ENDIAN=little
15889      ;;
15890    i?86)
15891      VAR_CPU=x86
15892      VAR_CPU_ARCH=x86
15893      VAR_CPU_BITS=32
15894      VAR_CPU_ENDIAN=little
15895      ;;
15896    arm*)
15897      VAR_CPU=arm
15898      VAR_CPU_ARCH=arm
15899      VAR_CPU_BITS=32
15900      VAR_CPU_ENDIAN=little
15901      ;;
15902    aarch64)
15903      VAR_CPU=aarch64
15904      VAR_CPU_ARCH=aarch64
15905      VAR_CPU_BITS=64
15906      VAR_CPU_ENDIAN=little
15907      ;;
15908    powerpc)
15909      VAR_CPU=ppc
15910      VAR_CPU_ARCH=ppc
15911      VAR_CPU_BITS=32
15912      VAR_CPU_ENDIAN=big
15913      ;;
15914    powerpc64)
15915      VAR_CPU=ppc64
15916      VAR_CPU_ARCH=ppc
15917      VAR_CPU_BITS=64
15918      VAR_CPU_ENDIAN=big
15919      ;;
15920    powerpc64le)
15921      VAR_CPU=ppc64le
15922      VAR_CPU_ARCH=ppc
15923      VAR_CPU_BITS=64
15924      VAR_CPU_ENDIAN=little
15925      ;;
15926    s390)
15927      VAR_CPU=s390
15928      VAR_CPU_ARCH=s390
15929      VAR_CPU_BITS=32
15930      VAR_CPU_ENDIAN=big
15931      ;;
15932    s390x)
15933      VAR_CPU=s390x
15934      VAR_CPU_ARCH=s390
15935      VAR_CPU_BITS=64
15936      VAR_CPU_ENDIAN=big
15937      ;;
15938    sparc)
15939      VAR_CPU=sparc
15940      VAR_CPU_ARCH=sparc
15941      VAR_CPU_BITS=32
15942      VAR_CPU_ENDIAN=big
15943      ;;
15944    sparcv9|sparc64)
15945      VAR_CPU=sparcv9
15946      VAR_CPU_ARCH=sparc
15947      VAR_CPU_BITS=64
15948      VAR_CPU_ENDIAN=big
15949      ;;
15950    *)
15951      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15952      ;;
15953  esac
15954
15955  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15956  OPENJDK_TARGET_OS="$VAR_OS"
15957  if test "x$VAR_OS_TYPE" != x; then
15958    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15959  else
15960    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15961  fi
15962  if test "x$VAR_OS_ENV" != x; then
15963    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15964  else
15965    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15966  fi
15967  OPENJDK_TARGET_CPU="$VAR_CPU"
15968  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15969  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15970  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15971
15972
15973
15974
15975
15976
15977
15978
15979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15980$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15982$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15983
15984
15985
15986# Check whether --with-target-bits was given.
15987if test "${with_target_bits+set}" = set; then :
15988  withval=$with_target_bits;
15989fi
15990
15991
15992  # We have three types of compiles:
15993  # native  == normal compilation, target system == build system
15994  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15995  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15996  #
15997  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15998    # We're doing a proper cross-compilation
15999    COMPILE_TYPE="cross"
16000  else
16001    COMPILE_TYPE="native"
16002  fi
16003
16004  if test "x$with_target_bits" != x; then
16005    if test "x$COMPILE_TYPE" = "xcross"; then
16006      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16007    fi
16008
16009    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16010      # A reduced build is requested
16011      COMPILE_TYPE="reduced"
16012      OPENJDK_TARGET_CPU_BITS=32
16013      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16014        OPENJDK_TARGET_CPU=x86
16015      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16016        OPENJDK_TARGET_CPU=sparc
16017      else
16018        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16019      fi
16020    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16021      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
16022    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16023      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16024$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16025    else
16026      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16027    fi
16028  fi
16029
16030
16031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16032$as_echo_n "checking compilation type... " >&6; }
16033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16034$as_echo "$COMPILE_TYPE" >&6; }
16035
16036
16037  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16038    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16039  else
16040    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16041  fi
16042
16043  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16044    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16045  else
16046    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16047  fi
16048
16049  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16050
16051
16052
16053  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16054    RELEASE_FILE_OS_NAME=SunOS
16055  fi
16056  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16057    RELEASE_FILE_OS_NAME=Linux
16058  fi
16059  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16060    RELEASE_FILE_OS_NAME=Windows
16061  fi
16062  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16063    RELEASE_FILE_OS_NAME="Darwin"
16064  fi
16065  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16066    RELEASE_FILE_OS_NAME="AIX"
16067  fi
16068  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16069
16070
16071
16072
16073
16074
16075  # Also store the legacy naming of the cpu.
16076  # Ie i586 and amd64 instead of x86 and x86_64
16077  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16078  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16079    OPENJDK_TARGET_CPU_LEGACY="i586"
16080  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16081    # On all platforms except MacOSX replace x86_64 with amd64.
16082    OPENJDK_TARGET_CPU_LEGACY="amd64"
16083  fi
16084
16085
16086  # And the second legacy naming of the cpu.
16087  # Ie i386 and amd64 instead of x86 and x86_64.
16088  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16089  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16090    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16091  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16092    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16093  fi
16094
16095
16096  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16097  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16098  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16099  OPENJDK_TARGET_CPU_ISADIR=""
16100  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16101    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16102      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16103    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16104      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16105    fi
16106  fi
16107
16108
16109  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16110  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16111  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16112    # On linux only, we replace x86 with i386.
16113    OPENJDK_TARGET_CPU_OSARCH="i386"
16114  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16115    # On all platforms except macosx, we replace x86_64 with amd64.
16116    OPENJDK_TARGET_CPU_OSARCH="amd64"
16117  fi
16118
16119
16120  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16121  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16122    OPENJDK_TARGET_CPU_JLI="i386"
16123  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16124    # On all platforms except macosx, we replace x86_64 with amd64.
16125    OPENJDK_TARGET_CPU_JLI="amd64"
16126  fi
16127
16128  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16129      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16130  else
16131      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16132  fi
16133
16134
16135  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16136  # Macosx is osx and x86_64 is x64
16137  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16138    OPENJDK_TARGET_OS_BUNDLE="osx"
16139  else
16140    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16141  fi
16142  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16143    OPENJDK_TARGET_CPU_BUNDLE="x64"
16144  else
16145    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16146  fi
16147  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16148
16149
16150  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16151    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16152    # unpack200.exe. This variable is used in
16153    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16154    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16155      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16156    fi
16157  fi
16158
16159  if test "x$COMPILE_TYPE" = "xcross"; then
16160    # FIXME: ... or should this include reduced builds..?
16161    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16162  else
16163    DEFINE_CROSS_COMPILE_ARCH=""
16164  fi
16165
16166
16167  # Convert openjdk platform names to hotspot names
16168
16169  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16170  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16171    HOTSPOT_TARGET_OS=bsd
16172  fi
16173
16174
16175  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16176  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16177    HOTSPOT_TARGET_OS_TYPE=posix
16178  fi
16179
16180
16181  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16182  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16183    HOTSPOT_TARGET_CPU=x86_32
16184  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16185    HOTSPOT_TARGET_CPU=sparc
16186  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16187    HOTSPOT_TARGET_CPU=ppc_64
16188  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16189    HOTSPOT_TARGET_CPU=ppc_64
16190  fi
16191
16192
16193  # This is identical with OPENJDK_*, but define anyway for consistency.
16194  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16195
16196
16197  # Setup HOTSPOT_TARGET_CPU_DEFINE
16198  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16199    HOTSPOT_TARGET_CPU_DEFINE=IA32
16200  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16201    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16202  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16203    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16204  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16205    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16206  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16207    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16208  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16209    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16210
16211  # The cpu defines below are for zero, we don't support them directly.
16212  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16213    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16214  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16215    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16216  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16217    HOTSPOT_TARGET_CPU_DEFINE=S390
16218  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16219    HOTSPOT_TARGET_CPU_DEFINE=S390
16220  elif test "x$OPENJDK_TARGET_CPU" != x; then
16221    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16222  fi
16223
16224
16225
16226
16227  # Also store the legacy naming of the cpu.
16228  # Ie i586 and amd64 instead of x86 and x86_64
16229  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16230  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16231    OPENJDK_BUILD_CPU_LEGACY="i586"
16232  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16233    # On all platforms except MacOSX replace x86_64 with amd64.
16234    OPENJDK_BUILD_CPU_LEGACY="amd64"
16235  fi
16236
16237
16238  # And the second legacy naming of the cpu.
16239  # Ie i386 and amd64 instead of x86 and x86_64.
16240  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16241  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16242    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16243  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16244    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16245  fi
16246
16247
16248  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16249  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16250  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16251  OPENJDK_BUILD_CPU_ISADIR=""
16252  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16253    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16254      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16255    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16256      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16257    fi
16258  fi
16259
16260
16261  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16262  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16263  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16264    # On linux only, we replace x86 with i386.
16265    OPENJDK_BUILD_CPU_OSARCH="i386"
16266  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16267    # On all platforms except macosx, we replace x86_64 with amd64.
16268    OPENJDK_BUILD_CPU_OSARCH="amd64"
16269  fi
16270
16271
16272  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16273  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16274    OPENJDK_BUILD_CPU_JLI="i386"
16275  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16276    # On all platforms except macosx, we replace x86_64 with amd64.
16277    OPENJDK_BUILD_CPU_JLI="amd64"
16278  fi
16279
16280  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16281      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16282  else
16283      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16284  fi
16285
16286
16287  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16288  # Macosx is osx and x86_64 is x64
16289  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16290    OPENJDK_BUILD_OS_BUNDLE="osx"
16291  else
16292    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16293  fi
16294  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16295    OPENJDK_BUILD_CPU_BUNDLE="x64"
16296  else
16297    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16298  fi
16299  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16300
16301
16302  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16303    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16304    # unpack200.exe. This variable is used in
16305    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16306    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16307      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16308    fi
16309  fi
16310
16311  if test "x$COMPILE_TYPE" = "xcross"; then
16312    # FIXME: ... or should this include reduced builds..?
16313    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16314  else
16315    DEFINE_CROSS_COMPILE_ARCH=""
16316  fi
16317
16318
16319  # Convert openjdk platform names to hotspot names
16320
16321  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16322  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16323    HOTSPOT_BUILD_OS=bsd
16324  fi
16325
16326
16327  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16328  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16329    HOTSPOT_BUILD_OS_TYPE=posix
16330  fi
16331
16332
16333  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16334  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16335    HOTSPOT_BUILD_CPU=x86_32
16336  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16337    HOTSPOT_BUILD_CPU=sparc
16338  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16339    HOTSPOT_BUILD_CPU=ppc_64
16340  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16341    HOTSPOT_BUILD_CPU=ppc_64
16342  fi
16343
16344
16345  # This is identical with OPENJDK_*, but define anyway for consistency.
16346  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16347
16348
16349  # Setup HOTSPOT_BUILD_CPU_DEFINE
16350  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16351    HOTSPOT_BUILD_CPU_DEFINE=IA32
16352  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16353    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16354  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16355    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16356  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16357    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16358  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16359    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16360  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16361    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16362
16363  # The cpu defines below are for zero, we don't support them directly.
16364  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16365    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16366  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16367    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16368  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16369    HOTSPOT_BUILD_CPU_DEFINE=S390
16370  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16371    HOTSPOT_BUILD_CPU_DEFINE=S390
16372  elif test "x$OPENJDK_BUILD_CPU" != x; then
16373    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16374  fi
16375
16376
16377
16378
16379
16380
16381# Continue setting up basic stuff. Most remaining code require fundamental tools.
16382
16383  # Save the current directory this script was started from
16384  CURDIR="$PWD"
16385
16386  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16387  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16388  # was not available at that time.
16389  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16390  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16391    ORIGINAL_PATH="$REWRITTEN_PATH"
16392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16393$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16394  fi
16395
16396  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16397    PATH_SEP=";"
16398
16399  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16400  if test $SRC_ROOT_LENGTH -gt 100; then
16401    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16402  fi
16403
16404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16406$as_echo_n "checking cygwin release... " >&6; }
16407    CYGWIN_VERSION=`$UNAME -r`
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16409$as_echo "$CYGWIN_VERSION" >&6; }
16410    WINDOWS_ENV_VENDOR='cygwin'
16411    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16412
16413    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16414    if test "x$CYGWIN_VERSION_OLD" != x; then
16415      { $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
16416$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;}
16417      as_fn_error $? "Cannot continue" "$LINENO" 5
16418    fi
16419    if test "x$CYGPATH" = x; then
16420      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16421    fi
16422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16423$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16424    # The cmd output ends with Windows line endings (CR/LF)
16425    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16426    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16427    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16429$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16430    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16431    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16432    if test "x$test_cygdrive_prefix" = x; then
16433      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16434    fi
16435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16437$as_echo_n "checking msys release... " >&6; }
16438    MSYS_VERSION=`$UNAME -r`
16439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16440$as_echo "$MSYS_VERSION" >&6; }
16441
16442    WINDOWS_ENV_VENDOR='msys'
16443    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16444
16445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16446$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16447    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16448    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16449
16450  windows_path="$MSYS_ROOT_PATH"
16451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16452    unix_path=`$CYGPATH -u "$windows_path"`
16453    MSYS_ROOT_PATH="$unix_path"
16454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16456    MSYS_ROOT_PATH="$unix_path"
16457  fi
16458
16459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16460$as_echo "$MSYS_ROOT_PATH" >&6; }
16461    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16462  else
16463    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16464  fi
16465
16466  # Test if windows or unix (cygwin/msys) find is first in path.
16467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16468$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16469  FIND_BINARY_OUTPUT=`find --version 2>&1`
16470  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16472$as_echo "unix style" >&6; }
16473  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16475$as_echo "Windows" >&6; }
16476    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16477$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16478    { $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
16479$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16480    as_fn_error $? "Cannot continue" "$LINENO" 5
16481  else
16482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16483$as_echo "unknown" >&6; }
16484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16485$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16486  fi
16487
16488  else
16489    PATH_SEP=":"
16490  fi
16491
16492
16493  # We get the top-level directory from the supporting wrappers.
16494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16495$as_echo_n "checking for top-level directory... " >&6; }
16496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16497$as_echo "$TOPDIR" >&6; }
16498
16499
16500  # Save the original version of TOPDIR for string comparisons
16501  ORIGINAL_TOPDIR="$TOPDIR"
16502
16503
16504  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16505
16506  # Only process if variable expands to non-empty
16507
16508  if test "x$CURDIR" != x; then
16509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16510
16511  # Input might be given as Windows format, start by converting to
16512  # unix format.
16513  path="$CURDIR"
16514  new_path=`$CYGPATH -u "$path"`
16515
16516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16519  # "foo.exe" is OK but "foo" is an error.
16520  #
16521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16522  # It is also a way to make sure we got the proper file name for the real test later on.
16523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16524  if test "x$test_shortpath" = x; then
16525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16526$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16527    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16528  fi
16529
16530  # Call helper function which possibly converts this using DOS-style short mode.
16531  # If so, the updated path is stored in $new_path.
16532
16533  input_path="$new_path"
16534  # Check if we need to convert this using DOS-style short mode. If the path
16535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16536  # take no chances and rewrite it.
16537  # Note: m4 eats our [], so we need to use [ and ] instead.
16538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16539  if test "x$has_forbidden_chars" != x; then
16540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16544      # Going to short mode and back again did indeed matter. Since short mode is
16545      # case insensitive, let's make it lowercase to improve readability.
16546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16547      # Now convert it back to Unix-style (cygpath)
16548      input_path=`$CYGPATH -u "$shortmode_path"`
16549      new_path="$input_path"
16550    fi
16551  fi
16552
16553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16554  if test "x$test_cygdrive_prefix" = x; then
16555    # As a simple fix, exclude /usr/bin since it's not a real path.
16556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16558      # a path prefixed by /cygdrive for fixpath to work.
16559      new_path="$CYGWIN_ROOT_PATH$input_path"
16560    fi
16561  fi
16562
16563
16564  if test "x$path" != "x$new_path"; then
16565    CURDIR="$new_path"
16566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16567$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16568  fi
16569
16570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16571
16572  path="$CURDIR"
16573  has_colon=`$ECHO $path | $GREP ^.:`
16574  new_path="$path"
16575  if test "x$has_colon" = x; then
16576    # Not in mixed or Windows style, start by that.
16577    new_path=`cmd //c echo $path`
16578  fi
16579
16580
16581  input_path="$new_path"
16582  # Check if we need to convert this using DOS-style short mode. If the path
16583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16584  # take no chances and rewrite it.
16585  # Note: m4 eats our [], so we need to use [ and ] instead.
16586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16587  if test "x$has_forbidden_chars" != x; then
16588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16590  fi
16591
16592
16593  windows_path="$new_path"
16594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16595    unix_path=`$CYGPATH -u "$windows_path"`
16596    new_path="$unix_path"
16597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16599    new_path="$unix_path"
16600  fi
16601
16602  if test "x$path" != "x$new_path"; then
16603    CURDIR="$new_path"
16604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16605$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16606  fi
16607
16608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16610
16611    else
16612      # We're on a unix platform. Hooray! :)
16613      path="$CURDIR"
16614      has_space=`$ECHO "$path" | $GREP " "`
16615      if test "x$has_space" != x; then
16616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16617$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16619      fi
16620
16621      # Use eval to expand a potential ~
16622      eval path="$path"
16623      if test ! -f "$path" && test ! -d "$path"; then
16624        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16625      fi
16626
16627      if test -d "$path"; then
16628        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16629      else
16630        dir="`$DIRNAME "$path"`"
16631        base="`$BASENAME "$path"`"
16632        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16633      fi
16634    fi
16635  fi
16636
16637
16638  # Only process if variable expands to non-empty
16639
16640  if test "x$TOPDIR" != x; then
16641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16642
16643  # Input might be given as Windows format, start by converting to
16644  # unix format.
16645  path="$TOPDIR"
16646  new_path=`$CYGPATH -u "$path"`
16647
16648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16651  # "foo.exe" is OK but "foo" is an error.
16652  #
16653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16654  # It is also a way to make sure we got the proper file name for the real test later on.
16655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16656  if test "x$test_shortpath" = x; then
16657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16658$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16659    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16660  fi
16661
16662  # Call helper function which possibly converts this using DOS-style short mode.
16663  # If so, the updated path is stored in $new_path.
16664
16665  input_path="$new_path"
16666  # Check if we need to convert this using DOS-style short mode. If the path
16667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16668  # take no chances and rewrite it.
16669  # Note: m4 eats our [], so we need to use [ and ] instead.
16670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16671  if test "x$has_forbidden_chars" != x; then
16672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16676      # Going to short mode and back again did indeed matter. Since short mode is
16677      # case insensitive, let's make it lowercase to improve readability.
16678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16679      # Now convert it back to Unix-style (cygpath)
16680      input_path=`$CYGPATH -u "$shortmode_path"`
16681      new_path="$input_path"
16682    fi
16683  fi
16684
16685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16686  if test "x$test_cygdrive_prefix" = x; then
16687    # As a simple fix, exclude /usr/bin since it's not a real path.
16688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16690      # a path prefixed by /cygdrive for fixpath to work.
16691      new_path="$CYGWIN_ROOT_PATH$input_path"
16692    fi
16693  fi
16694
16695
16696  if test "x$path" != "x$new_path"; then
16697    TOPDIR="$new_path"
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16699$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16700  fi
16701
16702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16703
16704  path="$TOPDIR"
16705  has_colon=`$ECHO $path | $GREP ^.:`
16706  new_path="$path"
16707  if test "x$has_colon" = x; then
16708    # Not in mixed or Windows style, start by that.
16709    new_path=`cmd //c echo $path`
16710  fi
16711
16712
16713  input_path="$new_path"
16714  # Check if we need to convert this using DOS-style short mode. If the path
16715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16716  # take no chances and rewrite it.
16717  # Note: m4 eats our [], so we need to use [ and ] instead.
16718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16719  if test "x$has_forbidden_chars" != x; then
16720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16722  fi
16723
16724
16725  windows_path="$new_path"
16726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16727    unix_path=`$CYGPATH -u "$windows_path"`
16728    new_path="$unix_path"
16729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16731    new_path="$unix_path"
16732  fi
16733
16734  if test "x$path" != "x$new_path"; then
16735    TOPDIR="$new_path"
16736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16737$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16738  fi
16739
16740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16742
16743    else
16744      # We're on a unix platform. Hooray! :)
16745      path="$TOPDIR"
16746      has_space=`$ECHO "$path" | $GREP " "`
16747      if test "x$has_space" != x; then
16748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16749$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16751      fi
16752
16753      # Use eval to expand a potential ~
16754      eval path="$path"
16755      if test ! -f "$path" && test ! -d "$path"; then
16756        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16757      fi
16758
16759      if test -d "$path"; then
16760        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16761      else
16762        dir="`$DIRNAME "$path"`"
16763        base="`$BASENAME "$path"`"
16764        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16765      fi
16766    fi
16767  fi
16768
16769  # SRC_ROOT is a traditional alias for TOPDIR.
16770  SRC_ROOT=$TOPDIR
16771
16772  # Calculate a canonical version of TOPDIR for string comparisons
16773  CANONICAL_TOPDIR=$TOPDIR
16774
16775  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16776    # Follow a chain of symbolic links. Use readlink
16777    # where it exists, else fall back to horribly
16778    # complicated shell code.
16779    if test "x$READLINK_TESTED" != yes; then
16780      # On MacOSX there is a readlink tool with a different
16781      # purpose than the GNU readlink tool. Check the found readlink.
16782      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16783      if test "x$ISGNU" = x; then
16784        # A readlink that we do not know how to use.
16785        # Are there other non-GNU readlinks out there?
16786        READLINK_TESTED=yes
16787        READLINK=
16788      fi
16789    fi
16790
16791    if test "x$READLINK" != x; then
16792      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16793    else
16794      # Save the current directory for restoring afterwards
16795      STARTDIR=$PWD
16796      COUNTER=0
16797      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16798      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16799      cd $sym_link_dir
16800      # Use -P flag to resolve symlinks in directories.
16801      cd `$THEPWDCMD -P`
16802      sym_link_dir=`$THEPWDCMD -P`
16803      # Resolve file symlinks
16804      while test $COUNTER -lt 20; do
16805        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16806        if test "x$ISLINK" == x; then
16807          # This is not a symbolic link! We are done!
16808          break
16809        fi
16810        # Again resolve directory symlinks since the target of the just found
16811        # link could be in a different directory
16812        cd `$DIRNAME $ISLINK`
16813        sym_link_dir=`$THEPWDCMD -P`
16814        sym_link_file=`$BASENAME $ISLINK`
16815        let COUNTER=COUNTER+1
16816      done
16817      cd $STARTDIR
16818      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16819    fi
16820  fi
16821
16822
16823
16824  # Locate the directory of this script.
16825  AUTOCONF_DIR=$TOPDIR/common/autoconf
16826
16827  # Setup username (for use in adhoc version strings etc)
16828  # Outer [ ] to quote m4.
16829   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16830
16831
16832
16833# Check if it's a pure open build or if custom sources are to be used.
16834
16835  # Check whether --enable-openjdk-only was given.
16836if test "${enable_openjdk_only+set}" = set; then :
16837  enableval=$enable_openjdk_only;
16838else
16839  enable_openjdk_only="no"
16840fi
16841
16842
16843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16844$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16846$as_echo "$enable_openjdk_only" >&6; }
16847  if test "x$enable_openjdk_only" = "xyes"; then
16848    SUPPRESS_CUSTOM_EXTENSIONS="true"
16849  elif test "x$enable_openjdk_only" = "xno"; then
16850    SUPPRESS_CUSTOM_EXTENSIONS="false"
16851  else
16852    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16853  fi
16854
16855  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16856  # the IncludeCustomExtension macro.
16857
16858
16859# Check whether --with-custom-make-dir was given.
16860if test "${with_custom_make_dir+set}" = set; then :
16861  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
16862$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16863fi
16864
16865
16866
16867
16868# These are needed to be able to create a configuration name (and thus the output directory)
16869
16870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16871$as_echo_n "checking which variant of the JDK to build... " >&6; }
16872
16873# Check whether --with-jdk-variant was given.
16874if test "${with_jdk_variant+set}" = set; then :
16875  withval=$with_jdk_variant;
16876fi
16877
16878
16879  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16880    JDK_VARIANT="normal"
16881  else
16882    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16883  fi
16884
16885
16886
16887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16888$as_echo "$JDK_VARIANT" >&6; }
16889
16890
16891  DEBUG_LEVEL="release"
16892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16893$as_echo_n "checking which debug level to use... " >&6; }
16894  # Check whether --enable-debug was given.
16895if test "${enable_debug+set}" = set; then :
16896  enableval=$enable_debug;
16897        ENABLE_DEBUG="${enableval}"
16898        DEBUG_LEVEL="fastdebug"
16899
16900else
16901  ENABLE_DEBUG="no"
16902fi
16903
16904
16905
16906# Check whether --with-debug-level was given.
16907if test "${with_debug_level+set}" = set; then :
16908  withval=$with_debug_level;
16909        DEBUG_LEVEL="${withval}"
16910        if test "x$ENABLE_DEBUG" = xyes; then
16911          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16912        fi
16913
16914fi
16915
16916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16917$as_echo "$DEBUG_LEVEL" >&6; }
16918
16919  if test "x$DEBUG_LEVEL" != xrelease && \
16920      test "x$DEBUG_LEVEL" != xoptimized && \
16921      test "x$DEBUG_LEVEL" != xfastdebug && \
16922      test "x$DEBUG_LEVEL" != xslowdebug; then
16923    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16924  fi
16925
16926  # Translate DEBUG_LEVEL to debug level used by Hotspot
16927  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16928  if test "x$DEBUG_LEVEL" = xrelease; then
16929    HOTSPOT_DEBUG_LEVEL="product"
16930  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16931    HOTSPOT_DEBUG_LEVEL="debug"
16932  fi
16933
16934  if test "x$DEBUG_LEVEL" = xoptimized; then
16935    # The debug level 'optimized' is a little special because it is currently only
16936    # applicable to the HotSpot build where it means to build a completely
16937    # optimized version of the VM without any debugging code (like for the
16938    # 'release' debug level which is called 'product' in the HotSpot build) but
16939    # with the exception that it can contain additional code which is otherwise
16940    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16941    # test new and/or experimental features which are not intended for customer
16942    # shipment. Because these new features need to be tested and benchmarked in
16943    # real world scenarios, we want to build the containing JDK at the 'release'
16944    # debug level.
16945    DEBUG_LEVEL="release"
16946  fi
16947
16948
16949
16950
16951
16952
16953# Check whether --with-jvm-variants was given.
16954if test "${with_jvm_variants+set}" = set; then :
16955  withval=$with_jvm_variants;
16956fi
16957
16958
16959
16960
16961# Check whether --with-cpu-port was given.
16962if test "${with_cpu_port+set}" = set; then :
16963  withval=$with_cpu_port;
16964fi
16965
16966
16967  if test "x$with_cpu_port" != x; then
16968    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16969      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16970    fi
16971    if test "x$with_cpu_port" != xarm64 && \
16972        test "x$with_cpu_port" != xaarch64; then
16973      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16974    fi
16975    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16976  fi
16977
16978
16979  if test "x$with_jvm_variants" = x; then
16980    with_jvm_variants="server"
16981  fi
16982  JVM_VARIANTS_OPT="$with_jvm_variants"
16983
16984  # Has the user listed more than one variant?
16985  # Additional [] needed to keep m4 from mangling shell constructs.
16986  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16987    BUILDING_MULTIPLE_JVM_VARIANTS=true
16988  else
16989    BUILDING_MULTIPLE_JVM_VARIANTS=false
16990  fi
16991  # Replace the commas with AND for use in the build directory name.
16992  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16993
16994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16995$as_echo_n "checking which variants of the JVM to build... " >&6; }
16996  # JVM_VARIANTS is a space-separated list.
16997  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16998  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17000$as_echo "$JVM_VARIANTS" >&6; }
17001
17002  # Check that the selected variants are valid
17003
17004  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17005  # Notice that the original variant failes on SLES 10 and 11
17006  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17007  STACK=${JVM_VARIANTS// /$'\n'}
17008  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17009  if test "x$INVALID_VARIANTS" != x; then
17010    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17011$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17012    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17013  fi
17014
17015  # All "special" variants share the same output directory ("server")
17016  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17017  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17018  STACK=${JVM_VARIANTS// /$'\n'}
17019  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17020  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17021    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17022  fi
17023
17024  # The "main" variant is the one used by other libs to link against during the
17025  # build.
17026  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17027    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17028    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17029      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17030        JVM_VARIANT_MAIN="$variant"
17031        break
17032      fi
17033    done
17034  else
17035    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17036  fi
17037
17038
17039
17040
17041
17042  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17043    # zero behaves as a platform and rewrites these values. This is really weird. :(
17044    # We are guaranteed that we do not build any other variants when building zero.
17045    HOTSPOT_TARGET_CPU=zero
17046    HOTSPOT_TARGET_CPU_ARCH=zero
17047  fi
17048
17049
17050# With basic setup done, call the custom early hook.
17051
17052
17053# Check if we have devkits, extra paths or sysroot set.
17054
17055
17056# Check whether --with-devkit was given.
17057if test "${with_devkit+set}" = set; then :
17058  withval=$with_devkit;
17059
17060  # Only process if variable expands to non-empty
17061
17062  if test "x$with_devkit" != x; then
17063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064
17065  # Input might be given as Windows format, start by converting to
17066  # unix format.
17067  path="$with_devkit"
17068  new_path=`$CYGPATH -u "$path"`
17069
17070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17073  # "foo.exe" is OK but "foo" is an error.
17074  #
17075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17076  # It is also a way to make sure we got the proper file name for the real test later on.
17077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17078  if test "x$test_shortpath" = x; then
17079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17080$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17081    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17082  fi
17083
17084  # Call helper function which possibly converts this using DOS-style short mode.
17085  # If so, the updated path is stored in $new_path.
17086
17087  input_path="$new_path"
17088  # Check if we need to convert this using DOS-style short mode. If the path
17089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17090  # take no chances and rewrite it.
17091  # Note: m4 eats our [], so we need to use [ and ] instead.
17092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17093  if test "x$has_forbidden_chars" != x; then
17094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17098      # Going to short mode and back again did indeed matter. Since short mode is
17099      # case insensitive, let's make it lowercase to improve readability.
17100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17101      # Now convert it back to Unix-style (cygpath)
17102      input_path=`$CYGPATH -u "$shortmode_path"`
17103      new_path="$input_path"
17104    fi
17105  fi
17106
17107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17108  if test "x$test_cygdrive_prefix" = x; then
17109    # As a simple fix, exclude /usr/bin since it's not a real path.
17110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17112      # a path prefixed by /cygdrive for fixpath to work.
17113      new_path="$CYGWIN_ROOT_PATH$input_path"
17114    fi
17115  fi
17116
17117
17118  if test "x$path" != "x$new_path"; then
17119    with_devkit="$new_path"
17120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17121$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17122  fi
17123
17124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17125
17126  path="$with_devkit"
17127  has_colon=`$ECHO $path | $GREP ^.:`
17128  new_path="$path"
17129  if test "x$has_colon" = x; then
17130    # Not in mixed or Windows style, start by that.
17131    new_path=`cmd //c echo $path`
17132  fi
17133
17134
17135  input_path="$new_path"
17136  # Check if we need to convert this using DOS-style short mode. If the path
17137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17138  # take no chances and rewrite it.
17139  # Note: m4 eats our [], so we need to use [ and ] instead.
17140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17141  if test "x$has_forbidden_chars" != x; then
17142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17144  fi
17145
17146
17147  windows_path="$new_path"
17148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17149    unix_path=`$CYGPATH -u "$windows_path"`
17150    new_path="$unix_path"
17151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17153    new_path="$unix_path"
17154  fi
17155
17156  if test "x$path" != "x$new_path"; then
17157    with_devkit="$new_path"
17158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17159$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17160  fi
17161
17162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17164
17165    else
17166      # We're on a unix platform. Hooray! :)
17167      path="$with_devkit"
17168      has_space=`$ECHO "$path" | $GREP " "`
17169      if test "x$has_space" != x; then
17170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17171$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17173      fi
17174
17175      # Use eval to expand a potential ~
17176      eval path="$path"
17177      if test ! -f "$path" && test ! -d "$path"; then
17178        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17179      fi
17180
17181      if test -d "$path"; then
17182        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17183      else
17184        dir="`$DIRNAME "$path"`"
17185        base="`$BASENAME "$path"`"
17186        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17187      fi
17188    fi
17189  fi
17190
17191        DEVKIT_ROOT="$with_devkit"
17192        # Check for a meta data info file in the root of the devkit
17193        if test -f "$DEVKIT_ROOT/devkit.info"; then
17194          . $DEVKIT_ROOT/devkit.info
17195          # This potentially sets the following:
17196          # A descriptive name of the devkit
17197
17198  if test "x$DEVKIT_NAME" = x; then
17199    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17200  fi
17201
17202          # Corresponds to --with-extra-path
17203
17204  if test "x$DEVKIT_EXTRA_PATH" = x; then
17205    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17206  fi
17207
17208          # Corresponds to --with-toolchain-path
17209
17210  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17211    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17212  fi
17213
17214          # Corresponds to --with-sysroot
17215
17216  if test "x$DEVKIT_SYSROOT" = x; then
17217    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17218  fi
17219
17220
17221          # Identifies the Visual Studio version in the devkit
17222
17223  if test "x$DEVKIT_VS_VERSION" = x; then
17224    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17225  fi
17226
17227          # The Visual Studio include environment variable
17228
17229  if test "x$DEVKIT_VS_INCLUDE" = x; then
17230    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17231  fi
17232
17233          # The Visual Studio lib environment variable
17234
17235  if test "x$DEVKIT_VS_LIB" = x; then
17236    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17237  fi
17238
17239          # Corresponds to --with-msvcr-dll
17240
17241  if test "x$DEVKIT_MSVCR_DLL" = x; then
17242    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17243  fi
17244
17245          # Corresponds to --with-msvcp-dll
17246
17247  if test "x$DEVKIT_MSVCP_DLL" = x; then
17248    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17249  fi
17250
17251        fi
17252
17253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17254$as_echo_n "checking for devkit... " >&6; }
17255        if test "x$DEVKIT_NAME" != x; then
17256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17257$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17258        else
17259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17260$as_echo "$DEVKIT_ROOT" >&6; }
17261        fi
17262
17263
17264  if test "x$DEVKIT_EXTRA_PATH" != x; then
17265    if test "x$EXTRA_PATH" = x; then
17266      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17267    else
17268      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17269    fi
17270  fi
17271
17272
17273        # Fallback default of just /bin if DEVKIT_PATH is not defined
17274        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17275          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17276        fi
17277
17278  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17279    if test "x$TOOLCHAIN_PATH" = x; then
17280      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17281    else
17282      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17283    fi
17284  fi
17285
17286
17287        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17288        # places for backwards compatiblity.
17289        if test "x$DEVKIT_SYSROOT" != x; then
17290          SYSROOT="$DEVKIT_SYSROOT"
17291        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17292          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17293        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17294          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17295        fi
17296
17297
17298fi
17299
17300
17301  # You can force the sysroot if the sysroot encoded into the compiler tools
17302  # is not correct.
17303
17304# Check whether --with-sys-root was given.
17305if test "${with_sys_root+set}" = set; then :
17306  withval=$with_sys_root; SYSROOT=$with_sys_root
17307
17308fi
17309
17310
17311
17312# Check whether --with-sysroot was given.
17313if test "${with_sysroot+set}" = set; then :
17314  withval=$with_sysroot; SYSROOT=$with_sysroot
17315
17316fi
17317
17318
17319
17320# Check whether --with-tools-dir was given.
17321if test "${with_tools_dir+set}" = set; then :
17322  withval=$with_tools_dir;
17323  if test "x$with_tools_dir" != x; then
17324    if test "x$TOOLCHAIN_PATH" = x; then
17325      TOOLCHAIN_PATH="$with_tools_dir"
17326    else
17327      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17328    fi
17329  fi
17330
17331
17332fi
17333
17334
17335
17336# Check whether --with-toolchain-path was given.
17337if test "${with_toolchain_path+set}" = set; then :
17338  withval=$with_toolchain_path;
17339  if test "x$with_toolchain_path" != x; then
17340    if test "x$TOOLCHAIN_PATH" = x; then
17341      TOOLCHAIN_PATH="$with_toolchain_path"
17342    else
17343      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17344    fi
17345  fi
17346
17347
17348fi
17349
17350
17351
17352# Check whether --with-extra-path was given.
17353if test "${with_extra_path+set}" = set; then :
17354  withval=$with_extra_path;
17355  if test "x$with_extra_path" != x; then
17356    if test "x$EXTRA_PATH" = x; then
17357      EXTRA_PATH="$with_extra_path"
17358    else
17359      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17360    fi
17361  fi
17362
17363
17364fi
17365
17366
17367  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17368    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17369    # If not, detect if Xcode is installed by running xcodebuild -version
17370    # if no Xcode installed, xcodebuild exits with 1
17371    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17372    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17373      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17374      # fall back on the stub binary in /usr/bin/xcodebuild
17375      # Extract the first word of "xcodebuild", so it can be a program name with args.
17376set dummy xcodebuild; ac_word=$2
17377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17378$as_echo_n "checking for $ac_word... " >&6; }
17379if ${ac_cv_path_XCODEBUILD+:} false; then :
17380  $as_echo_n "(cached) " >&6
17381else
17382  case $XCODEBUILD in
17383  [\\/]* | ?:[\\/]*)
17384  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17385  ;;
17386  *)
17387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17388for as_dir in $TOOLCHAIN_PATH
17389do
17390  IFS=$as_save_IFS
17391  test -z "$as_dir" && as_dir=.
17392    for ac_exec_ext in '' $ac_executable_extensions; do
17393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17394    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17396    break 2
17397  fi
17398done
17399  done
17400IFS=$as_save_IFS
17401
17402  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17403  ;;
17404esac
17405fi
17406XCODEBUILD=$ac_cv_path_XCODEBUILD
17407if test -n "$XCODEBUILD"; then
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17409$as_echo "$XCODEBUILD" >&6; }
17410else
17411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17412$as_echo "no" >&6; }
17413fi
17414
17415
17416    else
17417      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17418      # when only the command line tools are installed there are no SDKs, so headers
17419      # are copied into the system frameworks
17420      XCODEBUILD=
17421
17422    fi
17423
17424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17425$as_echo_n "checking for sdk name... " >&6; }
17426
17427# Check whether --with-sdk-name was given.
17428if test "${with_sdk_name+set}" = set; then :
17429  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17430
17431fi
17432
17433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17434$as_echo "$SDKNAME" >&6; }
17435
17436    # if toolchain path is specified then don't rely on system headers, they may not compile
17437    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17438    test -z "$TOOLCHAIN_PATH" && \
17439      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17440
17441    if test -z "$SYSROOT"; then
17442      if test -n "$XCODEBUILD"; then
17443        # if we don't have system headers, use default SDK name (last resort)
17444        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17445          SDKNAME=${SDKNAME:-macosx}
17446        fi
17447
17448        if test -n "$SDKNAME"; then
17449          # Call xcodebuild to determine SYSROOT
17450          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17451        fi
17452      else
17453        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17454          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
17455        fi
17456      fi
17457    else
17458      # warn user if --with-sdk-name was also set
17459      if test -n "$with_sdk_name"; then
17460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17461$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17462      fi
17463    fi
17464
17465    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17466      # If no system framework headers, then SYSROOT must be set, or we won't build
17467      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
17468    fi
17469
17470    # Perform a basic sanity test
17471    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17472      if test -z "$SYSROOT"; then
17473        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
17474      else
17475        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17476      fi
17477    fi
17478
17479    # set SDKROOT too, Xcode tools will pick it up
17480    SDKROOT="$SYSROOT"
17481
17482  fi
17483
17484  # Prepend the extra path to the global path
17485
17486  if test "x$EXTRA_PATH" != x; then
17487    if test "x$PATH" = x; then
17488      PATH="$EXTRA_PATH"
17489    else
17490      PATH="$EXTRA_PATH:$PATH"
17491    fi
17492  fi
17493
17494
17495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17496$as_echo_n "checking for sysroot... " >&6; }
17497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17498$as_echo "$SYSROOT" >&6; }
17499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17500$as_echo_n "checking for toolchain path... " >&6; }
17501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17502$as_echo "$TOOLCHAIN_PATH" >&6; }
17503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17504$as_echo_n "checking for extra path... " >&6; }
17505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17506$as_echo "$EXTRA_PATH" >&6; }
17507
17508
17509# To properly create a configuration name, we need to have the OpenJDK target
17510# and options (variants and debug level) parsed.
17511
17512
17513
17514# Check whether --with-conf-name was given.
17515if test "${with_conf_name+set}" = set; then :
17516  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17517fi
17518
17519
17520  # Test from where we are running configure, in or outside of src root.
17521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17522$as_echo_n "checking where to store configuration... " >&6; }
17523  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17524      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17525      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17526    # We are running configure from the src root.
17527    # Create a default ./build/target-variant-debuglevel output root.
17528    if test "x${CONF_NAME}" = x; then
17529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17530$as_echo "in default location" >&6; }
17531      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17532    else
17533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17534$as_echo "in build directory with custom name" >&6; }
17535    fi
17536    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17537    $MKDIR -p "$OUTPUT_ROOT"
17538    if test ! -d "$OUTPUT_ROOT"; then
17539      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17540    fi
17541  else
17542    # We are running configure from outside of the src dir.
17543    # Then use the current directory as output dir!
17544    # If configuration is situated in normal build directory, just use the build
17545    # directory name as configuration name, otherwise use the complete path.
17546    if test "x${CONF_NAME}" = x; then
17547      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17548    fi
17549    OUTPUT_ROOT="$CURDIR"
17550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17551$as_echo "in current directory" >&6; }
17552
17553    # WARNING: This might be a bad thing to do. You need to be sure you want to
17554    # have a configuration in this directory. Do some sanity checks!
17555
17556    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17557      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17558      # other files
17559      files_present=`$LS $OUTPUT_ROOT`
17560      # Configure has already touched config.log and confdefs.h in the current dir when this check
17561      # is performed.
17562      filtered_files=`$ECHO "$files_present" \
17563          | $SED -e 's/config.log//g' \
17564              -e 's/configure.log//g' \
17565              -e 's/confdefs.h//g' \
17566              -e 's/ //g' \
17567          | $TR -d '\n'`
17568      if test "x$filtered_files" != x; then
17569        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17570$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17571        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17572$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17573        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17574$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17575        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17576$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17577        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17578$as_echo "$as_me: seriously mess up just about everything." >&6;}
17579        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17580$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17581        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17582$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17583        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17584      fi
17585    fi
17586  fi
17587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17588$as_echo_n "checking what configuration name to use... " >&6; }
17589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17590$as_echo "$CONF_NAME" >&6; }
17591
17592
17593  # Only process if variable expands to non-empty
17594
17595  if test "x$OUTPUT_ROOT" != x; then
17596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17597
17598  # Input might be given as Windows format, start by converting to
17599  # unix format.
17600  path="$OUTPUT_ROOT"
17601  new_path=`$CYGPATH -u "$path"`
17602
17603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17606  # "foo.exe" is OK but "foo" is an error.
17607  #
17608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17609  # It is also a way to make sure we got the proper file name for the real test later on.
17610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17611  if test "x$test_shortpath" = x; then
17612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17613$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17614    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17615  fi
17616
17617  # Call helper function which possibly converts this using DOS-style short mode.
17618  # If so, the updated path is stored in $new_path.
17619
17620  input_path="$new_path"
17621  # Check if we need to convert this using DOS-style short mode. If the path
17622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17623  # take no chances and rewrite it.
17624  # Note: m4 eats our [], so we need to use [ and ] instead.
17625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17626  if test "x$has_forbidden_chars" != x; then
17627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17631      # Going to short mode and back again did indeed matter. Since short mode is
17632      # case insensitive, let's make it lowercase to improve readability.
17633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17634      # Now convert it back to Unix-style (cygpath)
17635      input_path=`$CYGPATH -u "$shortmode_path"`
17636      new_path="$input_path"
17637    fi
17638  fi
17639
17640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17641  if test "x$test_cygdrive_prefix" = x; then
17642    # As a simple fix, exclude /usr/bin since it's not a real path.
17643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17645      # a path prefixed by /cygdrive for fixpath to work.
17646      new_path="$CYGWIN_ROOT_PATH$input_path"
17647    fi
17648  fi
17649
17650
17651  if test "x$path" != "x$new_path"; then
17652    OUTPUT_ROOT="$new_path"
17653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17654$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17655  fi
17656
17657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17658
17659  path="$OUTPUT_ROOT"
17660  has_colon=`$ECHO $path | $GREP ^.:`
17661  new_path="$path"
17662  if test "x$has_colon" = x; then
17663    # Not in mixed or Windows style, start by that.
17664    new_path=`cmd //c echo $path`
17665  fi
17666
17667
17668  input_path="$new_path"
17669  # Check if we need to convert this using DOS-style short mode. If the path
17670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17671  # take no chances and rewrite it.
17672  # Note: m4 eats our [], so we need to use [ and ] instead.
17673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17674  if test "x$has_forbidden_chars" != x; then
17675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17677  fi
17678
17679
17680  windows_path="$new_path"
17681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17682    unix_path=`$CYGPATH -u "$windows_path"`
17683    new_path="$unix_path"
17684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17686    new_path="$unix_path"
17687  fi
17688
17689  if test "x$path" != "x$new_path"; then
17690    OUTPUT_ROOT="$new_path"
17691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17692$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17693  fi
17694
17695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17697
17698    else
17699      # We're on a unix platform. Hooray! :)
17700      path="$OUTPUT_ROOT"
17701      has_space=`$ECHO "$path" | $GREP " "`
17702      if test "x$has_space" != x; then
17703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17704$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17706      fi
17707
17708      # Use eval to expand a potential ~
17709      eval path="$path"
17710      if test ! -f "$path" && test ! -d "$path"; then
17711        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17712      fi
17713
17714      if test -d "$path"; then
17715        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17716      else
17717        dir="`$DIRNAME "$path"`"
17718        base="`$BASENAME "$path"`"
17719        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17720      fi
17721    fi
17722  fi
17723
17724
17725  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17726  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17727
17728  SPEC="$OUTPUT_ROOT/spec.gmk"
17729
17730
17731
17732
17733
17734  # The spec.gmk file contains all variables for the make system.
17735  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17736
17737  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17738  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17739
17740  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17741  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17742
17743  # The compare.sh is used to compare the build output to other builds.
17744  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17745
17746  # The generated Makefile knows where the spec.gmk is and where the source is.
17747  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17748  # which will look for generated configurations
17749  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17750
17751
17752
17753# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17754
17755  for ac_prog in apt-get yum brew port pkgutil pkgadd
17756do
17757  # Extract the first word of "$ac_prog", so it can be a program name with args.
17758set dummy $ac_prog; ac_word=$2
17759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17760$as_echo_n "checking for $ac_word... " >&6; }
17761if ${ac_cv_prog_PKGHANDLER+:} false; then :
17762  $as_echo_n "(cached) " >&6
17763else
17764  if test -n "$PKGHANDLER"; then
17765  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17766else
17767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17768for as_dir in $PATH
17769do
17770  IFS=$as_save_IFS
17771  test -z "$as_dir" && as_dir=.
17772    for ac_exec_ext in '' $ac_executable_extensions; do
17773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17774    ac_cv_prog_PKGHANDLER="$ac_prog"
17775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17776    break 2
17777  fi
17778done
17779  done
17780IFS=$as_save_IFS
17781
17782fi
17783fi
17784PKGHANDLER=$ac_cv_prog_PKGHANDLER
17785if test -n "$PKGHANDLER"; then
17786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17787$as_echo "$PKGHANDLER" >&6; }
17788else
17789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17790$as_echo "no" >&6; }
17791fi
17792
17793
17794  test -n "$PKGHANDLER" && break
17795done
17796
17797
17798
17799# Setup tools that requires more complex handling, or that is not needed by the configure script.
17800
17801
17802
17803  # Publish this variable in the help.
17804
17805
17806  if [ -z "${MAKE+x}" ]; then
17807    # The variable is not set by user, try to locate tool using the code snippet
17808
17809    # Try our hardest to locate a correct version of GNU make
17810    for ac_prog in gmake
17811do
17812  # Extract the first word of "$ac_prog", so it can be a program name with args.
17813set dummy $ac_prog; ac_word=$2
17814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17815$as_echo_n "checking for $ac_word... " >&6; }
17816if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17817  $as_echo_n "(cached) " >&6
17818else
17819  case $CHECK_GMAKE in
17820  [\\/]* | ?:[\\/]*)
17821  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17822  ;;
17823  *)
17824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17825for as_dir in $PATH
17826do
17827  IFS=$as_save_IFS
17828  test -z "$as_dir" && as_dir=.
17829    for ac_exec_ext in '' $ac_executable_extensions; do
17830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17831    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17833    break 2
17834  fi
17835done
17836  done
17837IFS=$as_save_IFS
17838
17839  ;;
17840esac
17841fi
17842CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17843if test -n "$CHECK_GMAKE"; then
17844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17845$as_echo "$CHECK_GMAKE" >&6; }
17846else
17847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17848$as_echo "no" >&6; }
17849fi
17850
17851
17852  test -n "$CHECK_GMAKE" && break
17853done
17854
17855
17856  MAKE_CANDIDATE=""$CHECK_GMAKE""
17857  DESCRIPTION="gmake in PATH"
17858
17859  # On Cygwin, we require a newer version of make than on other platforms
17860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17861    MAKE_VERSION_EXPR="-e 4\."
17862    MAKE_REQUIRED_VERSION="4.0"
17863   else
17864    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17865    MAKE_REQUIRED_VERSION="3.81"
17866  fi
17867
17868  if test "x$MAKE_CANDIDATE" != x; then
17869    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17870$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17871    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17872    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17873    if test "x$IS_GNU_MAKE" = x; then
17874      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17875$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17876    else
17877      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17878      if test "x$IS_MODERN_MAKE" = x; then
17879        { $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
17880$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;}
17881      else
17882        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17883          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17884            MAKE_EXPECTED_ENV='cygwin'
17885          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17886            MAKE_EXPECTED_ENV='msys'
17887          else
17888            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17889          fi
17890          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17891          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17892        else
17893          # Not relevant for non-Windows
17894          IS_MAKE_CORRECT_ENV=true
17895        fi
17896        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17897          { $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
17898$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;}
17899        else
17900          FOUND_MAKE=$MAKE_CANDIDATE
17901
17902  # Only process if variable expands to non-empty
17903
17904  if test "x$FOUND_MAKE" != x; then
17905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17906
17907  # First separate the path from the arguments. This will split at the first
17908  # space.
17909  complete="$FOUND_MAKE"
17910  path="${complete%% *}"
17911  tmp="$complete EOL"
17912  arguments="${tmp#* }"
17913
17914  # Input might be given as Windows format, start by converting to
17915  # unix format.
17916  new_path=`$CYGPATH -u "$path"`
17917
17918  # Now try to locate executable using which
17919  new_path=`$WHICH "$new_path" 2> /dev/null`
17920  # bat and cmd files are not always considered executable in cygwin causing which
17921  # to not find them
17922  if test "x$new_path" = x \
17923      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17924      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17925    new_path=`$CYGPATH -u "$path"`
17926  fi
17927  if test "x$new_path" = x; then
17928    # Oops. Which didn't find the executable.
17929    # The splitting of arguments from the executable at a space might have been incorrect,
17930    # since paths with space are more likely in Windows. Give it another try with the whole
17931    # argument.
17932    path="$complete"
17933    arguments="EOL"
17934    new_path=`$CYGPATH -u "$path"`
17935    new_path=`$WHICH "$new_path" 2> /dev/null`
17936    # bat and cmd files are not always considered executable in cygwin causing which
17937    # to not find them
17938    if test "x$new_path" = x \
17939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17941      new_path=`$CYGPATH -u "$path"`
17942    fi
17943    if test "x$new_path" = x; then
17944      # It's still not found. Now this is an unrecoverable error.
17945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17946$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17947      has_space=`$ECHO "$complete" | $GREP " "`
17948      if test "x$has_space" != x; then
17949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17951      fi
17952      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17953    fi
17954  fi
17955
17956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17959  # "foo.exe" is OK but "foo" is an error.
17960  #
17961  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17962  # It is also a way to make sure we got the proper file name for the real test later on.
17963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17964  if test "x$test_shortpath" = x; then
17965    # Short path failed, file does not exist as specified.
17966    # Try adding .exe or .cmd
17967    if test -f "${new_path}.exe"; then
17968      input_to_shortpath="${new_path}.exe"
17969    elif test -f "${new_path}.cmd"; then
17970      input_to_shortpath="${new_path}.cmd"
17971    else
17972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17976      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17977    fi
17978  else
17979    input_to_shortpath="$new_path"
17980  fi
17981
17982  # Call helper function which possibly converts this using DOS-style short mode.
17983  # If so, the updated path is stored in $new_path.
17984  new_path="$input_to_shortpath"
17985
17986  input_path="$input_to_shortpath"
17987  # Check if we need to convert this using DOS-style short mode. If the path
17988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17989  # take no chances and rewrite it.
17990  # Note: m4 eats our [], so we need to use [ and ] instead.
17991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17992  if test "x$has_forbidden_chars" != x; then
17993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17997      # Going to short mode and back again did indeed matter. Since short mode is
17998      # case insensitive, let's make it lowercase to improve readability.
17999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18000      # Now convert it back to Unix-style (cygpath)
18001      input_path=`$CYGPATH -u "$shortmode_path"`
18002      new_path="$input_path"
18003    fi
18004  fi
18005
18006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18007  if test "x$test_cygdrive_prefix" = x; then
18008    # As a simple fix, exclude /usr/bin since it's not a real path.
18009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18011      # a path prefixed by /cygdrive for fixpath to work.
18012      new_path="$CYGWIN_ROOT_PATH$input_path"
18013    fi
18014  fi
18015
18016  # remove trailing .exe if any
18017  new_path="${new_path/%.exe/}"
18018
18019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18020
18021  # First separate the path from the arguments. This will split at the first
18022  # space.
18023  complete="$FOUND_MAKE"
18024  path="${complete%% *}"
18025  tmp="$complete EOL"
18026  arguments="${tmp#* }"
18027
18028  # Input might be given as Windows format, start by converting to
18029  # unix format.
18030  new_path="$path"
18031
18032  windows_path="$new_path"
18033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18034    unix_path=`$CYGPATH -u "$windows_path"`
18035    new_path="$unix_path"
18036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18038    new_path="$unix_path"
18039  fi
18040
18041
18042  # Now try to locate executable using which
18043  new_path=`$WHICH "$new_path" 2> /dev/null`
18044
18045  if test "x$new_path" = x; then
18046    # Oops. Which didn't find the executable.
18047    # The splitting of arguments from the executable at a space might have been incorrect,
18048    # since paths with space are more likely in Windows. Give it another try with the whole
18049    # argument.
18050    path="$complete"
18051    arguments="EOL"
18052    new_path="$path"
18053
18054  windows_path="$new_path"
18055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18056    unix_path=`$CYGPATH -u "$windows_path"`
18057    new_path="$unix_path"
18058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18060    new_path="$unix_path"
18061  fi
18062
18063
18064    new_path=`$WHICH "$new_path" 2> /dev/null`
18065    # bat and cmd files are not always considered executable in MSYS causing which
18066    # to not find them
18067    if test "x$new_path" = x \
18068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18070      new_path="$path"
18071
18072  windows_path="$new_path"
18073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18074    unix_path=`$CYGPATH -u "$windows_path"`
18075    new_path="$unix_path"
18076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18078    new_path="$unix_path"
18079  fi
18080
18081    fi
18082
18083    if test "x$new_path" = x; then
18084      # It's still not found. Now this is an unrecoverable error.
18085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18086$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18087      has_space=`$ECHO "$complete" | $GREP " "`
18088      if test "x$has_space" != x; then
18089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18091      fi
18092      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18093    fi
18094  fi
18095
18096  # Now new_path has a complete unix path to the binary
18097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18098    # Keep paths in /bin as-is, but remove trailing .exe if any
18099    new_path="${new_path/%.exe/}"
18100    # Do not save /bin paths to all_fixpath_prefixes!
18101  else
18102    # Not in mixed or Windows style, start by that.
18103    new_path=`cmd //c echo $new_path`
18104
18105  input_path="$new_path"
18106  # Check if we need to convert this using DOS-style short mode. If the path
18107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18108  # take no chances and rewrite it.
18109  # Note: m4 eats our [], so we need to use [ and ] instead.
18110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18111  if test "x$has_forbidden_chars" != x; then
18112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18114  fi
18115
18116    # Output is in $new_path
18117
18118  windows_path="$new_path"
18119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18120    unix_path=`$CYGPATH -u "$windows_path"`
18121    new_path="$unix_path"
18122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18124    new_path="$unix_path"
18125  fi
18126
18127    # remove trailing .exe if any
18128    new_path="${new_path/%.exe/}"
18129
18130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18132  fi
18133
18134    else
18135      # We're on a unix platform. Hooray! :)
18136      # First separate the path from the arguments. This will split at the first
18137      # space.
18138      complete="$FOUND_MAKE"
18139      path="${complete%% *}"
18140      tmp="$complete EOL"
18141      arguments="${tmp#* }"
18142
18143      # Cannot rely on the command "which" here since it doesn't always work.
18144      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18145      if test -z "$is_absolute_path"; then
18146        # Path to executable is not absolute. Find it.
18147        IFS_save="$IFS"
18148        IFS=:
18149        for p in $PATH; do
18150          if test -f "$p/$path" && test -x "$p/$path"; then
18151            new_path="$p/$path"
18152            break
18153          fi
18154        done
18155        IFS="$IFS_save"
18156      else
18157        # This is an absolute path, we can use it without further modifications.
18158        new_path="$path"
18159      fi
18160
18161      if test "x$new_path" = x; then
18162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18163$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18164        has_space=`$ECHO "$complete" | $GREP " "`
18165        if test "x$has_space" != x; then
18166          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18168        fi
18169        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18170      fi
18171    fi
18172
18173    # Now join together the path and the arguments once again
18174    if test "x$arguments" != xEOL; then
18175      new_complete="$new_path ${arguments% *}"
18176    else
18177      new_complete="$new_path"
18178    fi
18179
18180    if test "x$complete" != "x$new_complete"; then
18181      FOUND_MAKE="$new_complete"
18182      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18183$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18184    fi
18185  fi
18186
18187        fi
18188      fi
18189    fi
18190  fi
18191
18192
18193    if test "x$FOUND_MAKE" = x; then
18194      for ac_prog in make
18195do
18196  # Extract the first word of "$ac_prog", so it can be a program name with args.
18197set dummy $ac_prog; ac_word=$2
18198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18199$as_echo_n "checking for $ac_word... " >&6; }
18200if ${ac_cv_path_CHECK_MAKE+:} false; then :
18201  $as_echo_n "(cached) " >&6
18202else
18203  case $CHECK_MAKE in
18204  [\\/]* | ?:[\\/]*)
18205  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18206  ;;
18207  *)
18208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18209for as_dir in $PATH
18210do
18211  IFS=$as_save_IFS
18212  test -z "$as_dir" && as_dir=.
18213    for ac_exec_ext in '' $ac_executable_extensions; do
18214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18215    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18217    break 2
18218  fi
18219done
18220  done
18221IFS=$as_save_IFS
18222
18223  ;;
18224esac
18225fi
18226CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18227if test -n "$CHECK_MAKE"; then
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18229$as_echo "$CHECK_MAKE" >&6; }
18230else
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18232$as_echo "no" >&6; }
18233fi
18234
18235
18236  test -n "$CHECK_MAKE" && break
18237done
18238
18239
18240  MAKE_CANDIDATE=""$CHECK_MAKE""
18241  DESCRIPTION="make in PATH"
18242
18243  # On Cygwin, we require a newer version of make than on other platforms
18244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18245    MAKE_VERSION_EXPR="-e 4\."
18246    MAKE_REQUIRED_VERSION="4.0"
18247   else
18248    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18249    MAKE_REQUIRED_VERSION="3.81"
18250  fi
18251
18252  if test "x$MAKE_CANDIDATE" != x; then
18253    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18254$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18255    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18256    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18257    if test "x$IS_GNU_MAKE" = x; then
18258      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18259$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18260    else
18261      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18262      if test "x$IS_MODERN_MAKE" = x; then
18263        { $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
18264$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;}
18265      else
18266        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18267          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18268            MAKE_EXPECTED_ENV='cygwin'
18269          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18270            MAKE_EXPECTED_ENV='msys'
18271          else
18272            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18273          fi
18274          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18275          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18276        else
18277          # Not relevant for non-Windows
18278          IS_MAKE_CORRECT_ENV=true
18279        fi
18280        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18281          { $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
18282$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;}
18283        else
18284          FOUND_MAKE=$MAKE_CANDIDATE
18285
18286  # Only process if variable expands to non-empty
18287
18288  if test "x$FOUND_MAKE" != x; then
18289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18290
18291  # First separate the path from the arguments. This will split at the first
18292  # space.
18293  complete="$FOUND_MAKE"
18294  path="${complete%% *}"
18295  tmp="$complete EOL"
18296  arguments="${tmp#* }"
18297
18298  # Input might be given as Windows format, start by converting to
18299  # unix format.
18300  new_path=`$CYGPATH -u "$path"`
18301
18302  # Now try to locate executable using which
18303  new_path=`$WHICH "$new_path" 2> /dev/null`
18304  # bat and cmd files are not always considered executable in cygwin causing which
18305  # to not find them
18306  if test "x$new_path" = x \
18307      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18308      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18309    new_path=`$CYGPATH -u "$path"`
18310  fi
18311  if test "x$new_path" = x; then
18312    # Oops. Which didn't find the executable.
18313    # The splitting of arguments from the executable at a space might have been incorrect,
18314    # since paths with space are more likely in Windows. Give it another try with the whole
18315    # argument.
18316    path="$complete"
18317    arguments="EOL"
18318    new_path=`$CYGPATH -u "$path"`
18319    new_path=`$WHICH "$new_path" 2> /dev/null`
18320    # bat and cmd files are not always considered executable in cygwin causing which
18321    # to not find them
18322    if test "x$new_path" = x \
18323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18325      new_path=`$CYGPATH -u "$path"`
18326    fi
18327    if test "x$new_path" = x; then
18328      # It's still not found. Now this is an unrecoverable error.
18329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18331      has_space=`$ECHO "$complete" | $GREP " "`
18332      if test "x$has_space" != x; then
18333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18335      fi
18336      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18337    fi
18338  fi
18339
18340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18343  # "foo.exe" is OK but "foo" is an error.
18344  #
18345  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18346  # It is also a way to make sure we got the proper file name for the real test later on.
18347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18348  if test "x$test_shortpath" = x; then
18349    # Short path failed, file does not exist as specified.
18350    # Try adding .exe or .cmd
18351    if test -f "${new_path}.exe"; then
18352      input_to_shortpath="${new_path}.exe"
18353    elif test -f "${new_path}.cmd"; then
18354      input_to_shortpath="${new_path}.cmd"
18355    else
18356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18357$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18360      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18361    fi
18362  else
18363    input_to_shortpath="$new_path"
18364  fi
18365
18366  # Call helper function which possibly converts this using DOS-style short mode.
18367  # If so, the updated path is stored in $new_path.
18368  new_path="$input_to_shortpath"
18369
18370  input_path="$input_to_shortpath"
18371  # Check if we need to convert this using DOS-style short mode. If the path
18372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18373  # take no chances and rewrite it.
18374  # Note: m4 eats our [], so we need to use [ and ] instead.
18375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18376  if test "x$has_forbidden_chars" != x; then
18377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18381      # Going to short mode and back again did indeed matter. Since short mode is
18382      # case insensitive, let's make it lowercase to improve readability.
18383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18384      # Now convert it back to Unix-style (cygpath)
18385      input_path=`$CYGPATH -u "$shortmode_path"`
18386      new_path="$input_path"
18387    fi
18388  fi
18389
18390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18391  if test "x$test_cygdrive_prefix" = x; then
18392    # As a simple fix, exclude /usr/bin since it's not a real path.
18393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18395      # a path prefixed by /cygdrive for fixpath to work.
18396      new_path="$CYGWIN_ROOT_PATH$input_path"
18397    fi
18398  fi
18399
18400  # remove trailing .exe if any
18401  new_path="${new_path/%.exe/}"
18402
18403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18404
18405  # First separate the path from the arguments. This will split at the first
18406  # space.
18407  complete="$FOUND_MAKE"
18408  path="${complete%% *}"
18409  tmp="$complete EOL"
18410  arguments="${tmp#* }"
18411
18412  # Input might be given as Windows format, start by converting to
18413  # unix format.
18414  new_path="$path"
18415
18416  windows_path="$new_path"
18417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18418    unix_path=`$CYGPATH -u "$windows_path"`
18419    new_path="$unix_path"
18420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18422    new_path="$unix_path"
18423  fi
18424
18425
18426  # Now try to locate executable using which
18427  new_path=`$WHICH "$new_path" 2> /dev/null`
18428
18429  if test "x$new_path" = x; then
18430    # Oops. Which didn't find the executable.
18431    # The splitting of arguments from the executable at a space might have been incorrect,
18432    # since paths with space are more likely in Windows. Give it another try with the whole
18433    # argument.
18434    path="$complete"
18435    arguments="EOL"
18436    new_path="$path"
18437
18438  windows_path="$new_path"
18439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18440    unix_path=`$CYGPATH -u "$windows_path"`
18441    new_path="$unix_path"
18442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18444    new_path="$unix_path"
18445  fi
18446
18447
18448    new_path=`$WHICH "$new_path" 2> /dev/null`
18449    # bat and cmd files are not always considered executable in MSYS causing which
18450    # to not find them
18451    if test "x$new_path" = x \
18452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18454      new_path="$path"
18455
18456  windows_path="$new_path"
18457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18458    unix_path=`$CYGPATH -u "$windows_path"`
18459    new_path="$unix_path"
18460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18462    new_path="$unix_path"
18463  fi
18464
18465    fi
18466
18467    if test "x$new_path" = x; then
18468      # It's still not found. Now this is an unrecoverable error.
18469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18471      has_space=`$ECHO "$complete" | $GREP " "`
18472      if test "x$has_space" != x; then
18473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18475      fi
18476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18477    fi
18478  fi
18479
18480  # Now new_path has a complete unix path to the binary
18481  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18482    # Keep paths in /bin as-is, but remove trailing .exe if any
18483    new_path="${new_path/%.exe/}"
18484    # Do not save /bin paths to all_fixpath_prefixes!
18485  else
18486    # Not in mixed or Windows style, start by that.
18487    new_path=`cmd //c echo $new_path`
18488
18489  input_path="$new_path"
18490  # Check if we need to convert this using DOS-style short mode. If the path
18491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18492  # take no chances and rewrite it.
18493  # Note: m4 eats our [], so we need to use [ and ] instead.
18494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18495  if test "x$has_forbidden_chars" != x; then
18496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18498  fi
18499
18500    # Output is in $new_path
18501
18502  windows_path="$new_path"
18503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18504    unix_path=`$CYGPATH -u "$windows_path"`
18505    new_path="$unix_path"
18506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18508    new_path="$unix_path"
18509  fi
18510
18511    # remove trailing .exe if any
18512    new_path="${new_path/%.exe/}"
18513
18514    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18515    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18516  fi
18517
18518    else
18519      # We're on a unix platform. Hooray! :)
18520      # First separate the path from the arguments. This will split at the first
18521      # space.
18522      complete="$FOUND_MAKE"
18523      path="${complete%% *}"
18524      tmp="$complete EOL"
18525      arguments="${tmp#* }"
18526
18527      # Cannot rely on the command "which" here since it doesn't always work.
18528      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18529      if test -z "$is_absolute_path"; then
18530        # Path to executable is not absolute. Find it.
18531        IFS_save="$IFS"
18532        IFS=:
18533        for p in $PATH; do
18534          if test -f "$p/$path" && test -x "$p/$path"; then
18535            new_path="$p/$path"
18536            break
18537          fi
18538        done
18539        IFS="$IFS_save"
18540      else
18541        # This is an absolute path, we can use it without further modifications.
18542        new_path="$path"
18543      fi
18544
18545      if test "x$new_path" = x; then
18546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18547$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18548        has_space=`$ECHO "$complete" | $GREP " "`
18549        if test "x$has_space" != x; then
18550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18552        fi
18553        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18554      fi
18555    fi
18556
18557    # Now join together the path and the arguments once again
18558    if test "x$arguments" != xEOL; then
18559      new_complete="$new_path ${arguments% *}"
18560    else
18561      new_complete="$new_path"
18562    fi
18563
18564    if test "x$complete" != "x$new_complete"; then
18565      FOUND_MAKE="$new_complete"
18566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18567$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18568    fi
18569  fi
18570
18571        fi
18572      fi
18573    fi
18574  fi
18575
18576    fi
18577
18578    if test "x$FOUND_MAKE" = x; then
18579      if test "x$TOOLCHAIN_PATH" != x; then
18580        # We have a toolchain path, check that as well before giving up.
18581        OLD_PATH=$PATH
18582        PATH=$TOOLCHAIN_PATH:$PATH
18583        for ac_prog in gmake
18584do
18585  # Extract the first word of "$ac_prog", so it can be a program name with args.
18586set dummy $ac_prog; ac_word=$2
18587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588$as_echo_n "checking for $ac_word... " >&6; }
18589if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18590  $as_echo_n "(cached) " >&6
18591else
18592  case $CHECK_TOOLSDIR_GMAKE in
18593  [\\/]* | ?:[\\/]*)
18594  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18595  ;;
18596  *)
18597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598for as_dir in $PATH
18599do
18600  IFS=$as_save_IFS
18601  test -z "$as_dir" && as_dir=.
18602    for ac_exec_ext in '' $ac_executable_extensions; do
18603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18604    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606    break 2
18607  fi
18608done
18609  done
18610IFS=$as_save_IFS
18611
18612  ;;
18613esac
18614fi
18615CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18616if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18618$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18619else
18620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621$as_echo "no" >&6; }
18622fi
18623
18624
18625  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18626done
18627
18628
18629  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18630  DESCRIPTION="gmake in tools-dir"
18631
18632  # On Cygwin, we require a newer version of make than on other platforms
18633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634    MAKE_VERSION_EXPR="-e 4\."
18635    MAKE_REQUIRED_VERSION="4.0"
18636   else
18637    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18638    MAKE_REQUIRED_VERSION="3.81"
18639  fi
18640
18641  if test "x$MAKE_CANDIDATE" != x; then
18642    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18643$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18644    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18645    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18646    if test "x$IS_GNU_MAKE" = x; then
18647      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18648$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18649    else
18650      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18651      if test "x$IS_MODERN_MAKE" = x; then
18652        { $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
18653$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;}
18654      else
18655        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18656          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18657            MAKE_EXPECTED_ENV='cygwin'
18658          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18659            MAKE_EXPECTED_ENV='msys'
18660          else
18661            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18662          fi
18663          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18664          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18665        else
18666          # Not relevant for non-Windows
18667          IS_MAKE_CORRECT_ENV=true
18668        fi
18669        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18670          { $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
18671$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;}
18672        else
18673          FOUND_MAKE=$MAKE_CANDIDATE
18674
18675  # Only process if variable expands to non-empty
18676
18677  if test "x$FOUND_MAKE" != x; then
18678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18679
18680  # First separate the path from the arguments. This will split at the first
18681  # space.
18682  complete="$FOUND_MAKE"
18683  path="${complete%% *}"
18684  tmp="$complete EOL"
18685  arguments="${tmp#* }"
18686
18687  # Input might be given as Windows format, start by converting to
18688  # unix format.
18689  new_path=`$CYGPATH -u "$path"`
18690
18691  # Now try to locate executable using which
18692  new_path=`$WHICH "$new_path" 2> /dev/null`
18693  # bat and cmd files are not always considered executable in cygwin causing which
18694  # to not find them
18695  if test "x$new_path" = x \
18696      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18697      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18698    new_path=`$CYGPATH -u "$path"`
18699  fi
18700  if test "x$new_path" = x; then
18701    # Oops. Which didn't find the executable.
18702    # The splitting of arguments from the executable at a space might have been incorrect,
18703    # since paths with space are more likely in Windows. Give it another try with the whole
18704    # argument.
18705    path="$complete"
18706    arguments="EOL"
18707    new_path=`$CYGPATH -u "$path"`
18708    new_path=`$WHICH "$new_path" 2> /dev/null`
18709    # bat and cmd files are not always considered executable in cygwin causing which
18710    # to not find them
18711    if test "x$new_path" = x \
18712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18714      new_path=`$CYGPATH -u "$path"`
18715    fi
18716    if test "x$new_path" = x; then
18717      # It's still not found. Now this is an unrecoverable error.
18718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18719$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18720      has_space=`$ECHO "$complete" | $GREP " "`
18721      if test "x$has_space" != x; then
18722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18724      fi
18725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18726    fi
18727  fi
18728
18729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18732  # "foo.exe" is OK but "foo" is an error.
18733  #
18734  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18735  # It is also a way to make sure we got the proper file name for the real test later on.
18736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18737  if test "x$test_shortpath" = x; then
18738    # Short path failed, file does not exist as specified.
18739    # Try adding .exe or .cmd
18740    if test -f "${new_path}.exe"; then
18741      input_to_shortpath="${new_path}.exe"
18742    elif test -f "${new_path}.cmd"; then
18743      input_to_shortpath="${new_path}.cmd"
18744    else
18745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18746$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18749      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18750    fi
18751  else
18752    input_to_shortpath="$new_path"
18753  fi
18754
18755  # Call helper function which possibly converts this using DOS-style short mode.
18756  # If so, the updated path is stored in $new_path.
18757  new_path="$input_to_shortpath"
18758
18759  input_path="$input_to_shortpath"
18760  # Check if we need to convert this using DOS-style short mode. If the path
18761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18762  # take no chances and rewrite it.
18763  # Note: m4 eats our [], so we need to use [ and ] instead.
18764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18765  if test "x$has_forbidden_chars" != x; then
18766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18770      # Going to short mode and back again did indeed matter. Since short mode is
18771      # case insensitive, let's make it lowercase to improve readability.
18772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18773      # Now convert it back to Unix-style (cygpath)
18774      input_path=`$CYGPATH -u "$shortmode_path"`
18775      new_path="$input_path"
18776    fi
18777  fi
18778
18779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18780  if test "x$test_cygdrive_prefix" = x; then
18781    # As a simple fix, exclude /usr/bin since it's not a real path.
18782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18784      # a path prefixed by /cygdrive for fixpath to work.
18785      new_path="$CYGWIN_ROOT_PATH$input_path"
18786    fi
18787  fi
18788
18789  # remove trailing .exe if any
18790  new_path="${new_path/%.exe/}"
18791
18792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18793
18794  # First separate the path from the arguments. This will split at the first
18795  # space.
18796  complete="$FOUND_MAKE"
18797  path="${complete%% *}"
18798  tmp="$complete EOL"
18799  arguments="${tmp#* }"
18800
18801  # Input might be given as Windows format, start by converting to
18802  # unix format.
18803  new_path="$path"
18804
18805  windows_path="$new_path"
18806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18807    unix_path=`$CYGPATH -u "$windows_path"`
18808    new_path="$unix_path"
18809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18811    new_path="$unix_path"
18812  fi
18813
18814
18815  # Now try to locate executable using which
18816  new_path=`$WHICH "$new_path" 2> /dev/null`
18817
18818  if test "x$new_path" = x; then
18819    # Oops. Which didn't find the executable.
18820    # The splitting of arguments from the executable at a space might have been incorrect,
18821    # since paths with space are more likely in Windows. Give it another try with the whole
18822    # argument.
18823    path="$complete"
18824    arguments="EOL"
18825    new_path="$path"
18826
18827  windows_path="$new_path"
18828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18829    unix_path=`$CYGPATH -u "$windows_path"`
18830    new_path="$unix_path"
18831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18833    new_path="$unix_path"
18834  fi
18835
18836
18837    new_path=`$WHICH "$new_path" 2> /dev/null`
18838    # bat and cmd files are not always considered executable in MSYS causing which
18839    # to not find them
18840    if test "x$new_path" = x \
18841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18843      new_path="$path"
18844
18845  windows_path="$new_path"
18846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18847    unix_path=`$CYGPATH -u "$windows_path"`
18848    new_path="$unix_path"
18849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18851    new_path="$unix_path"
18852  fi
18853
18854    fi
18855
18856    if test "x$new_path" = x; then
18857      # It's still not found. Now this is an unrecoverable error.
18858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18859$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18860      has_space=`$ECHO "$complete" | $GREP " "`
18861      if test "x$has_space" != x; then
18862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18864      fi
18865      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18866    fi
18867  fi
18868
18869  # Now new_path has a complete unix path to the binary
18870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18871    # Keep paths in /bin as-is, but remove trailing .exe if any
18872    new_path="${new_path/%.exe/}"
18873    # Do not save /bin paths to all_fixpath_prefixes!
18874  else
18875    # Not in mixed or Windows style, start by that.
18876    new_path=`cmd //c echo $new_path`
18877
18878  input_path="$new_path"
18879  # Check if we need to convert this using DOS-style short mode. If the path
18880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18881  # take no chances and rewrite it.
18882  # Note: m4 eats our [], so we need to use [ and ] instead.
18883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18884  if test "x$has_forbidden_chars" != x; then
18885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18887  fi
18888
18889    # Output is in $new_path
18890
18891  windows_path="$new_path"
18892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18893    unix_path=`$CYGPATH -u "$windows_path"`
18894    new_path="$unix_path"
18895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18897    new_path="$unix_path"
18898  fi
18899
18900    # remove trailing .exe if any
18901    new_path="${new_path/%.exe/}"
18902
18903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18905  fi
18906
18907    else
18908      # We're on a unix platform. Hooray! :)
18909      # First separate the path from the arguments. This will split at the first
18910      # space.
18911      complete="$FOUND_MAKE"
18912      path="${complete%% *}"
18913      tmp="$complete EOL"
18914      arguments="${tmp#* }"
18915
18916      # Cannot rely on the command "which" here since it doesn't always work.
18917      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18918      if test -z "$is_absolute_path"; then
18919        # Path to executable is not absolute. Find it.
18920        IFS_save="$IFS"
18921        IFS=:
18922        for p in $PATH; do
18923          if test -f "$p/$path" && test -x "$p/$path"; then
18924            new_path="$p/$path"
18925            break
18926          fi
18927        done
18928        IFS="$IFS_save"
18929      else
18930        # This is an absolute path, we can use it without further modifications.
18931        new_path="$path"
18932      fi
18933
18934      if test "x$new_path" = x; then
18935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18936$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18937        has_space=`$ECHO "$complete" | $GREP " "`
18938        if test "x$has_space" != x; then
18939          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18941        fi
18942        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18943      fi
18944    fi
18945
18946    # Now join together the path and the arguments once again
18947    if test "x$arguments" != xEOL; then
18948      new_complete="$new_path ${arguments% *}"
18949    else
18950      new_complete="$new_path"
18951    fi
18952
18953    if test "x$complete" != "x$new_complete"; then
18954      FOUND_MAKE="$new_complete"
18955      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18956$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18957    fi
18958  fi
18959
18960        fi
18961      fi
18962    fi
18963  fi
18964
18965        if test "x$FOUND_MAKE" = x; then
18966          for ac_prog in make
18967do
18968  # Extract the first word of "$ac_prog", so it can be a program name with args.
18969set dummy $ac_prog; ac_word=$2
18970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18971$as_echo_n "checking for $ac_word... " >&6; }
18972if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18973  $as_echo_n "(cached) " >&6
18974else
18975  case $CHECK_TOOLSDIR_MAKE in
18976  [\\/]* | ?:[\\/]*)
18977  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18978  ;;
18979  *)
18980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18981for as_dir in $PATH
18982do
18983  IFS=$as_save_IFS
18984  test -z "$as_dir" && as_dir=.
18985    for ac_exec_ext in '' $ac_executable_extensions; do
18986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18987    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18989    break 2
18990  fi
18991done
18992  done
18993IFS=$as_save_IFS
18994
18995  ;;
18996esac
18997fi
18998CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18999if test -n "$CHECK_TOOLSDIR_MAKE"; then
19000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19001$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19002else
19003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19004$as_echo "no" >&6; }
19005fi
19006
19007
19008  test -n "$CHECK_TOOLSDIR_MAKE" && break
19009done
19010
19011
19012  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19013  DESCRIPTION="make in tools-dir"
19014
19015  # On Cygwin, we require a newer version of make than on other platforms
19016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19017    MAKE_VERSION_EXPR="-e 4\."
19018    MAKE_REQUIRED_VERSION="4.0"
19019   else
19020    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19021    MAKE_REQUIRED_VERSION="3.81"
19022  fi
19023
19024  if test "x$MAKE_CANDIDATE" != x; then
19025    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19026$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19027    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19028    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19029    if test "x$IS_GNU_MAKE" = x; then
19030      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19031$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19032    else
19033      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19034      if test "x$IS_MODERN_MAKE" = x; then
19035        { $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
19036$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;}
19037      else
19038        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19039          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19040            MAKE_EXPECTED_ENV='cygwin'
19041          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19042            MAKE_EXPECTED_ENV='msys'
19043          else
19044            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19045          fi
19046          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19047          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19048        else
19049          # Not relevant for non-Windows
19050          IS_MAKE_CORRECT_ENV=true
19051        fi
19052        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19053          { $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
19054$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;}
19055        else
19056          FOUND_MAKE=$MAKE_CANDIDATE
19057
19058  # Only process if variable expands to non-empty
19059
19060  if test "x$FOUND_MAKE" != x; then
19061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19062
19063  # First separate the path from the arguments. This will split at the first
19064  # space.
19065  complete="$FOUND_MAKE"
19066  path="${complete%% *}"
19067  tmp="$complete EOL"
19068  arguments="${tmp#* }"
19069
19070  # Input might be given as Windows format, start by converting to
19071  # unix format.
19072  new_path=`$CYGPATH -u "$path"`
19073
19074  # Now try to locate executable using which
19075  new_path=`$WHICH "$new_path" 2> /dev/null`
19076  # bat and cmd files are not always considered executable in cygwin causing which
19077  # to not find them
19078  if test "x$new_path" = x \
19079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19081    new_path=`$CYGPATH -u "$path"`
19082  fi
19083  if test "x$new_path" = x; then
19084    # Oops. Which didn't find the executable.
19085    # The splitting of arguments from the executable at a space might have been incorrect,
19086    # since paths with space are more likely in Windows. Give it another try with the whole
19087    # argument.
19088    path="$complete"
19089    arguments="EOL"
19090    new_path=`$CYGPATH -u "$path"`
19091    new_path=`$WHICH "$new_path" 2> /dev/null`
19092    # bat and cmd files are not always considered executable in cygwin causing which
19093    # to not find them
19094    if test "x$new_path" = x \
19095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19097      new_path=`$CYGPATH -u "$path"`
19098    fi
19099    if test "x$new_path" = x; then
19100      # It's still not found. Now this is an unrecoverable error.
19101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19102$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19103      has_space=`$ECHO "$complete" | $GREP " "`
19104      if test "x$has_space" != x; then
19105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19107      fi
19108      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19109    fi
19110  fi
19111
19112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19115  # "foo.exe" is OK but "foo" is an error.
19116  #
19117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19118  # It is also a way to make sure we got the proper file name for the real test later on.
19119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19120  if test "x$test_shortpath" = x; then
19121    # Short path failed, file does not exist as specified.
19122    # Try adding .exe or .cmd
19123    if test -f "${new_path}.exe"; then
19124      input_to_shortpath="${new_path}.exe"
19125    elif test -f "${new_path}.cmd"; then
19126      input_to_shortpath="${new_path}.cmd"
19127    else
19128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19129$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19132      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19133    fi
19134  else
19135    input_to_shortpath="$new_path"
19136  fi
19137
19138  # Call helper function which possibly converts this using DOS-style short mode.
19139  # If so, the updated path is stored in $new_path.
19140  new_path="$input_to_shortpath"
19141
19142  input_path="$input_to_shortpath"
19143  # Check if we need to convert this using DOS-style short mode. If the path
19144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19145  # take no chances and rewrite it.
19146  # Note: m4 eats our [], so we need to use [ and ] instead.
19147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19148  if test "x$has_forbidden_chars" != x; then
19149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19153      # Going to short mode and back again did indeed matter. Since short mode is
19154      # case insensitive, let's make it lowercase to improve readability.
19155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19156      # Now convert it back to Unix-style (cygpath)
19157      input_path=`$CYGPATH -u "$shortmode_path"`
19158      new_path="$input_path"
19159    fi
19160  fi
19161
19162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19163  if test "x$test_cygdrive_prefix" = x; then
19164    # As a simple fix, exclude /usr/bin since it's not a real path.
19165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19167      # a path prefixed by /cygdrive for fixpath to work.
19168      new_path="$CYGWIN_ROOT_PATH$input_path"
19169    fi
19170  fi
19171
19172  # remove trailing .exe if any
19173  new_path="${new_path/%.exe/}"
19174
19175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19176
19177  # First separate the path from the arguments. This will split at the first
19178  # space.
19179  complete="$FOUND_MAKE"
19180  path="${complete%% *}"
19181  tmp="$complete EOL"
19182  arguments="${tmp#* }"
19183
19184  # Input might be given as Windows format, start by converting to
19185  # unix format.
19186  new_path="$path"
19187
19188  windows_path="$new_path"
19189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19190    unix_path=`$CYGPATH -u "$windows_path"`
19191    new_path="$unix_path"
19192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19194    new_path="$unix_path"
19195  fi
19196
19197
19198  # Now try to locate executable using which
19199  new_path=`$WHICH "$new_path" 2> /dev/null`
19200
19201  if test "x$new_path" = x; then
19202    # Oops. Which didn't find the executable.
19203    # The splitting of arguments from the executable at a space might have been incorrect,
19204    # since paths with space are more likely in Windows. Give it another try with the whole
19205    # argument.
19206    path="$complete"
19207    arguments="EOL"
19208    new_path="$path"
19209
19210  windows_path="$new_path"
19211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19212    unix_path=`$CYGPATH -u "$windows_path"`
19213    new_path="$unix_path"
19214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19216    new_path="$unix_path"
19217  fi
19218
19219
19220    new_path=`$WHICH "$new_path" 2> /dev/null`
19221    # bat and cmd files are not always considered executable in MSYS causing which
19222    # to not find them
19223    if test "x$new_path" = x \
19224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19226      new_path="$path"
19227
19228  windows_path="$new_path"
19229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19230    unix_path=`$CYGPATH -u "$windows_path"`
19231    new_path="$unix_path"
19232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19234    new_path="$unix_path"
19235  fi
19236
19237    fi
19238
19239    if test "x$new_path" = x; then
19240      # It's still not found. Now this is an unrecoverable error.
19241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19242$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19243      has_space=`$ECHO "$complete" | $GREP " "`
19244      if test "x$has_space" != x; then
19245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19247      fi
19248      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19249    fi
19250  fi
19251
19252  # Now new_path has a complete unix path to the binary
19253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19254    # Keep paths in /bin as-is, but remove trailing .exe if any
19255    new_path="${new_path/%.exe/}"
19256    # Do not save /bin paths to all_fixpath_prefixes!
19257  else
19258    # Not in mixed or Windows style, start by that.
19259    new_path=`cmd //c echo $new_path`
19260
19261  input_path="$new_path"
19262  # Check if we need to convert this using DOS-style short mode. If the path
19263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19264  # take no chances and rewrite it.
19265  # Note: m4 eats our [], so we need to use [ and ] instead.
19266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19267  if test "x$has_forbidden_chars" != x; then
19268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19270  fi
19271
19272    # Output is in $new_path
19273
19274  windows_path="$new_path"
19275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19276    unix_path=`$CYGPATH -u "$windows_path"`
19277    new_path="$unix_path"
19278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19280    new_path="$unix_path"
19281  fi
19282
19283    # remove trailing .exe if any
19284    new_path="${new_path/%.exe/}"
19285
19286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19288  fi
19289
19290    else
19291      # We're on a unix platform. Hooray! :)
19292      # First separate the path from the arguments. This will split at the first
19293      # space.
19294      complete="$FOUND_MAKE"
19295      path="${complete%% *}"
19296      tmp="$complete EOL"
19297      arguments="${tmp#* }"
19298
19299      # Cannot rely on the command "which" here since it doesn't always work.
19300      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19301      if test -z "$is_absolute_path"; then
19302        # Path to executable is not absolute. Find it.
19303        IFS_save="$IFS"
19304        IFS=:
19305        for p in $PATH; do
19306          if test -f "$p/$path" && test -x "$p/$path"; then
19307            new_path="$p/$path"
19308            break
19309          fi
19310        done
19311        IFS="$IFS_save"
19312      else
19313        # This is an absolute path, we can use it without further modifications.
19314        new_path="$path"
19315      fi
19316
19317      if test "x$new_path" = x; then
19318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19320        has_space=`$ECHO "$complete" | $GREP " "`
19321        if test "x$has_space" != x; then
19322          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19324        fi
19325        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19326      fi
19327    fi
19328
19329    # Now join together the path and the arguments once again
19330    if test "x$arguments" != xEOL; then
19331      new_complete="$new_path ${arguments% *}"
19332    else
19333      new_complete="$new_path"
19334    fi
19335
19336    if test "x$complete" != "x$new_complete"; then
19337      FOUND_MAKE="$new_complete"
19338      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19339$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19340    fi
19341  fi
19342
19343        fi
19344      fi
19345    fi
19346  fi
19347
19348        fi
19349        PATH=$OLD_PATH
19350      fi
19351    fi
19352
19353    if test "x$FOUND_MAKE" = x; then
19354      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
19355    fi
19356
19357  else
19358    # The variable is set, but is it from the command line or the environment?
19359
19360    # Try to remove the string !MAKE! from our list.
19361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19363      # If it failed, the variable was not from the command line. Ignore it,
19364      # but warn the user (except for BASH, which is always set by the calling BASH).
19365      if test "xMAKE" != xBASH; then
19366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19367$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19368      fi
19369      # Try to locate tool using the code snippet
19370
19371    # Try our hardest to locate a correct version of GNU make
19372    for ac_prog in gmake
19373do
19374  # Extract the first word of "$ac_prog", so it can be a program name with args.
19375set dummy $ac_prog; ac_word=$2
19376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19377$as_echo_n "checking for $ac_word... " >&6; }
19378if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19379  $as_echo_n "(cached) " >&6
19380else
19381  case $CHECK_GMAKE in
19382  [\\/]* | ?:[\\/]*)
19383  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19384  ;;
19385  *)
19386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19387for as_dir in $PATH
19388do
19389  IFS=$as_save_IFS
19390  test -z "$as_dir" && as_dir=.
19391    for ac_exec_ext in '' $ac_executable_extensions; do
19392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19393    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19395    break 2
19396  fi
19397done
19398  done
19399IFS=$as_save_IFS
19400
19401  ;;
19402esac
19403fi
19404CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19405if test -n "$CHECK_GMAKE"; then
19406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19407$as_echo "$CHECK_GMAKE" >&6; }
19408else
19409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19410$as_echo "no" >&6; }
19411fi
19412
19413
19414  test -n "$CHECK_GMAKE" && break
19415done
19416
19417
19418  MAKE_CANDIDATE=""$CHECK_GMAKE""
19419  DESCRIPTION="gmake in PATH"
19420
19421  # On Cygwin, we require a newer version of make than on other platforms
19422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19423    MAKE_VERSION_EXPR="-e 4\."
19424    MAKE_REQUIRED_VERSION="4.0"
19425   else
19426    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19427    MAKE_REQUIRED_VERSION="3.81"
19428  fi
19429
19430  if test "x$MAKE_CANDIDATE" != x; then
19431    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19432$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19433    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19434    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19435    if test "x$IS_GNU_MAKE" = x; then
19436      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19437$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19438    else
19439      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19440      if test "x$IS_MODERN_MAKE" = x; then
19441        { $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
19442$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;}
19443      else
19444        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19445          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19446            MAKE_EXPECTED_ENV='cygwin'
19447          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19448            MAKE_EXPECTED_ENV='msys'
19449          else
19450            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19451          fi
19452          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19453          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19454        else
19455          # Not relevant for non-Windows
19456          IS_MAKE_CORRECT_ENV=true
19457        fi
19458        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19459          { $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
19460$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;}
19461        else
19462          FOUND_MAKE=$MAKE_CANDIDATE
19463
19464  # Only process if variable expands to non-empty
19465
19466  if test "x$FOUND_MAKE" != x; then
19467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19468
19469  # First separate the path from the arguments. This will split at the first
19470  # space.
19471  complete="$FOUND_MAKE"
19472  path="${complete%% *}"
19473  tmp="$complete EOL"
19474  arguments="${tmp#* }"
19475
19476  # Input might be given as Windows format, start by converting to
19477  # unix format.
19478  new_path=`$CYGPATH -u "$path"`
19479
19480  # Now try to locate executable using which
19481  new_path=`$WHICH "$new_path" 2> /dev/null`
19482  # bat and cmd files are not always considered executable in cygwin causing which
19483  # to not find them
19484  if test "x$new_path" = x \
19485      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19486      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19487    new_path=`$CYGPATH -u "$path"`
19488  fi
19489  if test "x$new_path" = x; then
19490    # Oops. Which didn't find the executable.
19491    # The splitting of arguments from the executable at a space might have been incorrect,
19492    # since paths with space are more likely in Windows. Give it another try with the whole
19493    # argument.
19494    path="$complete"
19495    arguments="EOL"
19496    new_path=`$CYGPATH -u "$path"`
19497    new_path=`$WHICH "$new_path" 2> /dev/null`
19498    # bat and cmd files are not always considered executable in cygwin causing which
19499    # to not find them
19500    if test "x$new_path" = x \
19501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19503      new_path=`$CYGPATH -u "$path"`
19504    fi
19505    if test "x$new_path" = x; then
19506      # It's still not found. Now this is an unrecoverable error.
19507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19509      has_space=`$ECHO "$complete" | $GREP " "`
19510      if test "x$has_space" != x; then
19511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19513      fi
19514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19515    fi
19516  fi
19517
19518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19521  # "foo.exe" is OK but "foo" is an error.
19522  #
19523  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19524  # It is also a way to make sure we got the proper file name for the real test later on.
19525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19526  if test "x$test_shortpath" = x; then
19527    # Short path failed, file does not exist as specified.
19528    # Try adding .exe or .cmd
19529    if test -f "${new_path}.exe"; then
19530      input_to_shortpath="${new_path}.exe"
19531    elif test -f "${new_path}.cmd"; then
19532      input_to_shortpath="${new_path}.cmd"
19533    else
19534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19539    fi
19540  else
19541    input_to_shortpath="$new_path"
19542  fi
19543
19544  # Call helper function which possibly converts this using DOS-style short mode.
19545  # If so, the updated path is stored in $new_path.
19546  new_path="$input_to_shortpath"
19547
19548  input_path="$input_to_shortpath"
19549  # Check if we need to convert this using DOS-style short mode. If the path
19550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19551  # take no chances and rewrite it.
19552  # Note: m4 eats our [], so we need to use [ and ] instead.
19553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19554  if test "x$has_forbidden_chars" != x; then
19555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19559      # Going to short mode and back again did indeed matter. Since short mode is
19560      # case insensitive, let's make it lowercase to improve readability.
19561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19562      # Now convert it back to Unix-style (cygpath)
19563      input_path=`$CYGPATH -u "$shortmode_path"`
19564      new_path="$input_path"
19565    fi
19566  fi
19567
19568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19569  if test "x$test_cygdrive_prefix" = x; then
19570    # As a simple fix, exclude /usr/bin since it's not a real path.
19571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19573      # a path prefixed by /cygdrive for fixpath to work.
19574      new_path="$CYGWIN_ROOT_PATH$input_path"
19575    fi
19576  fi
19577
19578  # remove trailing .exe if any
19579  new_path="${new_path/%.exe/}"
19580
19581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19582
19583  # First separate the path from the arguments. This will split at the first
19584  # space.
19585  complete="$FOUND_MAKE"
19586  path="${complete%% *}"
19587  tmp="$complete EOL"
19588  arguments="${tmp#* }"
19589
19590  # Input might be given as Windows format, start by converting to
19591  # unix format.
19592  new_path="$path"
19593
19594  windows_path="$new_path"
19595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19596    unix_path=`$CYGPATH -u "$windows_path"`
19597    new_path="$unix_path"
19598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19600    new_path="$unix_path"
19601  fi
19602
19603
19604  # Now try to locate executable using which
19605  new_path=`$WHICH "$new_path" 2> /dev/null`
19606
19607  if test "x$new_path" = x; then
19608    # Oops. Which didn't find the executable.
19609    # The splitting of arguments from the executable at a space might have been incorrect,
19610    # since paths with space are more likely in Windows. Give it another try with the whole
19611    # argument.
19612    path="$complete"
19613    arguments="EOL"
19614    new_path="$path"
19615
19616  windows_path="$new_path"
19617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19618    unix_path=`$CYGPATH -u "$windows_path"`
19619    new_path="$unix_path"
19620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19622    new_path="$unix_path"
19623  fi
19624
19625
19626    new_path=`$WHICH "$new_path" 2> /dev/null`
19627    # bat and cmd files are not always considered executable in MSYS causing which
19628    # to not find them
19629    if test "x$new_path" = x \
19630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19632      new_path="$path"
19633
19634  windows_path="$new_path"
19635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19636    unix_path=`$CYGPATH -u "$windows_path"`
19637    new_path="$unix_path"
19638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19640    new_path="$unix_path"
19641  fi
19642
19643    fi
19644
19645    if test "x$new_path" = x; then
19646      # It's still not found. Now this is an unrecoverable error.
19647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19649      has_space=`$ECHO "$complete" | $GREP " "`
19650      if test "x$has_space" != x; then
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19653      fi
19654      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19655    fi
19656  fi
19657
19658  # Now new_path has a complete unix path to the binary
19659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19660    # Keep paths in /bin as-is, but remove trailing .exe if any
19661    new_path="${new_path/%.exe/}"
19662    # Do not save /bin paths to all_fixpath_prefixes!
19663  else
19664    # Not in mixed or Windows style, start by that.
19665    new_path=`cmd //c echo $new_path`
19666
19667  input_path="$new_path"
19668  # Check if we need to convert this using DOS-style short mode. If the path
19669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19670  # take no chances and rewrite it.
19671  # Note: m4 eats our [], so we need to use [ and ] instead.
19672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19673  if test "x$has_forbidden_chars" != x; then
19674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19676  fi
19677
19678    # Output is in $new_path
19679
19680  windows_path="$new_path"
19681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19682    unix_path=`$CYGPATH -u "$windows_path"`
19683    new_path="$unix_path"
19684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19686    new_path="$unix_path"
19687  fi
19688
19689    # remove trailing .exe if any
19690    new_path="${new_path/%.exe/}"
19691
19692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19694  fi
19695
19696    else
19697      # We're on a unix platform. Hooray! :)
19698      # First separate the path from the arguments. This will split at the first
19699      # space.
19700      complete="$FOUND_MAKE"
19701      path="${complete%% *}"
19702      tmp="$complete EOL"
19703      arguments="${tmp#* }"
19704
19705      # Cannot rely on the command "which" here since it doesn't always work.
19706      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19707      if test -z "$is_absolute_path"; then
19708        # Path to executable is not absolute. Find it.
19709        IFS_save="$IFS"
19710        IFS=:
19711        for p in $PATH; do
19712          if test -f "$p/$path" && test -x "$p/$path"; then
19713            new_path="$p/$path"
19714            break
19715          fi
19716        done
19717        IFS="$IFS_save"
19718      else
19719        # This is an absolute path, we can use it without further modifications.
19720        new_path="$path"
19721      fi
19722
19723      if test "x$new_path" = x; then
19724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19726        has_space=`$ECHO "$complete" | $GREP " "`
19727        if test "x$has_space" != x; then
19728          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19729$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19730        fi
19731        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19732      fi
19733    fi
19734
19735    # Now join together the path and the arguments once again
19736    if test "x$arguments" != xEOL; then
19737      new_complete="$new_path ${arguments% *}"
19738    else
19739      new_complete="$new_path"
19740    fi
19741
19742    if test "x$complete" != "x$new_complete"; then
19743      FOUND_MAKE="$new_complete"
19744      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19745$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19746    fi
19747  fi
19748
19749        fi
19750      fi
19751    fi
19752  fi
19753
19754
19755    if test "x$FOUND_MAKE" = x; then
19756      for ac_prog in make
19757do
19758  # Extract the first word of "$ac_prog", so it can be a program name with args.
19759set dummy $ac_prog; ac_word=$2
19760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19761$as_echo_n "checking for $ac_word... " >&6; }
19762if ${ac_cv_path_CHECK_MAKE+:} false; then :
19763  $as_echo_n "(cached) " >&6
19764else
19765  case $CHECK_MAKE in
19766  [\\/]* | ?:[\\/]*)
19767  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19768  ;;
19769  *)
19770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19771for as_dir in $PATH
19772do
19773  IFS=$as_save_IFS
19774  test -z "$as_dir" && as_dir=.
19775    for ac_exec_ext in '' $ac_executable_extensions; do
19776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19777    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19779    break 2
19780  fi
19781done
19782  done
19783IFS=$as_save_IFS
19784
19785  ;;
19786esac
19787fi
19788CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19789if test -n "$CHECK_MAKE"; then
19790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19791$as_echo "$CHECK_MAKE" >&6; }
19792else
19793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19794$as_echo "no" >&6; }
19795fi
19796
19797
19798  test -n "$CHECK_MAKE" && break
19799done
19800
19801
19802  MAKE_CANDIDATE=""$CHECK_MAKE""
19803  DESCRIPTION="make in PATH"
19804
19805  # On Cygwin, we require a newer version of make than on other platforms
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    MAKE_VERSION_EXPR="-e 4\."
19808    MAKE_REQUIRED_VERSION="4.0"
19809   else
19810    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19811    MAKE_REQUIRED_VERSION="3.81"
19812  fi
19813
19814  if test "x$MAKE_CANDIDATE" != x; then
19815    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19816$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19817    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19818    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19819    if test "x$IS_GNU_MAKE" = x; then
19820      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19821$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19822    else
19823      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19824      if test "x$IS_MODERN_MAKE" = x; then
19825        { $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
19826$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;}
19827      else
19828        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19829          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19830            MAKE_EXPECTED_ENV='cygwin'
19831          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19832            MAKE_EXPECTED_ENV='msys'
19833          else
19834            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19835          fi
19836          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19837          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19838        else
19839          # Not relevant for non-Windows
19840          IS_MAKE_CORRECT_ENV=true
19841        fi
19842        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19843          { $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
19844$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;}
19845        else
19846          FOUND_MAKE=$MAKE_CANDIDATE
19847
19848  # Only process if variable expands to non-empty
19849
19850  if test "x$FOUND_MAKE" != x; then
19851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19852
19853  # First separate the path from the arguments. This will split at the first
19854  # space.
19855  complete="$FOUND_MAKE"
19856  path="${complete%% *}"
19857  tmp="$complete EOL"
19858  arguments="${tmp#* }"
19859
19860  # Input might be given as Windows format, start by converting to
19861  # unix format.
19862  new_path=`$CYGPATH -u "$path"`
19863
19864  # Now try to locate executable using which
19865  new_path=`$WHICH "$new_path" 2> /dev/null`
19866  # bat and cmd files are not always considered executable in cygwin causing which
19867  # to not find them
19868  if test "x$new_path" = x \
19869      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19870      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19871    new_path=`$CYGPATH -u "$path"`
19872  fi
19873  if test "x$new_path" = x; then
19874    # Oops. Which didn't find the executable.
19875    # The splitting of arguments from the executable at a space might have been incorrect,
19876    # since paths with space are more likely in Windows. Give it another try with the whole
19877    # argument.
19878    path="$complete"
19879    arguments="EOL"
19880    new_path=`$CYGPATH -u "$path"`
19881    new_path=`$WHICH "$new_path" 2> /dev/null`
19882    # bat and cmd files are not always considered executable in cygwin causing which
19883    # to not find them
19884    if test "x$new_path" = x \
19885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19887      new_path=`$CYGPATH -u "$path"`
19888    fi
19889    if test "x$new_path" = x; then
19890      # It's still not found. Now this is an unrecoverable error.
19891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19893      has_space=`$ECHO "$complete" | $GREP " "`
19894      if test "x$has_space" != x; then
19895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19897      fi
19898      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19899    fi
19900  fi
19901
19902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19905  # "foo.exe" is OK but "foo" is an error.
19906  #
19907  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19908  # It is also a way to make sure we got the proper file name for the real test later on.
19909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19910  if test "x$test_shortpath" = x; then
19911    # Short path failed, file does not exist as specified.
19912    # Try adding .exe or .cmd
19913    if test -f "${new_path}.exe"; then
19914      input_to_shortpath="${new_path}.exe"
19915    elif test -f "${new_path}.cmd"; then
19916      input_to_shortpath="${new_path}.cmd"
19917    else
19918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19920      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19921$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19922      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19923    fi
19924  else
19925    input_to_shortpath="$new_path"
19926  fi
19927
19928  # Call helper function which possibly converts this using DOS-style short mode.
19929  # If so, the updated path is stored in $new_path.
19930  new_path="$input_to_shortpath"
19931
19932  input_path="$input_to_shortpath"
19933  # Check if we need to convert this using DOS-style short mode. If the path
19934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19935  # take no chances and rewrite it.
19936  # Note: m4 eats our [], so we need to use [ and ] instead.
19937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19938  if test "x$has_forbidden_chars" != x; then
19939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19943      # Going to short mode and back again did indeed matter. Since short mode is
19944      # case insensitive, let's make it lowercase to improve readability.
19945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19946      # Now convert it back to Unix-style (cygpath)
19947      input_path=`$CYGPATH -u "$shortmode_path"`
19948      new_path="$input_path"
19949    fi
19950  fi
19951
19952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19953  if test "x$test_cygdrive_prefix" = x; then
19954    # As a simple fix, exclude /usr/bin since it's not a real path.
19955    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19957      # a path prefixed by /cygdrive for fixpath to work.
19958      new_path="$CYGWIN_ROOT_PATH$input_path"
19959    fi
19960  fi
19961
19962  # remove trailing .exe if any
19963  new_path="${new_path/%.exe/}"
19964
19965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19966
19967  # First separate the path from the arguments. This will split at the first
19968  # space.
19969  complete="$FOUND_MAKE"
19970  path="${complete%% *}"
19971  tmp="$complete EOL"
19972  arguments="${tmp#* }"
19973
19974  # Input might be given as Windows format, start by converting to
19975  # unix format.
19976  new_path="$path"
19977
19978  windows_path="$new_path"
19979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19980    unix_path=`$CYGPATH -u "$windows_path"`
19981    new_path="$unix_path"
19982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19984    new_path="$unix_path"
19985  fi
19986
19987
19988  # Now try to locate executable using which
19989  new_path=`$WHICH "$new_path" 2> /dev/null`
19990
19991  if test "x$new_path" = x; then
19992    # Oops. Which didn't find the executable.
19993    # The splitting of arguments from the executable at a space might have been incorrect,
19994    # since paths with space are more likely in Windows. Give it another try with the whole
19995    # argument.
19996    path="$complete"
19997    arguments="EOL"
19998    new_path="$path"
19999
20000  windows_path="$new_path"
20001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20002    unix_path=`$CYGPATH -u "$windows_path"`
20003    new_path="$unix_path"
20004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20006    new_path="$unix_path"
20007  fi
20008
20009
20010    new_path=`$WHICH "$new_path" 2> /dev/null`
20011    # bat and cmd files are not always considered executable in MSYS causing which
20012    # to not find them
20013    if test "x$new_path" = x \
20014        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20015        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20016      new_path="$path"
20017
20018  windows_path="$new_path"
20019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20020    unix_path=`$CYGPATH -u "$windows_path"`
20021    new_path="$unix_path"
20022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20024    new_path="$unix_path"
20025  fi
20026
20027    fi
20028
20029    if test "x$new_path" = x; then
20030      # It's still not found. Now this is an unrecoverable error.
20031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20033      has_space=`$ECHO "$complete" | $GREP " "`
20034      if test "x$has_space" != x; then
20035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20037      fi
20038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20039    fi
20040  fi
20041
20042  # Now new_path has a complete unix path to the binary
20043  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20044    # Keep paths in /bin as-is, but remove trailing .exe if any
20045    new_path="${new_path/%.exe/}"
20046    # Do not save /bin paths to all_fixpath_prefixes!
20047  else
20048    # Not in mixed or Windows style, start by that.
20049    new_path=`cmd //c echo $new_path`
20050
20051  input_path="$new_path"
20052  # Check if we need to convert this using DOS-style short mode. If the path
20053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20054  # take no chances and rewrite it.
20055  # Note: m4 eats our [], so we need to use [ and ] instead.
20056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20057  if test "x$has_forbidden_chars" != x; then
20058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20060  fi
20061
20062    # Output is in $new_path
20063
20064  windows_path="$new_path"
20065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20066    unix_path=`$CYGPATH -u "$windows_path"`
20067    new_path="$unix_path"
20068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20070    new_path="$unix_path"
20071  fi
20072
20073    # remove trailing .exe if any
20074    new_path="${new_path/%.exe/}"
20075
20076    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20077    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20078  fi
20079
20080    else
20081      # We're on a unix platform. Hooray! :)
20082      # First separate the path from the arguments. This will split at the first
20083      # space.
20084      complete="$FOUND_MAKE"
20085      path="${complete%% *}"
20086      tmp="$complete EOL"
20087      arguments="${tmp#* }"
20088
20089      # Cannot rely on the command "which" here since it doesn't always work.
20090      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20091      if test -z "$is_absolute_path"; then
20092        # Path to executable is not absolute. Find it.
20093        IFS_save="$IFS"
20094        IFS=:
20095        for p in $PATH; do
20096          if test -f "$p/$path" && test -x "$p/$path"; then
20097            new_path="$p/$path"
20098            break
20099          fi
20100        done
20101        IFS="$IFS_save"
20102      else
20103        # This is an absolute path, we can use it without further modifications.
20104        new_path="$path"
20105      fi
20106
20107      if test "x$new_path" = x; then
20108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20110        has_space=`$ECHO "$complete" | $GREP " "`
20111        if test "x$has_space" != x; then
20112          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20113$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20114        fi
20115        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20116      fi
20117    fi
20118
20119    # Now join together the path and the arguments once again
20120    if test "x$arguments" != xEOL; then
20121      new_complete="$new_path ${arguments% *}"
20122    else
20123      new_complete="$new_path"
20124    fi
20125
20126    if test "x$complete" != "x$new_complete"; then
20127      FOUND_MAKE="$new_complete"
20128      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20129$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20130    fi
20131  fi
20132
20133        fi
20134      fi
20135    fi
20136  fi
20137
20138    fi
20139
20140    if test "x$FOUND_MAKE" = x; then
20141      if test "x$TOOLCHAIN_PATH" != x; then
20142        # We have a toolchain path, check that as well before giving up.
20143        OLD_PATH=$PATH
20144        PATH=$TOOLCHAIN_PATH:$PATH
20145        for ac_prog in gmake
20146do
20147  # Extract the first word of "$ac_prog", so it can be a program name with args.
20148set dummy $ac_prog; ac_word=$2
20149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20150$as_echo_n "checking for $ac_word... " >&6; }
20151if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20152  $as_echo_n "(cached) " >&6
20153else
20154  case $CHECK_TOOLSDIR_GMAKE in
20155  [\\/]* | ?:[\\/]*)
20156  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20157  ;;
20158  *)
20159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20160for as_dir in $PATH
20161do
20162  IFS=$as_save_IFS
20163  test -z "$as_dir" && as_dir=.
20164    for ac_exec_ext in '' $ac_executable_extensions; do
20165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20166    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20168    break 2
20169  fi
20170done
20171  done
20172IFS=$as_save_IFS
20173
20174  ;;
20175esac
20176fi
20177CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20178if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20180$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20181else
20182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20183$as_echo "no" >&6; }
20184fi
20185
20186
20187  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20188done
20189
20190
20191  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20192  DESCRIPTION="gmake in tools-dir"
20193
20194  # On Cygwin, we require a newer version of make than on other platforms
20195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20196    MAKE_VERSION_EXPR="-e 4\."
20197    MAKE_REQUIRED_VERSION="4.0"
20198   else
20199    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20200    MAKE_REQUIRED_VERSION="3.81"
20201  fi
20202
20203  if test "x$MAKE_CANDIDATE" != x; then
20204    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20205$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20206    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20207    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20208    if test "x$IS_GNU_MAKE" = x; then
20209      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20210$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20211    else
20212      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20213      if test "x$IS_MODERN_MAKE" = x; then
20214        { $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
20215$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;}
20216      else
20217        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20218          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20219            MAKE_EXPECTED_ENV='cygwin'
20220          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20221            MAKE_EXPECTED_ENV='msys'
20222          else
20223            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20224          fi
20225          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20226          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20227        else
20228          # Not relevant for non-Windows
20229          IS_MAKE_CORRECT_ENV=true
20230        fi
20231        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20232          { $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
20233$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;}
20234        else
20235          FOUND_MAKE=$MAKE_CANDIDATE
20236
20237  # Only process if variable expands to non-empty
20238
20239  if test "x$FOUND_MAKE" != x; then
20240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20241
20242  # First separate the path from the arguments. This will split at the first
20243  # space.
20244  complete="$FOUND_MAKE"
20245  path="${complete%% *}"
20246  tmp="$complete EOL"
20247  arguments="${tmp#* }"
20248
20249  # Input might be given as Windows format, start by converting to
20250  # unix format.
20251  new_path=`$CYGPATH -u "$path"`
20252
20253  # Now try to locate executable using which
20254  new_path=`$WHICH "$new_path" 2> /dev/null`
20255  # bat and cmd files are not always considered executable in cygwin causing which
20256  # to not find them
20257  if test "x$new_path" = x \
20258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20260    new_path=`$CYGPATH -u "$path"`
20261  fi
20262  if test "x$new_path" = x; then
20263    # Oops. Which didn't find the executable.
20264    # The splitting of arguments from the executable at a space might have been incorrect,
20265    # since paths with space are more likely in Windows. Give it another try with the whole
20266    # argument.
20267    path="$complete"
20268    arguments="EOL"
20269    new_path=`$CYGPATH -u "$path"`
20270    new_path=`$WHICH "$new_path" 2> /dev/null`
20271    # bat and cmd files are not always considered executable in cygwin causing which
20272    # to not find them
20273    if test "x$new_path" = x \
20274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20276      new_path=`$CYGPATH -u "$path"`
20277    fi
20278    if test "x$new_path" = x; then
20279      # It's still not found. Now this is an unrecoverable error.
20280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20282      has_space=`$ECHO "$complete" | $GREP " "`
20283      if test "x$has_space" != x; then
20284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20286      fi
20287      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20288    fi
20289  fi
20290
20291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20294  # "foo.exe" is OK but "foo" is an error.
20295  #
20296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20297  # It is also a way to make sure we got the proper file name for the real test later on.
20298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20299  if test "x$test_shortpath" = x; then
20300    # Short path failed, file does not exist as specified.
20301    # Try adding .exe or .cmd
20302    if test -f "${new_path}.exe"; then
20303      input_to_shortpath="${new_path}.exe"
20304    elif test -f "${new_path}.cmd"; then
20305      input_to_shortpath="${new_path}.cmd"
20306    else
20307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20308$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20311      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20312    fi
20313  else
20314    input_to_shortpath="$new_path"
20315  fi
20316
20317  # Call helper function which possibly converts this using DOS-style short mode.
20318  # If so, the updated path is stored in $new_path.
20319  new_path="$input_to_shortpath"
20320
20321  input_path="$input_to_shortpath"
20322  # Check if we need to convert this using DOS-style short mode. If the path
20323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20324  # take no chances and rewrite it.
20325  # Note: m4 eats our [], so we need to use [ and ] instead.
20326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20327  if test "x$has_forbidden_chars" != x; then
20328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20332      # Going to short mode and back again did indeed matter. Since short mode is
20333      # case insensitive, let's make it lowercase to improve readability.
20334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20335      # Now convert it back to Unix-style (cygpath)
20336      input_path=`$CYGPATH -u "$shortmode_path"`
20337      new_path="$input_path"
20338    fi
20339  fi
20340
20341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20342  if test "x$test_cygdrive_prefix" = x; then
20343    # As a simple fix, exclude /usr/bin since it's not a real path.
20344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20346      # a path prefixed by /cygdrive for fixpath to work.
20347      new_path="$CYGWIN_ROOT_PATH$input_path"
20348    fi
20349  fi
20350
20351  # remove trailing .exe if any
20352  new_path="${new_path/%.exe/}"
20353
20354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20355
20356  # First separate the path from the arguments. This will split at the first
20357  # space.
20358  complete="$FOUND_MAKE"
20359  path="${complete%% *}"
20360  tmp="$complete EOL"
20361  arguments="${tmp#* }"
20362
20363  # Input might be given as Windows format, start by converting to
20364  # unix format.
20365  new_path="$path"
20366
20367  windows_path="$new_path"
20368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20369    unix_path=`$CYGPATH -u "$windows_path"`
20370    new_path="$unix_path"
20371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20373    new_path="$unix_path"
20374  fi
20375
20376
20377  # Now try to locate executable using which
20378  new_path=`$WHICH "$new_path" 2> /dev/null`
20379
20380  if test "x$new_path" = x; then
20381    # Oops. Which didn't find the executable.
20382    # The splitting of arguments from the executable at a space might have been incorrect,
20383    # since paths with space are more likely in Windows. Give it another try with the whole
20384    # argument.
20385    path="$complete"
20386    arguments="EOL"
20387    new_path="$path"
20388
20389  windows_path="$new_path"
20390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20391    unix_path=`$CYGPATH -u "$windows_path"`
20392    new_path="$unix_path"
20393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20395    new_path="$unix_path"
20396  fi
20397
20398
20399    new_path=`$WHICH "$new_path" 2> /dev/null`
20400    # bat and cmd files are not always considered executable in MSYS causing which
20401    # to not find them
20402    if test "x$new_path" = x \
20403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20405      new_path="$path"
20406
20407  windows_path="$new_path"
20408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20409    unix_path=`$CYGPATH -u "$windows_path"`
20410    new_path="$unix_path"
20411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20413    new_path="$unix_path"
20414  fi
20415
20416    fi
20417
20418    if test "x$new_path" = x; then
20419      # It's still not found. Now this is an unrecoverable error.
20420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20421$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20422      has_space=`$ECHO "$complete" | $GREP " "`
20423      if test "x$has_space" != x; then
20424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20426      fi
20427      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20428    fi
20429  fi
20430
20431  # Now new_path has a complete unix path to the binary
20432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20433    # Keep paths in /bin as-is, but remove trailing .exe if any
20434    new_path="${new_path/%.exe/}"
20435    # Do not save /bin paths to all_fixpath_prefixes!
20436  else
20437    # Not in mixed or Windows style, start by that.
20438    new_path=`cmd //c echo $new_path`
20439
20440  input_path="$new_path"
20441  # Check if we need to convert this using DOS-style short mode. If the path
20442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20443  # take no chances and rewrite it.
20444  # Note: m4 eats our [], so we need to use [ and ] instead.
20445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20446  if test "x$has_forbidden_chars" != x; then
20447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20449  fi
20450
20451    # Output is in $new_path
20452
20453  windows_path="$new_path"
20454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20455    unix_path=`$CYGPATH -u "$windows_path"`
20456    new_path="$unix_path"
20457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20459    new_path="$unix_path"
20460  fi
20461
20462    # remove trailing .exe if any
20463    new_path="${new_path/%.exe/}"
20464
20465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20467  fi
20468
20469    else
20470      # We're on a unix platform. Hooray! :)
20471      # First separate the path from the arguments. This will split at the first
20472      # space.
20473      complete="$FOUND_MAKE"
20474      path="${complete%% *}"
20475      tmp="$complete EOL"
20476      arguments="${tmp#* }"
20477
20478      # Cannot rely on the command "which" here since it doesn't always work.
20479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20480      if test -z "$is_absolute_path"; then
20481        # Path to executable is not absolute. Find it.
20482        IFS_save="$IFS"
20483        IFS=:
20484        for p in $PATH; do
20485          if test -f "$p/$path" && test -x "$p/$path"; then
20486            new_path="$p/$path"
20487            break
20488          fi
20489        done
20490        IFS="$IFS_save"
20491      else
20492        # This is an absolute path, we can use it without further modifications.
20493        new_path="$path"
20494      fi
20495
20496      if test "x$new_path" = x; then
20497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20498$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20499        has_space=`$ECHO "$complete" | $GREP " "`
20500        if test "x$has_space" != x; then
20501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20503        fi
20504        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20505      fi
20506    fi
20507
20508    # Now join together the path and the arguments once again
20509    if test "x$arguments" != xEOL; then
20510      new_complete="$new_path ${arguments% *}"
20511    else
20512      new_complete="$new_path"
20513    fi
20514
20515    if test "x$complete" != "x$new_complete"; then
20516      FOUND_MAKE="$new_complete"
20517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20518$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20519    fi
20520  fi
20521
20522        fi
20523      fi
20524    fi
20525  fi
20526
20527        if test "x$FOUND_MAKE" = x; then
20528          for ac_prog in make
20529do
20530  # Extract the first word of "$ac_prog", so it can be a program name with args.
20531set dummy $ac_prog; ac_word=$2
20532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20533$as_echo_n "checking for $ac_word... " >&6; }
20534if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20535  $as_echo_n "(cached) " >&6
20536else
20537  case $CHECK_TOOLSDIR_MAKE in
20538  [\\/]* | ?:[\\/]*)
20539  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20540  ;;
20541  *)
20542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20543for as_dir in $PATH
20544do
20545  IFS=$as_save_IFS
20546  test -z "$as_dir" && as_dir=.
20547    for ac_exec_ext in '' $ac_executable_extensions; do
20548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20549    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20551    break 2
20552  fi
20553done
20554  done
20555IFS=$as_save_IFS
20556
20557  ;;
20558esac
20559fi
20560CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20561if test -n "$CHECK_TOOLSDIR_MAKE"; then
20562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20563$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20564else
20565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20566$as_echo "no" >&6; }
20567fi
20568
20569
20570  test -n "$CHECK_TOOLSDIR_MAKE" && break
20571done
20572
20573
20574  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20575  DESCRIPTION="make in tools-dir"
20576
20577  # On Cygwin, we require a newer version of make than on other platforms
20578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20579    MAKE_VERSION_EXPR="-e 4\."
20580    MAKE_REQUIRED_VERSION="4.0"
20581   else
20582    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20583    MAKE_REQUIRED_VERSION="3.81"
20584  fi
20585
20586  if test "x$MAKE_CANDIDATE" != x; then
20587    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20588$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20589    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20590    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20591    if test "x$IS_GNU_MAKE" = x; then
20592      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20593$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20594    else
20595      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20596      if test "x$IS_MODERN_MAKE" = x; then
20597        { $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
20598$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;}
20599      else
20600        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20601          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20602            MAKE_EXPECTED_ENV='cygwin'
20603          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20604            MAKE_EXPECTED_ENV='msys'
20605          else
20606            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20607          fi
20608          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20609          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20610        else
20611          # Not relevant for non-Windows
20612          IS_MAKE_CORRECT_ENV=true
20613        fi
20614        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20615          { $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
20616$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;}
20617        else
20618          FOUND_MAKE=$MAKE_CANDIDATE
20619
20620  # Only process if variable expands to non-empty
20621
20622  if test "x$FOUND_MAKE" != x; then
20623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20624
20625  # First separate the path from the arguments. This will split at the first
20626  # space.
20627  complete="$FOUND_MAKE"
20628  path="${complete%% *}"
20629  tmp="$complete EOL"
20630  arguments="${tmp#* }"
20631
20632  # Input might be given as Windows format, start by converting to
20633  # unix format.
20634  new_path=`$CYGPATH -u "$path"`
20635
20636  # Now try to locate executable using which
20637  new_path=`$WHICH "$new_path" 2> /dev/null`
20638  # bat and cmd files are not always considered executable in cygwin causing which
20639  # to not find them
20640  if test "x$new_path" = x \
20641      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20642      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20643    new_path=`$CYGPATH -u "$path"`
20644  fi
20645  if test "x$new_path" = x; then
20646    # Oops. Which didn't find the executable.
20647    # The splitting of arguments from the executable at a space might have been incorrect,
20648    # since paths with space are more likely in Windows. Give it another try with the whole
20649    # argument.
20650    path="$complete"
20651    arguments="EOL"
20652    new_path=`$CYGPATH -u "$path"`
20653    new_path=`$WHICH "$new_path" 2> /dev/null`
20654    # bat and cmd files are not always considered executable in cygwin causing which
20655    # to not find them
20656    if test "x$new_path" = x \
20657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20659      new_path=`$CYGPATH -u "$path"`
20660    fi
20661    if test "x$new_path" = x; then
20662      # It's still not found. Now this is an unrecoverable error.
20663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20665      has_space=`$ECHO "$complete" | $GREP " "`
20666      if test "x$has_space" != x; then
20667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20669      fi
20670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20671    fi
20672  fi
20673
20674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20677  # "foo.exe" is OK but "foo" is an error.
20678  #
20679  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20680  # It is also a way to make sure we got the proper file name for the real test later on.
20681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20682  if test "x$test_shortpath" = x; then
20683    # Short path failed, file does not exist as specified.
20684    # Try adding .exe or .cmd
20685    if test -f "${new_path}.exe"; then
20686      input_to_shortpath="${new_path}.exe"
20687    elif test -f "${new_path}.cmd"; then
20688      input_to_shortpath="${new_path}.cmd"
20689    else
20690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20691$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20695    fi
20696  else
20697    input_to_shortpath="$new_path"
20698  fi
20699
20700  # Call helper function which possibly converts this using DOS-style short mode.
20701  # If so, the updated path is stored in $new_path.
20702  new_path="$input_to_shortpath"
20703
20704  input_path="$input_to_shortpath"
20705  # Check if we need to convert this using DOS-style short mode. If the path
20706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20707  # take no chances and rewrite it.
20708  # Note: m4 eats our [], so we need to use [ and ] instead.
20709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20710  if test "x$has_forbidden_chars" != x; then
20711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20715      # Going to short mode and back again did indeed matter. Since short mode is
20716      # case insensitive, let's make it lowercase to improve readability.
20717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20718      # Now convert it back to Unix-style (cygpath)
20719      input_path=`$CYGPATH -u "$shortmode_path"`
20720      new_path="$input_path"
20721    fi
20722  fi
20723
20724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20725  if test "x$test_cygdrive_prefix" = x; then
20726    # As a simple fix, exclude /usr/bin since it's not a real path.
20727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20729      # a path prefixed by /cygdrive for fixpath to work.
20730      new_path="$CYGWIN_ROOT_PATH$input_path"
20731    fi
20732  fi
20733
20734  # remove trailing .exe if any
20735  new_path="${new_path/%.exe/}"
20736
20737    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20738
20739  # First separate the path from the arguments. This will split at the first
20740  # space.
20741  complete="$FOUND_MAKE"
20742  path="${complete%% *}"
20743  tmp="$complete EOL"
20744  arguments="${tmp#* }"
20745
20746  # Input might be given as Windows format, start by converting to
20747  # unix format.
20748  new_path="$path"
20749
20750  windows_path="$new_path"
20751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20752    unix_path=`$CYGPATH -u "$windows_path"`
20753    new_path="$unix_path"
20754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20756    new_path="$unix_path"
20757  fi
20758
20759
20760  # Now try to locate executable using which
20761  new_path=`$WHICH "$new_path" 2> /dev/null`
20762
20763  if test "x$new_path" = x; then
20764    # Oops. Which didn't find the executable.
20765    # The splitting of arguments from the executable at a space might have been incorrect,
20766    # since paths with space are more likely in Windows. Give it another try with the whole
20767    # argument.
20768    path="$complete"
20769    arguments="EOL"
20770    new_path="$path"
20771
20772  windows_path="$new_path"
20773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20774    unix_path=`$CYGPATH -u "$windows_path"`
20775    new_path="$unix_path"
20776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20778    new_path="$unix_path"
20779  fi
20780
20781
20782    new_path=`$WHICH "$new_path" 2> /dev/null`
20783    # bat and cmd files are not always considered executable in MSYS causing which
20784    # to not find them
20785    if test "x$new_path" = x \
20786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20788      new_path="$path"
20789
20790  windows_path="$new_path"
20791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20792    unix_path=`$CYGPATH -u "$windows_path"`
20793    new_path="$unix_path"
20794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20796    new_path="$unix_path"
20797  fi
20798
20799    fi
20800
20801    if test "x$new_path" = x; then
20802      # It's still not found. Now this is an unrecoverable error.
20803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20804$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20805      has_space=`$ECHO "$complete" | $GREP " "`
20806      if test "x$has_space" != x; then
20807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20809      fi
20810      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20811    fi
20812  fi
20813
20814  # Now new_path has a complete unix path to the binary
20815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20816    # Keep paths in /bin as-is, but remove trailing .exe if any
20817    new_path="${new_path/%.exe/}"
20818    # Do not save /bin paths to all_fixpath_prefixes!
20819  else
20820    # Not in mixed or Windows style, start by that.
20821    new_path=`cmd //c echo $new_path`
20822
20823  input_path="$new_path"
20824  # Check if we need to convert this using DOS-style short mode. If the path
20825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20826  # take no chances and rewrite it.
20827  # Note: m4 eats our [], so we need to use [ and ] instead.
20828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20829  if test "x$has_forbidden_chars" != x; then
20830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20832  fi
20833
20834    # Output is in $new_path
20835
20836  windows_path="$new_path"
20837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20838    unix_path=`$CYGPATH -u "$windows_path"`
20839    new_path="$unix_path"
20840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20842    new_path="$unix_path"
20843  fi
20844
20845    # remove trailing .exe if any
20846    new_path="${new_path/%.exe/}"
20847
20848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20850  fi
20851
20852    else
20853      # We're on a unix platform. Hooray! :)
20854      # First separate the path from the arguments. This will split at the first
20855      # space.
20856      complete="$FOUND_MAKE"
20857      path="${complete%% *}"
20858      tmp="$complete EOL"
20859      arguments="${tmp#* }"
20860
20861      # Cannot rely on the command "which" here since it doesn't always work.
20862      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20863      if test -z "$is_absolute_path"; then
20864        # Path to executable is not absolute. Find it.
20865        IFS_save="$IFS"
20866        IFS=:
20867        for p in $PATH; do
20868          if test -f "$p/$path" && test -x "$p/$path"; then
20869            new_path="$p/$path"
20870            break
20871          fi
20872        done
20873        IFS="$IFS_save"
20874      else
20875        # This is an absolute path, we can use it without further modifications.
20876        new_path="$path"
20877      fi
20878
20879      if test "x$new_path" = x; then
20880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20882        has_space=`$ECHO "$complete" | $GREP " "`
20883        if test "x$has_space" != x; then
20884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20886        fi
20887        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20888      fi
20889    fi
20890
20891    # Now join together the path and the arguments once again
20892    if test "x$arguments" != xEOL; then
20893      new_complete="$new_path ${arguments% *}"
20894    else
20895      new_complete="$new_path"
20896    fi
20897
20898    if test "x$complete" != "x$new_complete"; then
20899      FOUND_MAKE="$new_complete"
20900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20901$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20902    fi
20903  fi
20904
20905        fi
20906      fi
20907    fi
20908  fi
20909
20910        fi
20911        PATH=$OLD_PATH
20912      fi
20913    fi
20914
20915    if test "x$FOUND_MAKE" = x; then
20916      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
20917    fi
20918
20919    else
20920      # If it succeeded, then it was overridden by the user. We will use it
20921      # for the tool.
20922
20923      # First remove it from the list of overridden variables, so we can test
20924      # for unknown variables in the end.
20925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20926
20927      # Check if we try to supply an empty value
20928      if test "x$MAKE" = x; then
20929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20930$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20932$as_echo_n "checking for MAKE... " >&6; }
20933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20934$as_echo "disabled" >&6; }
20935      else
20936        # Check if the provided tool contains a complete path.
20937        tool_specified="$MAKE"
20938        tool_basename="${tool_specified##*/}"
20939        if test "x$tool_basename" = "x$tool_specified"; then
20940          # A command without a complete path is provided, search $PATH.
20941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20942$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20943          # Extract the first word of "$tool_basename", so it can be a program name with args.
20944set dummy $tool_basename; ac_word=$2
20945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20946$as_echo_n "checking for $ac_word... " >&6; }
20947if ${ac_cv_path_MAKE+:} false; then :
20948  $as_echo_n "(cached) " >&6
20949else
20950  case $MAKE in
20951  [\\/]* | ?:[\\/]*)
20952  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20953  ;;
20954  *)
20955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20956for as_dir in $PATH
20957do
20958  IFS=$as_save_IFS
20959  test -z "$as_dir" && as_dir=.
20960    for ac_exec_ext in '' $ac_executable_extensions; do
20961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20962    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20964    break 2
20965  fi
20966done
20967  done
20968IFS=$as_save_IFS
20969
20970  ;;
20971esac
20972fi
20973MAKE=$ac_cv_path_MAKE
20974if test -n "$MAKE"; then
20975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20976$as_echo "$MAKE" >&6; }
20977else
20978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20979$as_echo "no" >&6; }
20980fi
20981
20982
20983          if test "x$MAKE" = x; then
20984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20985          fi
20986        else
20987          # Otherwise we believe it is a complete path. Use it as it is.
20988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20989$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20991$as_echo_n "checking for MAKE... " >&6; }
20992          if test ! -x "$tool_specified"; then
20993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20994$as_echo "not found" >&6; }
20995            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20996          fi
20997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20998$as_echo "$tool_specified" >&6; }
20999        fi
21000      fi
21001    fi
21002
21003    # If MAKE was set by user, verify the version
21004
21005  MAKE_CANDIDATE=""$MAKE""
21006  DESCRIPTION="user supplied MAKE=$MAKE"
21007
21008  # On Cygwin, we require a newer version of make than on other platforms
21009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21010    MAKE_VERSION_EXPR="-e 4\."
21011    MAKE_REQUIRED_VERSION="4.0"
21012   else
21013    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21014    MAKE_REQUIRED_VERSION="3.81"
21015  fi
21016
21017  if test "x$MAKE_CANDIDATE" != x; then
21018    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21019$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21020    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21021    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21022    if test "x$IS_GNU_MAKE" = x; then
21023      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21024$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21025    else
21026      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21027      if test "x$IS_MODERN_MAKE" = x; then
21028        { $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
21029$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;}
21030      else
21031        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21032          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21033            MAKE_EXPECTED_ENV='cygwin'
21034          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21035            MAKE_EXPECTED_ENV='msys'
21036          else
21037            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21038          fi
21039          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21040          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21041        else
21042          # Not relevant for non-Windows
21043          IS_MAKE_CORRECT_ENV=true
21044        fi
21045        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21046          { $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
21047$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;}
21048        else
21049          FOUND_MAKE=$MAKE_CANDIDATE
21050
21051  # Only process if variable expands to non-empty
21052
21053  if test "x$FOUND_MAKE" != x; then
21054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21055
21056  # First separate the path from the arguments. This will split at the first
21057  # space.
21058  complete="$FOUND_MAKE"
21059  path="${complete%% *}"
21060  tmp="$complete EOL"
21061  arguments="${tmp#* }"
21062
21063  # Input might be given as Windows format, start by converting to
21064  # unix format.
21065  new_path=`$CYGPATH -u "$path"`
21066
21067  # Now try to locate executable using which
21068  new_path=`$WHICH "$new_path" 2> /dev/null`
21069  # bat and cmd files are not always considered executable in cygwin causing which
21070  # to not find them
21071  if test "x$new_path" = x \
21072      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21073      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21074    new_path=`$CYGPATH -u "$path"`
21075  fi
21076  if test "x$new_path" = x; then
21077    # Oops. Which didn't find the executable.
21078    # The splitting of arguments from the executable at a space might have been incorrect,
21079    # since paths with space are more likely in Windows. Give it another try with the whole
21080    # argument.
21081    path="$complete"
21082    arguments="EOL"
21083    new_path=`$CYGPATH -u "$path"`
21084    new_path=`$WHICH "$new_path" 2> /dev/null`
21085    # bat and cmd files are not always considered executable in cygwin causing which
21086    # to not find them
21087    if test "x$new_path" = x \
21088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21090      new_path=`$CYGPATH -u "$path"`
21091    fi
21092    if test "x$new_path" = x; then
21093      # It's still not found. Now this is an unrecoverable error.
21094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21095$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21096      has_space=`$ECHO "$complete" | $GREP " "`
21097      if test "x$has_space" != x; then
21098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21100      fi
21101      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21102    fi
21103  fi
21104
21105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21108  # "foo.exe" is OK but "foo" is an error.
21109  #
21110  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21111  # It is also a way to make sure we got the proper file name for the real test later on.
21112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21113  if test "x$test_shortpath" = x; then
21114    # Short path failed, file does not exist as specified.
21115    # Try adding .exe or .cmd
21116    if test -f "${new_path}.exe"; then
21117      input_to_shortpath="${new_path}.exe"
21118    elif test -f "${new_path}.cmd"; then
21119      input_to_shortpath="${new_path}.cmd"
21120    else
21121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21122$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21123      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21124$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21126    fi
21127  else
21128    input_to_shortpath="$new_path"
21129  fi
21130
21131  # Call helper function which possibly converts this using DOS-style short mode.
21132  # If so, the updated path is stored in $new_path.
21133  new_path="$input_to_shortpath"
21134
21135  input_path="$input_to_shortpath"
21136  # Check if we need to convert this using DOS-style short mode. If the path
21137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21138  # take no chances and rewrite it.
21139  # Note: m4 eats our [], so we need to use [ and ] instead.
21140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21141  if test "x$has_forbidden_chars" != x; then
21142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21146      # Going to short mode and back again did indeed matter. Since short mode is
21147      # case insensitive, let's make it lowercase to improve readability.
21148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21149      # Now convert it back to Unix-style (cygpath)
21150      input_path=`$CYGPATH -u "$shortmode_path"`
21151      new_path="$input_path"
21152    fi
21153  fi
21154
21155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21156  if test "x$test_cygdrive_prefix" = x; then
21157    # As a simple fix, exclude /usr/bin since it's not a real path.
21158    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21160      # a path prefixed by /cygdrive for fixpath to work.
21161      new_path="$CYGWIN_ROOT_PATH$input_path"
21162    fi
21163  fi
21164
21165  # remove trailing .exe if any
21166  new_path="${new_path/%.exe/}"
21167
21168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21169
21170  # First separate the path from the arguments. This will split at the first
21171  # space.
21172  complete="$FOUND_MAKE"
21173  path="${complete%% *}"
21174  tmp="$complete EOL"
21175  arguments="${tmp#* }"
21176
21177  # Input might be given as Windows format, start by converting to
21178  # unix format.
21179  new_path="$path"
21180
21181  windows_path="$new_path"
21182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21183    unix_path=`$CYGPATH -u "$windows_path"`
21184    new_path="$unix_path"
21185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21187    new_path="$unix_path"
21188  fi
21189
21190
21191  # Now try to locate executable using which
21192  new_path=`$WHICH "$new_path" 2> /dev/null`
21193
21194  if test "x$new_path" = x; then
21195    # Oops. Which didn't find the executable.
21196    # The splitting of arguments from the executable at a space might have been incorrect,
21197    # since paths with space are more likely in Windows. Give it another try with the whole
21198    # argument.
21199    path="$complete"
21200    arguments="EOL"
21201    new_path="$path"
21202
21203  windows_path="$new_path"
21204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21205    unix_path=`$CYGPATH -u "$windows_path"`
21206    new_path="$unix_path"
21207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21209    new_path="$unix_path"
21210  fi
21211
21212
21213    new_path=`$WHICH "$new_path" 2> /dev/null`
21214    # bat and cmd files are not always considered executable in MSYS causing which
21215    # to not find them
21216    if test "x$new_path" = x \
21217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21219      new_path="$path"
21220
21221  windows_path="$new_path"
21222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21223    unix_path=`$CYGPATH -u "$windows_path"`
21224    new_path="$unix_path"
21225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21227    new_path="$unix_path"
21228  fi
21229
21230    fi
21231
21232    if test "x$new_path" = x; then
21233      # It's still not found. Now this is an unrecoverable error.
21234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21235$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21236      has_space=`$ECHO "$complete" | $GREP " "`
21237      if test "x$has_space" != x; then
21238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21240      fi
21241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21242    fi
21243  fi
21244
21245  # Now new_path has a complete unix path to the binary
21246  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21247    # Keep paths in /bin as-is, but remove trailing .exe if any
21248    new_path="${new_path/%.exe/}"
21249    # Do not save /bin paths to all_fixpath_prefixes!
21250  else
21251    # Not in mixed or Windows style, start by that.
21252    new_path=`cmd //c echo $new_path`
21253
21254  input_path="$new_path"
21255  # Check if we need to convert this using DOS-style short mode. If the path
21256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21257  # take no chances and rewrite it.
21258  # Note: m4 eats our [], so we need to use [ and ] instead.
21259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21260  if test "x$has_forbidden_chars" != x; then
21261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21263  fi
21264
21265    # Output is in $new_path
21266
21267  windows_path="$new_path"
21268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21269    unix_path=`$CYGPATH -u "$windows_path"`
21270    new_path="$unix_path"
21271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21273    new_path="$unix_path"
21274  fi
21275
21276    # remove trailing .exe if any
21277    new_path="${new_path/%.exe/}"
21278
21279    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21280    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21281  fi
21282
21283    else
21284      # We're on a unix platform. Hooray! :)
21285      # First separate the path from the arguments. This will split at the first
21286      # space.
21287      complete="$FOUND_MAKE"
21288      path="${complete%% *}"
21289      tmp="$complete EOL"
21290      arguments="${tmp#* }"
21291
21292      # Cannot rely on the command "which" here since it doesn't always work.
21293      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21294      if test -z "$is_absolute_path"; then
21295        # Path to executable is not absolute. Find it.
21296        IFS_save="$IFS"
21297        IFS=:
21298        for p in $PATH; do
21299          if test -f "$p/$path" && test -x "$p/$path"; then
21300            new_path="$p/$path"
21301            break
21302          fi
21303        done
21304        IFS="$IFS_save"
21305      else
21306        # This is an absolute path, we can use it without further modifications.
21307        new_path="$path"
21308      fi
21309
21310      if test "x$new_path" = x; then
21311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21312$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21313        has_space=`$ECHO "$complete" | $GREP " "`
21314        if test "x$has_space" != x; then
21315          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21316$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21317        fi
21318        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21319      fi
21320    fi
21321
21322    # Now join together the path and the arguments once again
21323    if test "x$arguments" != xEOL; then
21324      new_complete="$new_path ${arguments% *}"
21325    else
21326      new_complete="$new_path"
21327    fi
21328
21329    if test "x$complete" != "x$new_complete"; then
21330      FOUND_MAKE="$new_complete"
21331      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21332$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21333    fi
21334  fi
21335
21336        fi
21337      fi
21338    fi
21339  fi
21340
21341    if test "x$FOUND_MAKE" = x; then
21342      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21343    fi
21344
21345  fi
21346
21347
21348  MAKE=$FOUND_MAKE
21349
21350  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21351$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21352
21353
21354  # Check if make supports the output sync option and if so, setup using it.
21355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21356$as_echo_n "checking if make --output-sync is supported... " >&6; }
21357  if $MAKE --version -O > /dev/null 2>&1; then
21358    OUTPUT_SYNC_SUPPORTED=true
21359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21360$as_echo "yes" >&6; }
21361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21362$as_echo_n "checking for output-sync value... " >&6; }
21363
21364# Check whether --with-output-sync was given.
21365if test "${with_output_sync+set}" = set; then :
21366  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21367fi
21368
21369    if test "x$OUTPUT_SYNC" = "x"; then
21370      OUTPUT_SYNC=none
21371    fi
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21373$as_echo "$OUTPUT_SYNC" >&6; }
21374    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21375      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21376    fi
21377  else
21378    OUTPUT_SYNC_SUPPORTED=false
21379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21380$as_echo "no" >&6; }
21381  fi
21382
21383
21384
21385
21386
21387
21388  # Test if find supports -delete
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21390$as_echo_n "checking if find supports -delete... " >&6; }
21391  FIND_DELETE="-delete"
21392
21393  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21394
21395  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21396
21397  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21398  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21399    # No, it does not.
21400    $RM $DELETEDIR/TestIfFindSupportsDelete
21401    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21402      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21403      FIND_DELETE="-print | $XARGS $RM"
21404    else
21405      FIND_DELETE="-exec $RM \{\} \+"
21406    fi
21407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21408$as_echo "no" >&6; }
21409  else
21410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21411$as_echo "yes" >&6; }
21412  fi
21413  $RMDIR $DELETEDIR
21414
21415
21416
21417  # Test which kind of tar was found
21418  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21419    TAR_TYPE="gnu"
21420  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21421    TAR_TYPE="bsd"
21422  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21423    TAR_TYPE="bsd"
21424  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21425    TAR_TYPE="solaris"
21426  fi
21427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21428$as_echo_n "checking what type of tar was found... " >&6; }
21429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21430$as_echo "$TAR_TYPE" >&6; }
21431
21432  TAR_CREATE_FILE_PARAM=""
21433
21434  if test "x$TAR_TYPE" = "xgnu"; then
21435    TAR_INCLUDE_PARAM="T"
21436    TAR_SUPPORTS_TRANSFORM="true"
21437    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21438      # When using gnu tar for Solaris targets, need to use compatibility mode
21439      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21440    fi
21441  else
21442    TAR_INCLUDE_PARAM="I"
21443    TAR_SUPPORTS_TRANSFORM="false"
21444  fi
21445
21446
21447
21448
21449
21450
21451  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21452  # This is a problem for the grep resident on AIX.
21453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21454$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21455  # Multiple subsequent spaces..
21456  STACK_SPACES='aaa   bbb   ccc'
21457  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21458  # patterns in it.
21459  STACK_LIST=${STACK_SPACES// /$'\n'}
21460  NEEDLE_SPACES='ccc bbb aaa'
21461  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21462  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21463  if test "x$RESULT" == "x"; then
21464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21465$as_echo "yes" >&6; }
21466  else
21467    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21468      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21469    fi
21470    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21471  fi
21472
21473
21474  # These tools might not be installed by default,
21475  # need hint on how to install them.
21476
21477
21478
21479  # Publish this variable in the help.
21480
21481
21482  if [ -z "${UNZIP+x}" ]; then
21483    # The variable is not set by user, try to locate tool using the code snippet
21484    for ac_prog in unzip
21485do
21486  # Extract the first word of "$ac_prog", so it can be a program name with args.
21487set dummy $ac_prog; ac_word=$2
21488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21489$as_echo_n "checking for $ac_word... " >&6; }
21490if ${ac_cv_path_UNZIP+:} false; then :
21491  $as_echo_n "(cached) " >&6
21492else
21493  case $UNZIP in
21494  [\\/]* | ?:[\\/]*)
21495  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21496  ;;
21497  *)
21498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21499for as_dir in $PATH
21500do
21501  IFS=$as_save_IFS
21502  test -z "$as_dir" && as_dir=.
21503    for ac_exec_ext in '' $ac_executable_extensions; do
21504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21505    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21507    break 2
21508  fi
21509done
21510  done
21511IFS=$as_save_IFS
21512
21513  ;;
21514esac
21515fi
21516UNZIP=$ac_cv_path_UNZIP
21517if test -n "$UNZIP"; then
21518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21519$as_echo "$UNZIP" >&6; }
21520else
21521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21522$as_echo "no" >&6; }
21523fi
21524
21525
21526  test -n "$UNZIP" && break
21527done
21528
21529  else
21530    # The variable is set, but is it from the command line or the environment?
21531
21532    # Try to remove the string !UNZIP! from our list.
21533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21535      # If it failed, the variable was not from the command line. Ignore it,
21536      # but warn the user (except for BASH, which is always set by the calling BASH).
21537      if test "xUNZIP" != xBASH; then
21538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21539$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21540      fi
21541      # Try to locate tool using the code snippet
21542      for ac_prog in unzip
21543do
21544  # Extract the first word of "$ac_prog", so it can be a program name with args.
21545set dummy $ac_prog; ac_word=$2
21546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21547$as_echo_n "checking for $ac_word... " >&6; }
21548if ${ac_cv_path_UNZIP+:} false; then :
21549  $as_echo_n "(cached) " >&6
21550else
21551  case $UNZIP in
21552  [\\/]* | ?:[\\/]*)
21553  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21554  ;;
21555  *)
21556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21557for as_dir in $PATH
21558do
21559  IFS=$as_save_IFS
21560  test -z "$as_dir" && as_dir=.
21561    for ac_exec_ext in '' $ac_executable_extensions; do
21562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21563    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21565    break 2
21566  fi
21567done
21568  done
21569IFS=$as_save_IFS
21570
21571  ;;
21572esac
21573fi
21574UNZIP=$ac_cv_path_UNZIP
21575if test -n "$UNZIP"; then
21576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21577$as_echo "$UNZIP" >&6; }
21578else
21579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21580$as_echo "no" >&6; }
21581fi
21582
21583
21584  test -n "$UNZIP" && break
21585done
21586
21587    else
21588      # If it succeeded, then it was overridden by the user. We will use it
21589      # for the tool.
21590
21591      # First remove it from the list of overridden variables, so we can test
21592      # for unknown variables in the end.
21593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21594
21595      # Check if we try to supply an empty value
21596      if test "x$UNZIP" = x; then
21597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21598$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21600$as_echo_n "checking for UNZIP... " >&6; }
21601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21602$as_echo "disabled" >&6; }
21603      else
21604        # Check if the provided tool contains a complete path.
21605        tool_specified="$UNZIP"
21606        tool_basename="${tool_specified##*/}"
21607        if test "x$tool_basename" = "x$tool_specified"; then
21608          # A command without a complete path is provided, search $PATH.
21609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21610$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21611          # Extract the first word of "$tool_basename", so it can be a program name with args.
21612set dummy $tool_basename; ac_word=$2
21613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21614$as_echo_n "checking for $ac_word... " >&6; }
21615if ${ac_cv_path_UNZIP+:} false; then :
21616  $as_echo_n "(cached) " >&6
21617else
21618  case $UNZIP in
21619  [\\/]* | ?:[\\/]*)
21620  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21621  ;;
21622  *)
21623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21624for as_dir in $PATH
21625do
21626  IFS=$as_save_IFS
21627  test -z "$as_dir" && as_dir=.
21628    for ac_exec_ext in '' $ac_executable_extensions; do
21629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21630    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21632    break 2
21633  fi
21634done
21635  done
21636IFS=$as_save_IFS
21637
21638  ;;
21639esac
21640fi
21641UNZIP=$ac_cv_path_UNZIP
21642if test -n "$UNZIP"; then
21643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21644$as_echo "$UNZIP" >&6; }
21645else
21646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21647$as_echo "no" >&6; }
21648fi
21649
21650
21651          if test "x$UNZIP" = x; then
21652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21653          fi
21654        else
21655          # Otherwise we believe it is a complete path. Use it as it is.
21656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21657$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21659$as_echo_n "checking for UNZIP... " >&6; }
21660          if test ! -x "$tool_specified"; then
21661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21662$as_echo "not found" >&6; }
21663            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21664          fi
21665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21666$as_echo "$tool_specified" >&6; }
21667        fi
21668      fi
21669    fi
21670
21671  fi
21672
21673
21674
21675  if test "x$UNZIP" = x; then
21676    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21677  fi
21678
21679
21680  # Since zip uses "ZIP" as a environment variable for passing options, we need
21681  # to name our variable differently, hence ZIPEXE.
21682
21683
21684
21685  # Publish this variable in the help.
21686
21687
21688  if [ -z "${ZIPEXE+x}" ]; then
21689    # The variable is not set by user, try to locate tool using the code snippet
21690    for ac_prog in zip
21691do
21692  # Extract the first word of "$ac_prog", so it can be a program name with args.
21693set dummy $ac_prog; ac_word=$2
21694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21695$as_echo_n "checking for $ac_word... " >&6; }
21696if ${ac_cv_path_ZIPEXE+:} false; then :
21697  $as_echo_n "(cached) " >&6
21698else
21699  case $ZIPEXE in
21700  [\\/]* | ?:[\\/]*)
21701  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21702  ;;
21703  *)
21704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21705for as_dir in $PATH
21706do
21707  IFS=$as_save_IFS
21708  test -z "$as_dir" && as_dir=.
21709    for ac_exec_ext in '' $ac_executable_extensions; do
21710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21711    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21713    break 2
21714  fi
21715done
21716  done
21717IFS=$as_save_IFS
21718
21719  ;;
21720esac
21721fi
21722ZIPEXE=$ac_cv_path_ZIPEXE
21723if test -n "$ZIPEXE"; then
21724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21725$as_echo "$ZIPEXE" >&6; }
21726else
21727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21728$as_echo "no" >&6; }
21729fi
21730
21731
21732  test -n "$ZIPEXE" && break
21733done
21734
21735  else
21736    # The variable is set, but is it from the command line or the environment?
21737
21738    # Try to remove the string !ZIPEXE! from our list.
21739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21741      # If it failed, the variable was not from the command line. Ignore it,
21742      # but warn the user (except for BASH, which is always set by the calling BASH).
21743      if test "xZIPEXE" != xBASH; then
21744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21745$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21746      fi
21747      # Try to locate tool using the code snippet
21748      for ac_prog in zip
21749do
21750  # Extract the first word of "$ac_prog", so it can be a program name with args.
21751set dummy $ac_prog; ac_word=$2
21752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21753$as_echo_n "checking for $ac_word... " >&6; }
21754if ${ac_cv_path_ZIPEXE+:} false; then :
21755  $as_echo_n "(cached) " >&6
21756else
21757  case $ZIPEXE in
21758  [\\/]* | ?:[\\/]*)
21759  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21760  ;;
21761  *)
21762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21763for as_dir in $PATH
21764do
21765  IFS=$as_save_IFS
21766  test -z "$as_dir" && as_dir=.
21767    for ac_exec_ext in '' $ac_executable_extensions; do
21768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21769    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21771    break 2
21772  fi
21773done
21774  done
21775IFS=$as_save_IFS
21776
21777  ;;
21778esac
21779fi
21780ZIPEXE=$ac_cv_path_ZIPEXE
21781if test -n "$ZIPEXE"; then
21782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21783$as_echo "$ZIPEXE" >&6; }
21784else
21785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21786$as_echo "no" >&6; }
21787fi
21788
21789
21790  test -n "$ZIPEXE" && break
21791done
21792
21793    else
21794      # If it succeeded, then it was overridden by the user. We will use it
21795      # for the tool.
21796
21797      # First remove it from the list of overridden variables, so we can test
21798      # for unknown variables in the end.
21799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21800
21801      # Check if we try to supply an empty value
21802      if test "x$ZIPEXE" = x; then
21803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21804$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21806$as_echo_n "checking for ZIPEXE... " >&6; }
21807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21808$as_echo "disabled" >&6; }
21809      else
21810        # Check if the provided tool contains a complete path.
21811        tool_specified="$ZIPEXE"
21812        tool_basename="${tool_specified##*/}"
21813        if test "x$tool_basename" = "x$tool_specified"; then
21814          # A command without a complete path is provided, search $PATH.
21815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21816$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21817          # Extract the first word of "$tool_basename", so it can be a program name with args.
21818set dummy $tool_basename; ac_word=$2
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21820$as_echo_n "checking for $ac_word... " >&6; }
21821if ${ac_cv_path_ZIPEXE+:} false; then :
21822  $as_echo_n "(cached) " >&6
21823else
21824  case $ZIPEXE in
21825  [\\/]* | ?:[\\/]*)
21826  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21827  ;;
21828  *)
21829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21830for as_dir in $PATH
21831do
21832  IFS=$as_save_IFS
21833  test -z "$as_dir" && as_dir=.
21834    for ac_exec_ext in '' $ac_executable_extensions; do
21835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21836    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21838    break 2
21839  fi
21840done
21841  done
21842IFS=$as_save_IFS
21843
21844  ;;
21845esac
21846fi
21847ZIPEXE=$ac_cv_path_ZIPEXE
21848if test -n "$ZIPEXE"; then
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21850$as_echo "$ZIPEXE" >&6; }
21851else
21852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21853$as_echo "no" >&6; }
21854fi
21855
21856
21857          if test "x$ZIPEXE" = x; then
21858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21859          fi
21860        else
21861          # Otherwise we believe it is a complete path. Use it as it is.
21862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21863$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21865$as_echo_n "checking for ZIPEXE... " >&6; }
21866          if test ! -x "$tool_specified"; then
21867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21868$as_echo "not found" >&6; }
21869            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21870          fi
21871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21872$as_echo "$tool_specified" >&6; }
21873        fi
21874      fi
21875    fi
21876
21877  fi
21878
21879
21880
21881  if test "x$ZIPEXE" = x; then
21882    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21883  fi
21884
21885
21886
21887  # Non-required basic tools
21888
21889
21890
21891  # Publish this variable in the help.
21892
21893
21894  if [ -z "${LDD+x}" ]; then
21895    # The variable is not set by user, try to locate tool using the code snippet
21896    for ac_prog in ldd
21897do
21898  # Extract the first word of "$ac_prog", so it can be a program name with args.
21899set dummy $ac_prog; ac_word=$2
21900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21901$as_echo_n "checking for $ac_word... " >&6; }
21902if ${ac_cv_path_LDD+:} false; then :
21903  $as_echo_n "(cached) " >&6
21904else
21905  case $LDD in
21906  [\\/]* | ?:[\\/]*)
21907  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21908  ;;
21909  *)
21910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21911for as_dir in $PATH
21912do
21913  IFS=$as_save_IFS
21914  test -z "$as_dir" && as_dir=.
21915    for ac_exec_ext in '' $ac_executable_extensions; do
21916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21917    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21919    break 2
21920  fi
21921done
21922  done
21923IFS=$as_save_IFS
21924
21925  ;;
21926esac
21927fi
21928LDD=$ac_cv_path_LDD
21929if test -n "$LDD"; then
21930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21931$as_echo "$LDD" >&6; }
21932else
21933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21934$as_echo "no" >&6; }
21935fi
21936
21937
21938  test -n "$LDD" && break
21939done
21940
21941  else
21942    # The variable is set, but is it from the command line or the environment?
21943
21944    # Try to remove the string !LDD! from our list.
21945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21947      # If it failed, the variable was not from the command line. Ignore it,
21948      # but warn the user (except for BASH, which is always set by the calling BASH).
21949      if test "xLDD" != xBASH; then
21950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21951$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21952      fi
21953      # Try to locate tool using the code snippet
21954      for ac_prog in ldd
21955do
21956  # Extract the first word of "$ac_prog", so it can be a program name with args.
21957set dummy $ac_prog; ac_word=$2
21958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21959$as_echo_n "checking for $ac_word... " >&6; }
21960if ${ac_cv_path_LDD+:} false; then :
21961  $as_echo_n "(cached) " >&6
21962else
21963  case $LDD in
21964  [\\/]* | ?:[\\/]*)
21965  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21966  ;;
21967  *)
21968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21969for as_dir in $PATH
21970do
21971  IFS=$as_save_IFS
21972  test -z "$as_dir" && as_dir=.
21973    for ac_exec_ext in '' $ac_executable_extensions; do
21974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21975    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21977    break 2
21978  fi
21979done
21980  done
21981IFS=$as_save_IFS
21982
21983  ;;
21984esac
21985fi
21986LDD=$ac_cv_path_LDD
21987if test -n "$LDD"; then
21988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21989$as_echo "$LDD" >&6; }
21990else
21991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21992$as_echo "no" >&6; }
21993fi
21994
21995
21996  test -n "$LDD" && break
21997done
21998
21999    else
22000      # If it succeeded, then it was overridden by the user. We will use it
22001      # for the tool.
22002
22003      # First remove it from the list of overridden variables, so we can test
22004      # for unknown variables in the end.
22005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22006
22007      # Check if we try to supply an empty value
22008      if test "x$LDD" = x; then
22009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22010$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22012$as_echo_n "checking for LDD... " >&6; }
22013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22014$as_echo "disabled" >&6; }
22015      else
22016        # Check if the provided tool contains a complete path.
22017        tool_specified="$LDD"
22018        tool_basename="${tool_specified##*/}"
22019        if test "x$tool_basename" = "x$tool_specified"; then
22020          # A command without a complete path is provided, search $PATH.
22021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22022$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22023          # Extract the first word of "$tool_basename", so it can be a program name with args.
22024set dummy $tool_basename; ac_word=$2
22025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22026$as_echo_n "checking for $ac_word... " >&6; }
22027if ${ac_cv_path_LDD+:} false; then :
22028  $as_echo_n "(cached) " >&6
22029else
22030  case $LDD in
22031  [\\/]* | ?:[\\/]*)
22032  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22033  ;;
22034  *)
22035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22036for as_dir in $PATH
22037do
22038  IFS=$as_save_IFS
22039  test -z "$as_dir" && as_dir=.
22040    for ac_exec_ext in '' $ac_executable_extensions; do
22041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22042    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22044    break 2
22045  fi
22046done
22047  done
22048IFS=$as_save_IFS
22049
22050  ;;
22051esac
22052fi
22053LDD=$ac_cv_path_LDD
22054if test -n "$LDD"; then
22055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22056$as_echo "$LDD" >&6; }
22057else
22058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22059$as_echo "no" >&6; }
22060fi
22061
22062
22063          if test "x$LDD" = x; then
22064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22065          fi
22066        else
22067          # Otherwise we believe it is a complete path. Use it as it is.
22068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22069$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22071$as_echo_n "checking for LDD... " >&6; }
22072          if test ! -x "$tool_specified"; then
22073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22074$as_echo "not found" >&6; }
22075            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22076          fi
22077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22078$as_echo "$tool_specified" >&6; }
22079        fi
22080      fi
22081    fi
22082
22083  fi
22084
22085
22086  if test "x$LDD" = "x"; then
22087    # List shared lib dependencies is used for
22088    # debug output and checking for forbidden dependencies.
22089    # We can build without it.
22090    LDD="true"
22091  fi
22092
22093
22094  # Publish this variable in the help.
22095
22096
22097  if [ -z "${OTOOL+x}" ]; then
22098    # The variable is not set by user, try to locate tool using the code snippet
22099    for ac_prog in otool
22100do
22101  # Extract the first word of "$ac_prog", so it can be a program name with args.
22102set dummy $ac_prog; ac_word=$2
22103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22104$as_echo_n "checking for $ac_word... " >&6; }
22105if ${ac_cv_path_OTOOL+:} false; then :
22106  $as_echo_n "(cached) " >&6
22107else
22108  case $OTOOL in
22109  [\\/]* | ?:[\\/]*)
22110  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22111  ;;
22112  *)
22113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22114for as_dir in $PATH
22115do
22116  IFS=$as_save_IFS
22117  test -z "$as_dir" && as_dir=.
22118    for ac_exec_ext in '' $ac_executable_extensions; do
22119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22120    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22122    break 2
22123  fi
22124done
22125  done
22126IFS=$as_save_IFS
22127
22128  ;;
22129esac
22130fi
22131OTOOL=$ac_cv_path_OTOOL
22132if test -n "$OTOOL"; then
22133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22134$as_echo "$OTOOL" >&6; }
22135else
22136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22137$as_echo "no" >&6; }
22138fi
22139
22140
22141  test -n "$OTOOL" && break
22142done
22143
22144  else
22145    # The variable is set, but is it from the command line or the environment?
22146
22147    # Try to remove the string !OTOOL! from our list.
22148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22150      # If it failed, the variable was not from the command line. Ignore it,
22151      # but warn the user (except for BASH, which is always set by the calling BASH).
22152      if test "xOTOOL" != xBASH; then
22153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22154$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22155      fi
22156      # Try to locate tool using the code snippet
22157      for ac_prog in otool
22158do
22159  # Extract the first word of "$ac_prog", so it can be a program name with args.
22160set dummy $ac_prog; ac_word=$2
22161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22162$as_echo_n "checking for $ac_word... " >&6; }
22163if ${ac_cv_path_OTOOL+:} false; then :
22164  $as_echo_n "(cached) " >&6
22165else
22166  case $OTOOL in
22167  [\\/]* | ?:[\\/]*)
22168  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22169  ;;
22170  *)
22171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22172for as_dir in $PATH
22173do
22174  IFS=$as_save_IFS
22175  test -z "$as_dir" && as_dir=.
22176    for ac_exec_ext in '' $ac_executable_extensions; do
22177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22178    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22180    break 2
22181  fi
22182done
22183  done
22184IFS=$as_save_IFS
22185
22186  ;;
22187esac
22188fi
22189OTOOL=$ac_cv_path_OTOOL
22190if test -n "$OTOOL"; then
22191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22192$as_echo "$OTOOL" >&6; }
22193else
22194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22195$as_echo "no" >&6; }
22196fi
22197
22198
22199  test -n "$OTOOL" && break
22200done
22201
22202    else
22203      # If it succeeded, then it was overridden by the user. We will use it
22204      # for the tool.
22205
22206      # First remove it from the list of overridden variables, so we can test
22207      # for unknown variables in the end.
22208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22209
22210      # Check if we try to supply an empty value
22211      if test "x$OTOOL" = x; then
22212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22213$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22215$as_echo_n "checking for OTOOL... " >&6; }
22216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22217$as_echo "disabled" >&6; }
22218      else
22219        # Check if the provided tool contains a complete path.
22220        tool_specified="$OTOOL"
22221        tool_basename="${tool_specified##*/}"
22222        if test "x$tool_basename" = "x$tool_specified"; then
22223          # A command without a complete path is provided, search $PATH.
22224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22225$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22226          # Extract the first word of "$tool_basename", so it can be a program name with args.
22227set dummy $tool_basename; ac_word=$2
22228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22229$as_echo_n "checking for $ac_word... " >&6; }
22230if ${ac_cv_path_OTOOL+:} false; then :
22231  $as_echo_n "(cached) " >&6
22232else
22233  case $OTOOL in
22234  [\\/]* | ?:[\\/]*)
22235  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22236  ;;
22237  *)
22238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22239for as_dir in $PATH
22240do
22241  IFS=$as_save_IFS
22242  test -z "$as_dir" && as_dir=.
22243    for ac_exec_ext in '' $ac_executable_extensions; do
22244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22245    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22247    break 2
22248  fi
22249done
22250  done
22251IFS=$as_save_IFS
22252
22253  ;;
22254esac
22255fi
22256OTOOL=$ac_cv_path_OTOOL
22257if test -n "$OTOOL"; then
22258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22259$as_echo "$OTOOL" >&6; }
22260else
22261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22262$as_echo "no" >&6; }
22263fi
22264
22265
22266          if test "x$OTOOL" = x; then
22267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22268          fi
22269        else
22270          # Otherwise we believe it is a complete path. Use it as it is.
22271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22272$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22274$as_echo_n "checking for OTOOL... " >&6; }
22275          if test ! -x "$tool_specified"; then
22276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22277$as_echo "not found" >&6; }
22278            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22279          fi
22280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22281$as_echo "$tool_specified" >&6; }
22282        fi
22283      fi
22284    fi
22285
22286  fi
22287
22288
22289  if test "x$OTOOL" = "x"; then
22290    OTOOL="true"
22291  fi
22292
22293
22294  # Publish this variable in the help.
22295
22296
22297  if [ -z "${READELF+x}" ]; then
22298    # The variable is not set by user, try to locate tool using the code snippet
22299    for ac_prog in greadelf readelf
22300do
22301  # Extract the first word of "$ac_prog", so it can be a program name with args.
22302set dummy $ac_prog; ac_word=$2
22303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22304$as_echo_n "checking for $ac_word... " >&6; }
22305if ${ac_cv_path_READELF+:} false; then :
22306  $as_echo_n "(cached) " >&6
22307else
22308  case $READELF in
22309  [\\/]* | ?:[\\/]*)
22310  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22311  ;;
22312  *)
22313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22314for as_dir in $PATH
22315do
22316  IFS=$as_save_IFS
22317  test -z "$as_dir" && as_dir=.
22318    for ac_exec_ext in '' $ac_executable_extensions; do
22319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22320    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22322    break 2
22323  fi
22324done
22325  done
22326IFS=$as_save_IFS
22327
22328  ;;
22329esac
22330fi
22331READELF=$ac_cv_path_READELF
22332if test -n "$READELF"; then
22333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22334$as_echo "$READELF" >&6; }
22335else
22336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22337$as_echo "no" >&6; }
22338fi
22339
22340
22341  test -n "$READELF" && break
22342done
22343
22344  else
22345    # The variable is set, but is it from the command line or the environment?
22346
22347    # Try to remove the string !READELF! from our list.
22348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22350      # If it failed, the variable was not from the command line. Ignore it,
22351      # but warn the user (except for BASH, which is always set by the calling BASH).
22352      if test "xREADELF" != xBASH; then
22353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22354$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22355      fi
22356      # Try to locate tool using the code snippet
22357      for ac_prog in greadelf readelf
22358do
22359  # Extract the first word of "$ac_prog", so it can be a program name with args.
22360set dummy $ac_prog; ac_word=$2
22361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22362$as_echo_n "checking for $ac_word... " >&6; }
22363if ${ac_cv_path_READELF+:} false; then :
22364  $as_echo_n "(cached) " >&6
22365else
22366  case $READELF in
22367  [\\/]* | ?:[\\/]*)
22368  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22369  ;;
22370  *)
22371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22372for as_dir in $PATH
22373do
22374  IFS=$as_save_IFS
22375  test -z "$as_dir" && as_dir=.
22376    for ac_exec_ext in '' $ac_executable_extensions; do
22377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22378    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22380    break 2
22381  fi
22382done
22383  done
22384IFS=$as_save_IFS
22385
22386  ;;
22387esac
22388fi
22389READELF=$ac_cv_path_READELF
22390if test -n "$READELF"; then
22391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22392$as_echo "$READELF" >&6; }
22393else
22394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22395$as_echo "no" >&6; }
22396fi
22397
22398
22399  test -n "$READELF" && break
22400done
22401
22402    else
22403      # If it succeeded, then it was overridden by the user. We will use it
22404      # for the tool.
22405
22406      # First remove it from the list of overridden variables, so we can test
22407      # for unknown variables in the end.
22408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22409
22410      # Check if we try to supply an empty value
22411      if test "x$READELF" = x; then
22412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22413$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22415$as_echo_n "checking for READELF... " >&6; }
22416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22417$as_echo "disabled" >&6; }
22418      else
22419        # Check if the provided tool contains a complete path.
22420        tool_specified="$READELF"
22421        tool_basename="${tool_specified##*/}"
22422        if test "x$tool_basename" = "x$tool_specified"; then
22423          # A command without a complete path is provided, search $PATH.
22424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22425$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22426          # Extract the first word of "$tool_basename", so it can be a program name with args.
22427set dummy $tool_basename; ac_word=$2
22428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22429$as_echo_n "checking for $ac_word... " >&6; }
22430if ${ac_cv_path_READELF+:} false; then :
22431  $as_echo_n "(cached) " >&6
22432else
22433  case $READELF in
22434  [\\/]* | ?:[\\/]*)
22435  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22436  ;;
22437  *)
22438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22439for as_dir in $PATH
22440do
22441  IFS=$as_save_IFS
22442  test -z "$as_dir" && as_dir=.
22443    for ac_exec_ext in '' $ac_executable_extensions; do
22444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22445    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22447    break 2
22448  fi
22449done
22450  done
22451IFS=$as_save_IFS
22452
22453  ;;
22454esac
22455fi
22456READELF=$ac_cv_path_READELF
22457if test -n "$READELF"; then
22458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22459$as_echo "$READELF" >&6; }
22460else
22461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22462$as_echo "no" >&6; }
22463fi
22464
22465
22466          if test "x$READELF" = x; then
22467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22468          fi
22469        else
22470          # Otherwise we believe it is a complete path. Use it as it is.
22471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22472$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22474$as_echo_n "checking for READELF... " >&6; }
22475          if test ! -x "$tool_specified"; then
22476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22477$as_echo "not found" >&6; }
22478            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22479          fi
22480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22481$as_echo "$tool_specified" >&6; }
22482        fi
22483      fi
22484    fi
22485
22486  fi
22487
22488
22489
22490
22491  # Publish this variable in the help.
22492
22493
22494  if [ -z "${DOT+x}" ]; then
22495    # The variable is not set by user, try to locate tool using the code snippet
22496    for ac_prog in dot
22497do
22498  # Extract the first word of "$ac_prog", so it can be a program name with args.
22499set dummy $ac_prog; ac_word=$2
22500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22501$as_echo_n "checking for $ac_word... " >&6; }
22502if ${ac_cv_path_DOT+:} false; then :
22503  $as_echo_n "(cached) " >&6
22504else
22505  case $DOT in
22506  [\\/]* | ?:[\\/]*)
22507  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22508  ;;
22509  *)
22510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22511for as_dir in $PATH
22512do
22513  IFS=$as_save_IFS
22514  test -z "$as_dir" && as_dir=.
22515    for ac_exec_ext in '' $ac_executable_extensions; do
22516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22517    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22519    break 2
22520  fi
22521done
22522  done
22523IFS=$as_save_IFS
22524
22525  ;;
22526esac
22527fi
22528DOT=$ac_cv_path_DOT
22529if test -n "$DOT"; then
22530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22531$as_echo "$DOT" >&6; }
22532else
22533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22534$as_echo "no" >&6; }
22535fi
22536
22537
22538  test -n "$DOT" && break
22539done
22540
22541  else
22542    # The variable is set, but is it from the command line or the environment?
22543
22544    # Try to remove the string !DOT! from our list.
22545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22547      # If it failed, the variable was not from the command line. Ignore it,
22548      # but warn the user (except for BASH, which is always set by the calling BASH).
22549      if test "xDOT" != xBASH; then
22550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22551$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22552      fi
22553      # Try to locate tool using the code snippet
22554      for ac_prog in dot
22555do
22556  # Extract the first word of "$ac_prog", so it can be a program name with args.
22557set dummy $ac_prog; ac_word=$2
22558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22559$as_echo_n "checking for $ac_word... " >&6; }
22560if ${ac_cv_path_DOT+:} false; then :
22561  $as_echo_n "(cached) " >&6
22562else
22563  case $DOT in
22564  [\\/]* | ?:[\\/]*)
22565  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22566  ;;
22567  *)
22568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22569for as_dir in $PATH
22570do
22571  IFS=$as_save_IFS
22572  test -z "$as_dir" && as_dir=.
22573    for ac_exec_ext in '' $ac_executable_extensions; do
22574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22575    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22577    break 2
22578  fi
22579done
22580  done
22581IFS=$as_save_IFS
22582
22583  ;;
22584esac
22585fi
22586DOT=$ac_cv_path_DOT
22587if test -n "$DOT"; then
22588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22589$as_echo "$DOT" >&6; }
22590else
22591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22592$as_echo "no" >&6; }
22593fi
22594
22595
22596  test -n "$DOT" && break
22597done
22598
22599    else
22600      # If it succeeded, then it was overridden by the user. We will use it
22601      # for the tool.
22602
22603      # First remove it from the list of overridden variables, so we can test
22604      # for unknown variables in the end.
22605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22606
22607      # Check if we try to supply an empty value
22608      if test "x$DOT" = x; then
22609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22610$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22612$as_echo_n "checking for DOT... " >&6; }
22613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22614$as_echo "disabled" >&6; }
22615      else
22616        # Check if the provided tool contains a complete path.
22617        tool_specified="$DOT"
22618        tool_basename="${tool_specified##*/}"
22619        if test "x$tool_basename" = "x$tool_specified"; then
22620          # A command without a complete path is provided, search $PATH.
22621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22622$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22623          # Extract the first word of "$tool_basename", so it can be a program name with args.
22624set dummy $tool_basename; ac_word=$2
22625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22626$as_echo_n "checking for $ac_word... " >&6; }
22627if ${ac_cv_path_DOT+:} false; then :
22628  $as_echo_n "(cached) " >&6
22629else
22630  case $DOT in
22631  [\\/]* | ?:[\\/]*)
22632  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22633  ;;
22634  *)
22635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22636for as_dir in $PATH
22637do
22638  IFS=$as_save_IFS
22639  test -z "$as_dir" && as_dir=.
22640    for ac_exec_ext in '' $ac_executable_extensions; do
22641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22642    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22644    break 2
22645  fi
22646done
22647  done
22648IFS=$as_save_IFS
22649
22650  ;;
22651esac
22652fi
22653DOT=$ac_cv_path_DOT
22654if test -n "$DOT"; then
22655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22656$as_echo "$DOT" >&6; }
22657else
22658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22659$as_echo "no" >&6; }
22660fi
22661
22662
22663          if test "x$DOT" = x; then
22664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22665          fi
22666        else
22667          # Otherwise we believe it is a complete path. Use it as it is.
22668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22669$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22671$as_echo_n "checking for DOT... " >&6; }
22672          if test ! -x "$tool_specified"; then
22673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22674$as_echo "not found" >&6; }
22675            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22676          fi
22677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22678$as_echo "$tool_specified" >&6; }
22679        fi
22680      fi
22681    fi
22682
22683  fi
22684
22685
22686
22687
22688  # Publish this variable in the help.
22689
22690
22691  if [ -z "${HG+x}" ]; then
22692    # The variable is not set by user, try to locate tool using the code snippet
22693    for ac_prog in hg
22694do
22695  # Extract the first word of "$ac_prog", so it can be a program name with args.
22696set dummy $ac_prog; ac_word=$2
22697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22698$as_echo_n "checking for $ac_word... " >&6; }
22699if ${ac_cv_path_HG+:} false; then :
22700  $as_echo_n "(cached) " >&6
22701else
22702  case $HG in
22703  [\\/]* | ?:[\\/]*)
22704  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22705  ;;
22706  *)
22707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22708for as_dir in $PATH
22709do
22710  IFS=$as_save_IFS
22711  test -z "$as_dir" && as_dir=.
22712    for ac_exec_ext in '' $ac_executable_extensions; do
22713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22714    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22716    break 2
22717  fi
22718done
22719  done
22720IFS=$as_save_IFS
22721
22722  ;;
22723esac
22724fi
22725HG=$ac_cv_path_HG
22726if test -n "$HG"; then
22727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22728$as_echo "$HG" >&6; }
22729else
22730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22731$as_echo "no" >&6; }
22732fi
22733
22734
22735  test -n "$HG" && break
22736done
22737
22738  else
22739    # The variable is set, but is it from the command line or the environment?
22740
22741    # Try to remove the string !HG! from our list.
22742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22744      # If it failed, the variable was not from the command line. Ignore it,
22745      # but warn the user (except for BASH, which is always set by the calling BASH).
22746      if test "xHG" != xBASH; then
22747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22748$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22749      fi
22750      # Try to locate tool using the code snippet
22751      for ac_prog in hg
22752do
22753  # Extract the first word of "$ac_prog", so it can be a program name with args.
22754set dummy $ac_prog; ac_word=$2
22755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22756$as_echo_n "checking for $ac_word... " >&6; }
22757if ${ac_cv_path_HG+:} false; then :
22758  $as_echo_n "(cached) " >&6
22759else
22760  case $HG in
22761  [\\/]* | ?:[\\/]*)
22762  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22763  ;;
22764  *)
22765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22766for as_dir in $PATH
22767do
22768  IFS=$as_save_IFS
22769  test -z "$as_dir" && as_dir=.
22770    for ac_exec_ext in '' $ac_executable_extensions; do
22771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22772    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22774    break 2
22775  fi
22776done
22777  done
22778IFS=$as_save_IFS
22779
22780  ;;
22781esac
22782fi
22783HG=$ac_cv_path_HG
22784if test -n "$HG"; then
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22786$as_echo "$HG" >&6; }
22787else
22788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22789$as_echo "no" >&6; }
22790fi
22791
22792
22793  test -n "$HG" && break
22794done
22795
22796    else
22797      # If it succeeded, then it was overridden by the user. We will use it
22798      # for the tool.
22799
22800      # First remove it from the list of overridden variables, so we can test
22801      # for unknown variables in the end.
22802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22803
22804      # Check if we try to supply an empty value
22805      if test "x$HG" = x; then
22806        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22807$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22809$as_echo_n "checking for HG... " >&6; }
22810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22811$as_echo "disabled" >&6; }
22812      else
22813        # Check if the provided tool contains a complete path.
22814        tool_specified="$HG"
22815        tool_basename="${tool_specified##*/}"
22816        if test "x$tool_basename" = "x$tool_specified"; then
22817          # A command without a complete path is provided, search $PATH.
22818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22819$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22820          # Extract the first word of "$tool_basename", so it can be a program name with args.
22821set dummy $tool_basename; ac_word=$2
22822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22823$as_echo_n "checking for $ac_word... " >&6; }
22824if ${ac_cv_path_HG+:} false; then :
22825  $as_echo_n "(cached) " >&6
22826else
22827  case $HG in
22828  [\\/]* | ?:[\\/]*)
22829  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22830  ;;
22831  *)
22832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22833for as_dir in $PATH
22834do
22835  IFS=$as_save_IFS
22836  test -z "$as_dir" && as_dir=.
22837    for ac_exec_ext in '' $ac_executable_extensions; do
22838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22839    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22841    break 2
22842  fi
22843done
22844  done
22845IFS=$as_save_IFS
22846
22847  ;;
22848esac
22849fi
22850HG=$ac_cv_path_HG
22851if test -n "$HG"; then
22852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22853$as_echo "$HG" >&6; }
22854else
22855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22856$as_echo "no" >&6; }
22857fi
22858
22859
22860          if test "x$HG" = x; then
22861            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22862          fi
22863        else
22864          # Otherwise we believe it is a complete path. Use it as it is.
22865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22866$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22867          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22868$as_echo_n "checking for HG... " >&6; }
22869          if test ! -x "$tool_specified"; then
22870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22871$as_echo "not found" >&6; }
22872            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22873          fi
22874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22875$as_echo "$tool_specified" >&6; }
22876        fi
22877      fi
22878    fi
22879
22880  fi
22881
22882
22883
22884
22885  # Publish this variable in the help.
22886
22887
22888  if [ -z "${STAT+x}" ]; then
22889    # The variable is not set by user, try to locate tool using the code snippet
22890    for ac_prog in stat
22891do
22892  # Extract the first word of "$ac_prog", so it can be a program name with args.
22893set dummy $ac_prog; ac_word=$2
22894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22895$as_echo_n "checking for $ac_word... " >&6; }
22896if ${ac_cv_path_STAT+:} false; then :
22897  $as_echo_n "(cached) " >&6
22898else
22899  case $STAT in
22900  [\\/]* | ?:[\\/]*)
22901  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22902  ;;
22903  *)
22904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22905for as_dir in $PATH
22906do
22907  IFS=$as_save_IFS
22908  test -z "$as_dir" && as_dir=.
22909    for ac_exec_ext in '' $ac_executable_extensions; do
22910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22911    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22913    break 2
22914  fi
22915done
22916  done
22917IFS=$as_save_IFS
22918
22919  ;;
22920esac
22921fi
22922STAT=$ac_cv_path_STAT
22923if test -n "$STAT"; then
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22925$as_echo "$STAT" >&6; }
22926else
22927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22928$as_echo "no" >&6; }
22929fi
22930
22931
22932  test -n "$STAT" && break
22933done
22934
22935  else
22936    # The variable is set, but is it from the command line or the environment?
22937
22938    # Try to remove the string !STAT! from our list.
22939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22941      # If it failed, the variable was not from the command line. Ignore it,
22942      # but warn the user (except for BASH, which is always set by the calling BASH).
22943      if test "xSTAT" != xBASH; then
22944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22945$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22946      fi
22947      # Try to locate tool using the code snippet
22948      for ac_prog in stat
22949do
22950  # Extract the first word of "$ac_prog", so it can be a program name with args.
22951set dummy $ac_prog; ac_word=$2
22952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22953$as_echo_n "checking for $ac_word... " >&6; }
22954if ${ac_cv_path_STAT+:} false; then :
22955  $as_echo_n "(cached) " >&6
22956else
22957  case $STAT in
22958  [\\/]* | ?:[\\/]*)
22959  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22960  ;;
22961  *)
22962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22963for as_dir in $PATH
22964do
22965  IFS=$as_save_IFS
22966  test -z "$as_dir" && as_dir=.
22967    for ac_exec_ext in '' $ac_executable_extensions; do
22968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22969    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22971    break 2
22972  fi
22973done
22974  done
22975IFS=$as_save_IFS
22976
22977  ;;
22978esac
22979fi
22980STAT=$ac_cv_path_STAT
22981if test -n "$STAT"; then
22982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22983$as_echo "$STAT" >&6; }
22984else
22985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22986$as_echo "no" >&6; }
22987fi
22988
22989
22990  test -n "$STAT" && break
22991done
22992
22993    else
22994      # If it succeeded, then it was overridden by the user. We will use it
22995      # for the tool.
22996
22997      # First remove it from the list of overridden variables, so we can test
22998      # for unknown variables in the end.
22999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23000
23001      # Check if we try to supply an empty value
23002      if test "x$STAT" = x; then
23003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23004$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23006$as_echo_n "checking for STAT... " >&6; }
23007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23008$as_echo "disabled" >&6; }
23009      else
23010        # Check if the provided tool contains a complete path.
23011        tool_specified="$STAT"
23012        tool_basename="${tool_specified##*/}"
23013        if test "x$tool_basename" = "x$tool_specified"; then
23014          # A command without a complete path is provided, search $PATH.
23015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23016$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23017          # Extract the first word of "$tool_basename", so it can be a program name with args.
23018set dummy $tool_basename; ac_word=$2
23019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23020$as_echo_n "checking for $ac_word... " >&6; }
23021if ${ac_cv_path_STAT+:} false; then :
23022  $as_echo_n "(cached) " >&6
23023else
23024  case $STAT in
23025  [\\/]* | ?:[\\/]*)
23026  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23027  ;;
23028  *)
23029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23030for as_dir in $PATH
23031do
23032  IFS=$as_save_IFS
23033  test -z "$as_dir" && as_dir=.
23034    for ac_exec_ext in '' $ac_executable_extensions; do
23035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23036    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23038    break 2
23039  fi
23040done
23041  done
23042IFS=$as_save_IFS
23043
23044  ;;
23045esac
23046fi
23047STAT=$ac_cv_path_STAT
23048if test -n "$STAT"; then
23049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23050$as_echo "$STAT" >&6; }
23051else
23052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23053$as_echo "no" >&6; }
23054fi
23055
23056
23057          if test "x$STAT" = x; then
23058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23059          fi
23060        else
23061          # Otherwise we believe it is a complete path. Use it as it is.
23062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23063$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23065$as_echo_n "checking for STAT... " >&6; }
23066          if test ! -x "$tool_specified"; then
23067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23068$as_echo "not found" >&6; }
23069            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23070          fi
23071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23072$as_echo "$tool_specified" >&6; }
23073        fi
23074      fi
23075    fi
23076
23077  fi
23078
23079
23080
23081
23082  # Publish this variable in the help.
23083
23084
23085  if [ -z "${TIME+x}" ]; then
23086    # The variable is not set by user, try to locate tool using the code snippet
23087    for ac_prog in time
23088do
23089  # Extract the first word of "$ac_prog", so it can be a program name with args.
23090set dummy $ac_prog; ac_word=$2
23091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23092$as_echo_n "checking for $ac_word... " >&6; }
23093if ${ac_cv_path_TIME+:} false; then :
23094  $as_echo_n "(cached) " >&6
23095else
23096  case $TIME in
23097  [\\/]* | ?:[\\/]*)
23098  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23099  ;;
23100  *)
23101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23102for as_dir in $PATH
23103do
23104  IFS=$as_save_IFS
23105  test -z "$as_dir" && as_dir=.
23106    for ac_exec_ext in '' $ac_executable_extensions; do
23107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23108    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23110    break 2
23111  fi
23112done
23113  done
23114IFS=$as_save_IFS
23115
23116  ;;
23117esac
23118fi
23119TIME=$ac_cv_path_TIME
23120if test -n "$TIME"; then
23121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23122$as_echo "$TIME" >&6; }
23123else
23124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23125$as_echo "no" >&6; }
23126fi
23127
23128
23129  test -n "$TIME" && break
23130done
23131
23132  else
23133    # The variable is set, but is it from the command line or the environment?
23134
23135    # Try to remove the string !TIME! from our list.
23136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23138      # If it failed, the variable was not from the command line. Ignore it,
23139      # but warn the user (except for BASH, which is always set by the calling BASH).
23140      if test "xTIME" != xBASH; then
23141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23142$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23143      fi
23144      # Try to locate tool using the code snippet
23145      for ac_prog in time
23146do
23147  # Extract the first word of "$ac_prog", so it can be a program name with args.
23148set dummy $ac_prog; ac_word=$2
23149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23150$as_echo_n "checking for $ac_word... " >&6; }
23151if ${ac_cv_path_TIME+:} false; then :
23152  $as_echo_n "(cached) " >&6
23153else
23154  case $TIME in
23155  [\\/]* | ?:[\\/]*)
23156  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23157  ;;
23158  *)
23159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23160for as_dir in $PATH
23161do
23162  IFS=$as_save_IFS
23163  test -z "$as_dir" && as_dir=.
23164    for ac_exec_ext in '' $ac_executable_extensions; do
23165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23166    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23168    break 2
23169  fi
23170done
23171  done
23172IFS=$as_save_IFS
23173
23174  ;;
23175esac
23176fi
23177TIME=$ac_cv_path_TIME
23178if test -n "$TIME"; then
23179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23180$as_echo "$TIME" >&6; }
23181else
23182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23183$as_echo "no" >&6; }
23184fi
23185
23186
23187  test -n "$TIME" && break
23188done
23189
23190    else
23191      # If it succeeded, then it was overridden by the user. We will use it
23192      # for the tool.
23193
23194      # First remove it from the list of overridden variables, so we can test
23195      # for unknown variables in the end.
23196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23197
23198      # Check if we try to supply an empty value
23199      if test "x$TIME" = x; then
23200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23201$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23203$as_echo_n "checking for TIME... " >&6; }
23204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23205$as_echo "disabled" >&6; }
23206      else
23207        # Check if the provided tool contains a complete path.
23208        tool_specified="$TIME"
23209        tool_basename="${tool_specified##*/}"
23210        if test "x$tool_basename" = "x$tool_specified"; then
23211          # A command without a complete path is provided, search $PATH.
23212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23213$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23214          # Extract the first word of "$tool_basename", so it can be a program name with args.
23215set dummy $tool_basename; ac_word=$2
23216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23217$as_echo_n "checking for $ac_word... " >&6; }
23218if ${ac_cv_path_TIME+:} false; then :
23219  $as_echo_n "(cached) " >&6
23220else
23221  case $TIME in
23222  [\\/]* | ?:[\\/]*)
23223  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23224  ;;
23225  *)
23226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23227for as_dir in $PATH
23228do
23229  IFS=$as_save_IFS
23230  test -z "$as_dir" && as_dir=.
23231    for ac_exec_ext in '' $ac_executable_extensions; do
23232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23233    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23235    break 2
23236  fi
23237done
23238  done
23239IFS=$as_save_IFS
23240
23241  ;;
23242esac
23243fi
23244TIME=$ac_cv_path_TIME
23245if test -n "$TIME"; then
23246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23247$as_echo "$TIME" >&6; }
23248else
23249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23250$as_echo "no" >&6; }
23251fi
23252
23253
23254          if test "x$TIME" = x; then
23255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23256          fi
23257        else
23258          # Otherwise we believe it is a complete path. Use it as it is.
23259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23260$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23262$as_echo_n "checking for TIME... " >&6; }
23263          if test ! -x "$tool_specified"; then
23264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23265$as_echo "not found" >&6; }
23266            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23267          fi
23268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23269$as_echo "$tool_specified" >&6; }
23270        fi
23271      fi
23272    fi
23273
23274  fi
23275
23276
23277  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23278  # be in the user path.
23279
23280
23281  # Publish this variable in the help.
23282
23283
23284  if [ -z "${DTRACE+x}" ]; then
23285    # The variable is not set by user, try to locate tool using the code snippet
23286    for ac_prog in dtrace
23287do
23288  # Extract the first word of "$ac_prog", so it can be a program name with args.
23289set dummy $ac_prog; ac_word=$2
23290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23291$as_echo_n "checking for $ac_word... " >&6; }
23292if ${ac_cv_path_DTRACE+:} false; then :
23293  $as_echo_n "(cached) " >&6
23294else
23295  case $DTRACE in
23296  [\\/]* | ?:[\\/]*)
23297  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23298  ;;
23299  *)
23300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23301as_dummy="$PATH:/usr/sbin"
23302for as_dir in $as_dummy
23303do
23304  IFS=$as_save_IFS
23305  test -z "$as_dir" && as_dir=.
23306    for ac_exec_ext in '' $ac_executable_extensions; do
23307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23308    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23310    break 2
23311  fi
23312done
23313  done
23314IFS=$as_save_IFS
23315
23316  ;;
23317esac
23318fi
23319DTRACE=$ac_cv_path_DTRACE
23320if test -n "$DTRACE"; then
23321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23322$as_echo "$DTRACE" >&6; }
23323else
23324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23325$as_echo "no" >&6; }
23326fi
23327
23328
23329  test -n "$DTRACE" && break
23330done
23331
23332  else
23333    # The variable is set, but is it from the command line or the environment?
23334
23335    # Try to remove the string !DTRACE! from our list.
23336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23338      # If it failed, the variable was not from the command line. Ignore it,
23339      # but warn the user (except for BASH, which is always set by the calling BASH).
23340      if test "xDTRACE" != xBASH; then
23341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23342$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23343      fi
23344      # Try to locate tool using the code snippet
23345      for ac_prog in dtrace
23346do
23347  # Extract the first word of "$ac_prog", so it can be a program name with args.
23348set dummy $ac_prog; ac_word=$2
23349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23350$as_echo_n "checking for $ac_word... " >&6; }
23351if ${ac_cv_path_DTRACE+:} false; then :
23352  $as_echo_n "(cached) " >&6
23353else
23354  case $DTRACE in
23355  [\\/]* | ?:[\\/]*)
23356  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23357  ;;
23358  *)
23359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23360as_dummy="$PATH:/usr/sbin"
23361for as_dir in $as_dummy
23362do
23363  IFS=$as_save_IFS
23364  test -z "$as_dir" && as_dir=.
23365    for ac_exec_ext in '' $ac_executable_extensions; do
23366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23367    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23369    break 2
23370  fi
23371done
23372  done
23373IFS=$as_save_IFS
23374
23375  ;;
23376esac
23377fi
23378DTRACE=$ac_cv_path_DTRACE
23379if test -n "$DTRACE"; then
23380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23381$as_echo "$DTRACE" >&6; }
23382else
23383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23384$as_echo "no" >&6; }
23385fi
23386
23387
23388  test -n "$DTRACE" && break
23389done
23390
23391    else
23392      # If it succeeded, then it was overridden by the user. We will use it
23393      # for the tool.
23394
23395      # First remove it from the list of overridden variables, so we can test
23396      # for unknown variables in the end.
23397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23398
23399      # Check if we try to supply an empty value
23400      if test "x$DTRACE" = x; then
23401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23402$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23404$as_echo_n "checking for DTRACE... " >&6; }
23405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23406$as_echo "disabled" >&6; }
23407      else
23408        # Check if the provided tool contains a complete path.
23409        tool_specified="$DTRACE"
23410        tool_basename="${tool_specified##*/}"
23411        if test "x$tool_basename" = "x$tool_specified"; then
23412          # A command without a complete path is provided, search $PATH.
23413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23414$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23415          # Extract the first word of "$tool_basename", so it can be a program name with args.
23416set dummy $tool_basename; ac_word=$2
23417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23418$as_echo_n "checking for $ac_word... " >&6; }
23419if ${ac_cv_path_DTRACE+:} false; then :
23420  $as_echo_n "(cached) " >&6
23421else
23422  case $DTRACE in
23423  [\\/]* | ?:[\\/]*)
23424  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23425  ;;
23426  *)
23427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23428for as_dir in $PATH
23429do
23430  IFS=$as_save_IFS
23431  test -z "$as_dir" && as_dir=.
23432    for ac_exec_ext in '' $ac_executable_extensions; do
23433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23434    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23436    break 2
23437  fi
23438done
23439  done
23440IFS=$as_save_IFS
23441
23442  ;;
23443esac
23444fi
23445DTRACE=$ac_cv_path_DTRACE
23446if test -n "$DTRACE"; then
23447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23448$as_echo "$DTRACE" >&6; }
23449else
23450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23451$as_echo "no" >&6; }
23452fi
23453
23454
23455          if test "x$DTRACE" = x; then
23456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23457          fi
23458        else
23459          # Otherwise we believe it is a complete path. Use it as it is.
23460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23461$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23463$as_echo_n "checking for DTRACE... " >&6; }
23464          if test ! -x "$tool_specified"; then
23465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23466$as_echo "not found" >&6; }
23467            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23468          fi
23469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23470$as_echo "$tool_specified" >&6; }
23471        fi
23472      fi
23473    fi
23474
23475  fi
23476
23477
23478
23479
23480  # Publish this variable in the help.
23481
23482
23483  if [ -z "${PATCH+x}" ]; then
23484    # The variable is not set by user, try to locate tool using the code snippet
23485    for ac_prog in gpatch patch
23486do
23487  # Extract the first word of "$ac_prog", so it can be a program name with args.
23488set dummy $ac_prog; ac_word=$2
23489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23490$as_echo_n "checking for $ac_word... " >&6; }
23491if ${ac_cv_path_PATCH+:} false; then :
23492  $as_echo_n "(cached) " >&6
23493else
23494  case $PATCH in
23495  [\\/]* | ?:[\\/]*)
23496  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23497  ;;
23498  *)
23499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23500for as_dir in $PATH
23501do
23502  IFS=$as_save_IFS
23503  test -z "$as_dir" && as_dir=.
23504    for ac_exec_ext in '' $ac_executable_extensions; do
23505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23506    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23508    break 2
23509  fi
23510done
23511  done
23512IFS=$as_save_IFS
23513
23514  ;;
23515esac
23516fi
23517PATCH=$ac_cv_path_PATCH
23518if test -n "$PATCH"; then
23519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23520$as_echo "$PATCH" >&6; }
23521else
23522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23523$as_echo "no" >&6; }
23524fi
23525
23526
23527  test -n "$PATCH" && break
23528done
23529
23530  else
23531    # The variable is set, but is it from the command line or the environment?
23532
23533    # Try to remove the string !PATCH! from our list.
23534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23536      # If it failed, the variable was not from the command line. Ignore it,
23537      # but warn the user (except for BASH, which is always set by the calling BASH).
23538      if test "xPATCH" != xBASH; then
23539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23540$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23541      fi
23542      # Try to locate tool using the code snippet
23543      for ac_prog in gpatch patch
23544do
23545  # Extract the first word of "$ac_prog", so it can be a program name with args.
23546set dummy $ac_prog; ac_word=$2
23547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23548$as_echo_n "checking for $ac_word... " >&6; }
23549if ${ac_cv_path_PATCH+:} false; then :
23550  $as_echo_n "(cached) " >&6
23551else
23552  case $PATCH in
23553  [\\/]* | ?:[\\/]*)
23554  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23555  ;;
23556  *)
23557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23558for as_dir in $PATH
23559do
23560  IFS=$as_save_IFS
23561  test -z "$as_dir" && as_dir=.
23562    for ac_exec_ext in '' $ac_executable_extensions; do
23563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23564    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23566    break 2
23567  fi
23568done
23569  done
23570IFS=$as_save_IFS
23571
23572  ;;
23573esac
23574fi
23575PATCH=$ac_cv_path_PATCH
23576if test -n "$PATCH"; then
23577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23578$as_echo "$PATCH" >&6; }
23579else
23580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23581$as_echo "no" >&6; }
23582fi
23583
23584
23585  test -n "$PATCH" && break
23586done
23587
23588    else
23589      # If it succeeded, then it was overridden by the user. We will use it
23590      # for the tool.
23591
23592      # First remove it from the list of overridden variables, so we can test
23593      # for unknown variables in the end.
23594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23595
23596      # Check if we try to supply an empty value
23597      if test "x$PATCH" = x; then
23598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23599$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23601$as_echo_n "checking for PATCH... " >&6; }
23602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23603$as_echo "disabled" >&6; }
23604      else
23605        # Check if the provided tool contains a complete path.
23606        tool_specified="$PATCH"
23607        tool_basename="${tool_specified##*/}"
23608        if test "x$tool_basename" = "x$tool_specified"; then
23609          # A command without a complete path is provided, search $PATH.
23610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23611$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23612          # Extract the first word of "$tool_basename", so it can be a program name with args.
23613set dummy $tool_basename; ac_word=$2
23614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23615$as_echo_n "checking for $ac_word... " >&6; }
23616if ${ac_cv_path_PATCH+:} false; then :
23617  $as_echo_n "(cached) " >&6
23618else
23619  case $PATCH in
23620  [\\/]* | ?:[\\/]*)
23621  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23622  ;;
23623  *)
23624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23625for as_dir in $PATH
23626do
23627  IFS=$as_save_IFS
23628  test -z "$as_dir" && as_dir=.
23629    for ac_exec_ext in '' $ac_executable_extensions; do
23630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23631    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23633    break 2
23634  fi
23635done
23636  done
23637IFS=$as_save_IFS
23638
23639  ;;
23640esac
23641fi
23642PATCH=$ac_cv_path_PATCH
23643if test -n "$PATCH"; then
23644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23645$as_echo "$PATCH" >&6; }
23646else
23647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23648$as_echo "no" >&6; }
23649fi
23650
23651
23652          if test "x$PATCH" = x; then
23653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23654          fi
23655        else
23656          # Otherwise we believe it is a complete path. Use it as it is.
23657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23658$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23660$as_echo_n "checking for PATCH... " >&6; }
23661          if test ! -x "$tool_specified"; then
23662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23663$as_echo "not found" >&6; }
23664            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23665          fi
23666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23667$as_echo "$tool_specified" >&6; }
23668        fi
23669      fi
23670    fi
23671
23672  fi
23673
23674
23675  # Check if it's GNU time
23676  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23677  if test "x$IS_GNU_TIME" != x; then
23678    IS_GNU_TIME=yes
23679  else
23680    IS_GNU_TIME=no
23681  fi
23682
23683
23684  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23685
23686
23687
23688  # Publish this variable in the help.
23689
23690
23691  if [ -z "${DSYMUTIL+x}" ]; then
23692    # The variable is not set by user, try to locate tool using the code snippet
23693    for ac_prog in dsymutil
23694do
23695  # Extract the first word of "$ac_prog", so it can be a program name with args.
23696set dummy $ac_prog; ac_word=$2
23697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23698$as_echo_n "checking for $ac_word... " >&6; }
23699if ${ac_cv_path_DSYMUTIL+:} false; then :
23700  $as_echo_n "(cached) " >&6
23701else
23702  case $DSYMUTIL in
23703  [\\/]* | ?:[\\/]*)
23704  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23705  ;;
23706  *)
23707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23708for as_dir in $PATH
23709do
23710  IFS=$as_save_IFS
23711  test -z "$as_dir" && as_dir=.
23712    for ac_exec_ext in '' $ac_executable_extensions; do
23713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23714    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23716    break 2
23717  fi
23718done
23719  done
23720IFS=$as_save_IFS
23721
23722  ;;
23723esac
23724fi
23725DSYMUTIL=$ac_cv_path_DSYMUTIL
23726if test -n "$DSYMUTIL"; then
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23728$as_echo "$DSYMUTIL" >&6; }
23729else
23730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23731$as_echo "no" >&6; }
23732fi
23733
23734
23735  test -n "$DSYMUTIL" && break
23736done
23737
23738  else
23739    # The variable is set, but is it from the command line or the environment?
23740
23741    # Try to remove the string !DSYMUTIL! from our list.
23742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23744      # If it failed, the variable was not from the command line. Ignore it,
23745      # but warn the user (except for BASH, which is always set by the calling BASH).
23746      if test "xDSYMUTIL" != xBASH; then
23747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23748$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23749      fi
23750      # Try to locate tool using the code snippet
23751      for ac_prog in dsymutil
23752do
23753  # Extract the first word of "$ac_prog", so it can be a program name with args.
23754set dummy $ac_prog; ac_word=$2
23755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23756$as_echo_n "checking for $ac_word... " >&6; }
23757if ${ac_cv_path_DSYMUTIL+:} false; then :
23758  $as_echo_n "(cached) " >&6
23759else
23760  case $DSYMUTIL in
23761  [\\/]* | ?:[\\/]*)
23762  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23763  ;;
23764  *)
23765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23766for as_dir in $PATH
23767do
23768  IFS=$as_save_IFS
23769  test -z "$as_dir" && as_dir=.
23770    for ac_exec_ext in '' $ac_executable_extensions; do
23771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23772    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23774    break 2
23775  fi
23776done
23777  done
23778IFS=$as_save_IFS
23779
23780  ;;
23781esac
23782fi
23783DSYMUTIL=$ac_cv_path_DSYMUTIL
23784if test -n "$DSYMUTIL"; then
23785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23786$as_echo "$DSYMUTIL" >&6; }
23787else
23788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23789$as_echo "no" >&6; }
23790fi
23791
23792
23793  test -n "$DSYMUTIL" && break
23794done
23795
23796    else
23797      # If it succeeded, then it was overridden by the user. We will use it
23798      # for the tool.
23799
23800      # First remove it from the list of overridden variables, so we can test
23801      # for unknown variables in the end.
23802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23803
23804      # Check if we try to supply an empty value
23805      if test "x$DSYMUTIL" = x; then
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23807$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23809$as_echo_n "checking for DSYMUTIL... " >&6; }
23810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23811$as_echo "disabled" >&6; }
23812      else
23813        # Check if the provided tool contains a complete path.
23814        tool_specified="$DSYMUTIL"
23815        tool_basename="${tool_specified##*/}"
23816        if test "x$tool_basename" = "x$tool_specified"; then
23817          # A command without a complete path is provided, search $PATH.
23818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23819$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23820          # Extract the first word of "$tool_basename", so it can be a program name with args.
23821set dummy $tool_basename; ac_word=$2
23822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23823$as_echo_n "checking for $ac_word... " >&6; }
23824if ${ac_cv_path_DSYMUTIL+:} false; then :
23825  $as_echo_n "(cached) " >&6
23826else
23827  case $DSYMUTIL in
23828  [\\/]* | ?:[\\/]*)
23829  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23830  ;;
23831  *)
23832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23833for as_dir in $PATH
23834do
23835  IFS=$as_save_IFS
23836  test -z "$as_dir" && as_dir=.
23837    for ac_exec_ext in '' $ac_executable_extensions; do
23838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23839    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23841    break 2
23842  fi
23843done
23844  done
23845IFS=$as_save_IFS
23846
23847  ;;
23848esac
23849fi
23850DSYMUTIL=$ac_cv_path_DSYMUTIL
23851if test -n "$DSYMUTIL"; then
23852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23853$as_echo "$DSYMUTIL" >&6; }
23854else
23855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23856$as_echo "no" >&6; }
23857fi
23858
23859
23860          if test "x$DSYMUTIL" = x; then
23861            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23862          fi
23863        else
23864          # Otherwise we believe it is a complete path. Use it as it is.
23865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23866$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23867          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23868$as_echo_n "checking for DSYMUTIL... " >&6; }
23869          if test ! -x "$tool_specified"; then
23870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23871$as_echo "not found" >&6; }
23872            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23873          fi
23874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23875$as_echo "$tool_specified" >&6; }
23876        fi
23877      fi
23878    fi
23879
23880  fi
23881
23882
23883
23884  if test "x$DSYMUTIL" = x; then
23885    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23886  fi
23887
23888
23889
23890
23891
23892  # Publish this variable in the help.
23893
23894
23895  if [ -z "${XATTR+x}" ]; then
23896    # The variable is not set by user, try to locate tool using the code snippet
23897    for ac_prog in xattr
23898do
23899  # Extract the first word of "$ac_prog", so it can be a program name with args.
23900set dummy $ac_prog; ac_word=$2
23901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23902$as_echo_n "checking for $ac_word... " >&6; }
23903if ${ac_cv_path_XATTR+:} false; then :
23904  $as_echo_n "(cached) " >&6
23905else
23906  case $XATTR in
23907  [\\/]* | ?:[\\/]*)
23908  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23909  ;;
23910  *)
23911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23912for as_dir in $PATH
23913do
23914  IFS=$as_save_IFS
23915  test -z "$as_dir" && as_dir=.
23916    for ac_exec_ext in '' $ac_executable_extensions; do
23917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23918    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23920    break 2
23921  fi
23922done
23923  done
23924IFS=$as_save_IFS
23925
23926  ;;
23927esac
23928fi
23929XATTR=$ac_cv_path_XATTR
23930if test -n "$XATTR"; then
23931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23932$as_echo "$XATTR" >&6; }
23933else
23934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23935$as_echo "no" >&6; }
23936fi
23937
23938
23939  test -n "$XATTR" && break
23940done
23941
23942  else
23943    # The variable is set, but is it from the command line or the environment?
23944
23945    # Try to remove the string !XATTR! from our list.
23946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23948      # If it failed, the variable was not from the command line. Ignore it,
23949      # but warn the user (except for BASH, which is always set by the calling BASH).
23950      if test "xXATTR" != xBASH; then
23951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23952$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23953      fi
23954      # Try to locate tool using the code snippet
23955      for ac_prog in xattr
23956do
23957  # Extract the first word of "$ac_prog", so it can be a program name with args.
23958set dummy $ac_prog; ac_word=$2
23959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23960$as_echo_n "checking for $ac_word... " >&6; }
23961if ${ac_cv_path_XATTR+:} false; then :
23962  $as_echo_n "(cached) " >&6
23963else
23964  case $XATTR in
23965  [\\/]* | ?:[\\/]*)
23966  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23967  ;;
23968  *)
23969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23970for as_dir in $PATH
23971do
23972  IFS=$as_save_IFS
23973  test -z "$as_dir" && as_dir=.
23974    for ac_exec_ext in '' $ac_executable_extensions; do
23975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23976    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23978    break 2
23979  fi
23980done
23981  done
23982IFS=$as_save_IFS
23983
23984  ;;
23985esac
23986fi
23987XATTR=$ac_cv_path_XATTR
23988if test -n "$XATTR"; then
23989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23990$as_echo "$XATTR" >&6; }
23991else
23992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23993$as_echo "no" >&6; }
23994fi
23995
23996
23997  test -n "$XATTR" && break
23998done
23999
24000    else
24001      # If it succeeded, then it was overridden by the user. We will use it
24002      # for the tool.
24003
24004      # First remove it from the list of overridden variables, so we can test
24005      # for unknown variables in the end.
24006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24007
24008      # Check if we try to supply an empty value
24009      if test "x$XATTR" = x; then
24010        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24011$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24013$as_echo_n "checking for XATTR... " >&6; }
24014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24015$as_echo "disabled" >&6; }
24016      else
24017        # Check if the provided tool contains a complete path.
24018        tool_specified="$XATTR"
24019        tool_basename="${tool_specified##*/}"
24020        if test "x$tool_basename" = "x$tool_specified"; then
24021          # A command without a complete path is provided, search $PATH.
24022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24023$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24024          # Extract the first word of "$tool_basename", so it can be a program name with args.
24025set dummy $tool_basename; ac_word=$2
24026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24027$as_echo_n "checking for $ac_word... " >&6; }
24028if ${ac_cv_path_XATTR+:} false; then :
24029  $as_echo_n "(cached) " >&6
24030else
24031  case $XATTR in
24032  [\\/]* | ?:[\\/]*)
24033  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24034  ;;
24035  *)
24036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24037for as_dir in $PATH
24038do
24039  IFS=$as_save_IFS
24040  test -z "$as_dir" && as_dir=.
24041    for ac_exec_ext in '' $ac_executable_extensions; do
24042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24043    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24045    break 2
24046  fi
24047done
24048  done
24049IFS=$as_save_IFS
24050
24051  ;;
24052esac
24053fi
24054XATTR=$ac_cv_path_XATTR
24055if test -n "$XATTR"; then
24056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24057$as_echo "$XATTR" >&6; }
24058else
24059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24060$as_echo "no" >&6; }
24061fi
24062
24063
24064          if test "x$XATTR" = x; then
24065            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24066          fi
24067        else
24068          # Otherwise we believe it is a complete path. Use it as it is.
24069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24070$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24072$as_echo_n "checking for XATTR... " >&6; }
24073          if test ! -x "$tool_specified"; then
24074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24075$as_echo "not found" >&6; }
24076            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24077          fi
24078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24079$as_echo "$tool_specified" >&6; }
24080        fi
24081      fi
24082    fi
24083
24084  fi
24085
24086
24087
24088  if test "x$XATTR" = x; then
24089    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24090  fi
24091
24092
24093
24094
24095  # Publish this variable in the help.
24096
24097
24098  if [ -z "${CODESIGN+x}" ]; then
24099    # The variable is not set by user, try to locate tool using the code snippet
24100    for ac_prog in codesign
24101do
24102  # Extract the first word of "$ac_prog", so it can be a program name with args.
24103set dummy $ac_prog; ac_word=$2
24104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24105$as_echo_n "checking for $ac_word... " >&6; }
24106if ${ac_cv_path_CODESIGN+:} false; then :
24107  $as_echo_n "(cached) " >&6
24108else
24109  case $CODESIGN in
24110  [\\/]* | ?:[\\/]*)
24111  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24112  ;;
24113  *)
24114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24115for as_dir in $PATH
24116do
24117  IFS=$as_save_IFS
24118  test -z "$as_dir" && as_dir=.
24119    for ac_exec_ext in '' $ac_executable_extensions; do
24120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24121    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24123    break 2
24124  fi
24125done
24126  done
24127IFS=$as_save_IFS
24128
24129  ;;
24130esac
24131fi
24132CODESIGN=$ac_cv_path_CODESIGN
24133if test -n "$CODESIGN"; then
24134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24135$as_echo "$CODESIGN" >&6; }
24136else
24137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24138$as_echo "no" >&6; }
24139fi
24140
24141
24142  test -n "$CODESIGN" && break
24143done
24144
24145  else
24146    # The variable is set, but is it from the command line or the environment?
24147
24148    # Try to remove the string !CODESIGN! from our list.
24149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24151      # If it failed, the variable was not from the command line. Ignore it,
24152      # but warn the user (except for BASH, which is always set by the calling BASH).
24153      if test "xCODESIGN" != xBASH; then
24154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24155$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24156      fi
24157      # Try to locate tool using the code snippet
24158      for ac_prog in codesign
24159do
24160  # Extract the first word of "$ac_prog", so it can be a program name with args.
24161set dummy $ac_prog; ac_word=$2
24162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24163$as_echo_n "checking for $ac_word... " >&6; }
24164if ${ac_cv_path_CODESIGN+:} false; then :
24165  $as_echo_n "(cached) " >&6
24166else
24167  case $CODESIGN in
24168  [\\/]* | ?:[\\/]*)
24169  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24170  ;;
24171  *)
24172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24173for as_dir in $PATH
24174do
24175  IFS=$as_save_IFS
24176  test -z "$as_dir" && as_dir=.
24177    for ac_exec_ext in '' $ac_executable_extensions; do
24178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24179    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24181    break 2
24182  fi
24183done
24184  done
24185IFS=$as_save_IFS
24186
24187  ;;
24188esac
24189fi
24190CODESIGN=$ac_cv_path_CODESIGN
24191if test -n "$CODESIGN"; then
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24193$as_echo "$CODESIGN" >&6; }
24194else
24195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24196$as_echo "no" >&6; }
24197fi
24198
24199
24200  test -n "$CODESIGN" && break
24201done
24202
24203    else
24204      # If it succeeded, then it was overridden by the user. We will use it
24205      # for the tool.
24206
24207      # First remove it from the list of overridden variables, so we can test
24208      # for unknown variables in the end.
24209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24210
24211      # Check if we try to supply an empty value
24212      if test "x$CODESIGN" = x; then
24213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24214$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24216$as_echo_n "checking for CODESIGN... " >&6; }
24217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24218$as_echo "disabled" >&6; }
24219      else
24220        # Check if the provided tool contains a complete path.
24221        tool_specified="$CODESIGN"
24222        tool_basename="${tool_specified##*/}"
24223        if test "x$tool_basename" = "x$tool_specified"; then
24224          # A command without a complete path is provided, search $PATH.
24225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24226$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24227          # Extract the first word of "$tool_basename", so it can be a program name with args.
24228set dummy $tool_basename; ac_word=$2
24229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24230$as_echo_n "checking for $ac_word... " >&6; }
24231if ${ac_cv_path_CODESIGN+:} false; then :
24232  $as_echo_n "(cached) " >&6
24233else
24234  case $CODESIGN in
24235  [\\/]* | ?:[\\/]*)
24236  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24237  ;;
24238  *)
24239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24240for as_dir in $PATH
24241do
24242  IFS=$as_save_IFS
24243  test -z "$as_dir" && as_dir=.
24244    for ac_exec_ext in '' $ac_executable_extensions; do
24245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24246    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24248    break 2
24249  fi
24250done
24251  done
24252IFS=$as_save_IFS
24253
24254  ;;
24255esac
24256fi
24257CODESIGN=$ac_cv_path_CODESIGN
24258if test -n "$CODESIGN"; then
24259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24260$as_echo "$CODESIGN" >&6; }
24261else
24262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24263$as_echo "no" >&6; }
24264fi
24265
24266
24267          if test "x$CODESIGN" = x; then
24268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24269          fi
24270        else
24271          # Otherwise we believe it is a complete path. Use it as it is.
24272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24273$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24275$as_echo_n "checking for CODESIGN... " >&6; }
24276          if test ! -x "$tool_specified"; then
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24278$as_echo "not found" >&6; }
24279            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24280          fi
24281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24282$as_echo "$tool_specified" >&6; }
24283        fi
24284      fi
24285    fi
24286
24287  fi
24288
24289
24290    if test "x$CODESIGN" != "x"; then
24291      # Verify that the openjdk_codesign certificate is present
24292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24293$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24294      $RM codesign-testfile
24295      $TOUCH codesign-testfile
24296      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24297      $RM codesign-testfile
24298      if test "x$CODESIGN" = x; then
24299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24300$as_echo "no" >&6; }
24301      else
24302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24303$as_echo "yes" >&6; }
24304      fi
24305    fi
24306
24307
24308
24309  # Publish this variable in the help.
24310
24311
24312  if [ -z "${SETFILE+x}" ]; then
24313    # The variable is not set by user, try to locate tool using the code snippet
24314    for ac_prog in SetFile
24315do
24316  # Extract the first word of "$ac_prog", so it can be a program name with args.
24317set dummy $ac_prog; ac_word=$2
24318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24319$as_echo_n "checking for $ac_word... " >&6; }
24320if ${ac_cv_path_SETFILE+:} false; then :
24321  $as_echo_n "(cached) " >&6
24322else
24323  case $SETFILE in
24324  [\\/]* | ?:[\\/]*)
24325  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24326  ;;
24327  *)
24328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24329for as_dir in $PATH
24330do
24331  IFS=$as_save_IFS
24332  test -z "$as_dir" && as_dir=.
24333    for ac_exec_ext in '' $ac_executable_extensions; do
24334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24335    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24337    break 2
24338  fi
24339done
24340  done
24341IFS=$as_save_IFS
24342
24343  ;;
24344esac
24345fi
24346SETFILE=$ac_cv_path_SETFILE
24347if test -n "$SETFILE"; then
24348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24349$as_echo "$SETFILE" >&6; }
24350else
24351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24352$as_echo "no" >&6; }
24353fi
24354
24355
24356  test -n "$SETFILE" && break
24357done
24358
24359  else
24360    # The variable is set, but is it from the command line or the environment?
24361
24362    # Try to remove the string !SETFILE! from our list.
24363    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24364    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24365      # If it failed, the variable was not from the command line. Ignore it,
24366      # but warn the user (except for BASH, which is always set by the calling BASH).
24367      if test "xSETFILE" != xBASH; then
24368        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24369$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24370      fi
24371      # Try to locate tool using the code snippet
24372      for ac_prog in SetFile
24373do
24374  # Extract the first word of "$ac_prog", so it can be a program name with args.
24375set dummy $ac_prog; ac_word=$2
24376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24377$as_echo_n "checking for $ac_word... " >&6; }
24378if ${ac_cv_path_SETFILE+:} false; then :
24379  $as_echo_n "(cached) " >&6
24380else
24381  case $SETFILE in
24382  [\\/]* | ?:[\\/]*)
24383  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24384  ;;
24385  *)
24386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24387for as_dir in $PATH
24388do
24389  IFS=$as_save_IFS
24390  test -z "$as_dir" && as_dir=.
24391    for ac_exec_ext in '' $ac_executable_extensions; do
24392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24393    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24395    break 2
24396  fi
24397done
24398  done
24399IFS=$as_save_IFS
24400
24401  ;;
24402esac
24403fi
24404SETFILE=$ac_cv_path_SETFILE
24405if test -n "$SETFILE"; then
24406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24407$as_echo "$SETFILE" >&6; }
24408else
24409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24410$as_echo "no" >&6; }
24411fi
24412
24413
24414  test -n "$SETFILE" && break
24415done
24416
24417    else
24418      # If it succeeded, then it was overridden by the user. We will use it
24419      # for the tool.
24420
24421      # First remove it from the list of overridden variables, so we can test
24422      # for unknown variables in the end.
24423      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24424
24425      # Check if we try to supply an empty value
24426      if test "x$SETFILE" = x; then
24427        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24428$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24429        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24430$as_echo_n "checking for SETFILE... " >&6; }
24431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24432$as_echo "disabled" >&6; }
24433      else
24434        # Check if the provided tool contains a complete path.
24435        tool_specified="$SETFILE"
24436        tool_basename="${tool_specified##*/}"
24437        if test "x$tool_basename" = "x$tool_specified"; then
24438          # A command without a complete path is provided, search $PATH.
24439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24440$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24441          # Extract the first word of "$tool_basename", so it can be a program name with args.
24442set dummy $tool_basename; ac_word=$2
24443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24444$as_echo_n "checking for $ac_word... " >&6; }
24445if ${ac_cv_path_SETFILE+:} false; then :
24446  $as_echo_n "(cached) " >&6
24447else
24448  case $SETFILE in
24449  [\\/]* | ?:[\\/]*)
24450  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24451  ;;
24452  *)
24453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24454for as_dir in $PATH
24455do
24456  IFS=$as_save_IFS
24457  test -z "$as_dir" && as_dir=.
24458    for ac_exec_ext in '' $ac_executable_extensions; do
24459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24460    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24462    break 2
24463  fi
24464done
24465  done
24466IFS=$as_save_IFS
24467
24468  ;;
24469esac
24470fi
24471SETFILE=$ac_cv_path_SETFILE
24472if test -n "$SETFILE"; then
24473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24474$as_echo "$SETFILE" >&6; }
24475else
24476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24477$as_echo "no" >&6; }
24478fi
24479
24480
24481          if test "x$SETFILE" = x; then
24482            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24483          fi
24484        else
24485          # Otherwise we believe it is a complete path. Use it as it is.
24486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24487$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24488          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24489$as_echo_n "checking for SETFILE... " >&6; }
24490          if test ! -x "$tool_specified"; then
24491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24492$as_echo "not found" >&6; }
24493            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24494          fi
24495          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24496$as_echo "$tool_specified" >&6; }
24497        fi
24498      fi
24499    fi
24500
24501  fi
24502
24503
24504
24505  if test "x$SETFILE" = x; then
24506    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24507  fi
24508
24509
24510  fi
24511
24512
24513  # Check bash version
24514  # Extra [ ] to stop m4 mangling
24515   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24517$as_echo_n "checking bash version... " >&6; }
24518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24519$as_echo "$BASH_VER" >&6; }
24520
24521  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24522  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24523  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24524    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24525  fi
24526
24527  # Test if bash supports pipefail.
24528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24529$as_echo_n "checking if bash supports pipefail... " >&6; }
24530  if ${BASH} -c 'set -o pipefail'; then
24531    BASH_ARGS="$BASH_ARGS -o pipefail"
24532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24533$as_echo "yes" >&6; }
24534  else
24535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24536$as_echo "no" >&6; }
24537  fi
24538
24539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24540$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24541  if ${BASH} -e -c 'true'; then
24542    BASH_ARGS="$BASH_ARGS -e"
24543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24544$as_echo "yes" >&6; }
24545  else
24546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24547$as_echo "no" >&6; }
24548  fi
24549
24550
24551
24552
24553# Check if pkg-config is available.
24554
24555
24556if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24557	if test -n "$ac_tool_prefix"; then
24558  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24559set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24561$as_echo_n "checking for $ac_word... " >&6; }
24562if ${ac_cv_path_PKG_CONFIG+:} false; then :
24563  $as_echo_n "(cached) " >&6
24564else
24565  case $PKG_CONFIG in
24566  [\\/]* | ?:[\\/]*)
24567  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24568  ;;
24569  *)
24570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24571for as_dir in $PATH
24572do
24573  IFS=$as_save_IFS
24574  test -z "$as_dir" && as_dir=.
24575    for ac_exec_ext in '' $ac_executable_extensions; do
24576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24577    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24579    break 2
24580  fi
24581done
24582  done
24583IFS=$as_save_IFS
24584
24585  ;;
24586esac
24587fi
24588PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24589if test -n "$PKG_CONFIG"; then
24590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24591$as_echo "$PKG_CONFIG" >&6; }
24592else
24593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24594$as_echo "no" >&6; }
24595fi
24596
24597
24598fi
24599if test -z "$ac_cv_path_PKG_CONFIG"; then
24600  ac_pt_PKG_CONFIG=$PKG_CONFIG
24601  # Extract the first word of "pkg-config", so it can be a program name with args.
24602set dummy pkg-config; ac_word=$2
24603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24604$as_echo_n "checking for $ac_word... " >&6; }
24605if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24606  $as_echo_n "(cached) " >&6
24607else
24608  case $ac_pt_PKG_CONFIG in
24609  [\\/]* | ?:[\\/]*)
24610  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24611  ;;
24612  *)
24613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24614for as_dir in $PATH
24615do
24616  IFS=$as_save_IFS
24617  test -z "$as_dir" && as_dir=.
24618    for ac_exec_ext in '' $ac_executable_extensions; do
24619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24620    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24622    break 2
24623  fi
24624done
24625  done
24626IFS=$as_save_IFS
24627
24628  ;;
24629esac
24630fi
24631ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24632if test -n "$ac_pt_PKG_CONFIG"; then
24633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24634$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24635else
24636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24637$as_echo "no" >&6; }
24638fi
24639
24640  if test "x$ac_pt_PKG_CONFIG" = x; then
24641    PKG_CONFIG=""
24642  else
24643    case $cross_compiling:$ac_tool_warned in
24644yes:)
24645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24647ac_tool_warned=yes ;;
24648esac
24649    PKG_CONFIG=$ac_pt_PKG_CONFIG
24650  fi
24651else
24652  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24653fi
24654
24655fi
24656if test -n "$PKG_CONFIG"; then
24657	_pkg_min_version=0.9.0
24658	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24659$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24660	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24661		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24662$as_echo "yes" >&6; }
24663	else
24664		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24665$as_echo "no" >&6; }
24666		PKG_CONFIG=""
24667	fi
24668
24669fi
24670
24671# After basic tools have been setup, we can check build os specific details.
24672
24673  ###############################################################################
24674
24675  # Note that this is the build platform OS version!
24676
24677  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24678  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24679  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24680  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24681
24682
24683
24684
24685
24686# Misc basic settings
24687
24688
24689# Check whether --with-default-make-target was given.
24690if test "${with_default_make_target+set}" = set; then :
24691  withval=$with_default_make_target;
24692fi
24693
24694  if test "x$with_default_make_target" = "x" \
24695      || test "x$with_default_make_target" = "xyes"; then
24696    DEFAULT_MAKE_TARGET="exploded-image"
24697  elif test "x$with_default_make_target" = "xno"; then
24698    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24699  else
24700    DEFAULT_MAKE_TARGET="$with_default_make_target"
24701  fi
24702
24703
24704
24705
24706###############################################################################
24707#
24708# Determine OpenJDK variants, options and version numbers.
24709#
24710###############################################################################
24711
24712# We need build & target for this.
24713
24714  # Should we build a JDK without a graphical UI?
24715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24716$as_echo_n "checking headless only... " >&6; }
24717  # Check whether --enable-headless-only was given.
24718if test "${enable_headless_only+set}" = set; then :
24719  enableval=$enable_headless_only;
24720fi
24721
24722
24723  if test "x$enable_headless_only" = "xyes"; then
24724    ENABLE_HEADLESS_ONLY="true"
24725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24726$as_echo "yes" >&6; }
24727  elif test "x$enable_headless_only" = "xno"; then
24728    ENABLE_HEADLESS_ONLY="false"
24729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24730$as_echo "no" >&6; }
24731  elif test "x$enable_headless_only" = "x"; then
24732    ENABLE_HEADLESS_ONLY="false"
24733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24734$as_echo "no" >&6; }
24735  else
24736    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24737  fi
24738
24739
24740
24741  # Should we build the complete docs, or just a lightweight version?
24742  # Check whether --enable-full-docs was given.
24743if test "${enable_full_docs+set}" = set; then :
24744  enableval=$enable_full_docs;
24745fi
24746
24747
24748  # Verify dependencies
24749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24750$as_echo_n "checking for graphviz dot... " >&6; }
24751  if test "x$DOT" != "x"; then
24752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24753$as_echo "yes" >&6; }
24754  else
24755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24756$as_echo "no, cannot generate full docs" >&6; }
24757    FULL_DOCS_DEP_MISSING=true
24758  fi
24759
24760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24761$as_echo_n "checking for pandoc... " >&6; }
24762  if test "x$PANDOC" != "x"; then
24763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24764$as_echo "yes" >&6; }
24765  else
24766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24767$as_echo "no, cannot generate full docs" >&6; }
24768    FULL_DOCS_DEP_MISSING=true
24769  fi
24770
24771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24772$as_echo_n "checking full docs... " >&6; }
24773  if test "x$enable_full_docs" = xyes; then
24774    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24776$as_echo "no, missing dependencies" >&6; }
24777
24778  # Print a helpful message on how to acquire the necessary build dependency.
24779  # dot is the help tag: freetype, cups, alsa etc
24780  MISSING_DEPENDENCY=dot
24781
24782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24783    cygwin_help $MISSING_DEPENDENCY
24784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24785    msys_help $MISSING_DEPENDENCY
24786  else
24787    PKGHANDLER_COMMAND=
24788
24789    case $PKGHANDLER in
24790      apt-get)
24791        apt_help     $MISSING_DEPENDENCY ;;
24792      yum)
24793        yum_help     $MISSING_DEPENDENCY ;;
24794      brew)
24795        brew_help    $MISSING_DEPENDENCY ;;
24796      port)
24797        port_help    $MISSING_DEPENDENCY ;;
24798      pkgutil)
24799        pkgutil_help $MISSING_DEPENDENCY ;;
24800      pkgadd)
24801        pkgadd_help  $MISSING_DEPENDENCY ;;
24802    esac
24803
24804    if test "x$PKGHANDLER_COMMAND" != x; then
24805      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24806    fi
24807  fi
24808
24809      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24810    else
24811      ENABLE_FULL_DOCS=true
24812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24813$as_echo "yes, forced" >&6; }
24814    fi
24815  elif test "x$enable_full_docs" = xno; then
24816    ENABLE_FULL_DOCS=false
24817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24818$as_echo "no, forced" >&6; }
24819  elif test "x$enable_full_docs" = x; then
24820    # Check for prerequisites
24821    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24822      ENABLE_FULL_DOCS=false
24823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24824$as_echo "no, missing dependencies" >&6; }
24825    else
24826      ENABLE_FULL_DOCS=true
24827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24828$as_echo "yes, dependencies present" >&6; }
24829    fi
24830  else
24831    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24832  fi
24833
24834
24835
24836  # Choose cacerts source file
24837
24838# Check whether --with-cacerts-file was given.
24839if test "${with_cacerts_file+set}" = set; then :
24840  withval=$with_cacerts_file;
24841fi
24842
24843  if test "x$with_cacerts_file" != x; then
24844    CACERTS_FILE=$with_cacerts_file
24845  fi
24846
24847
24848  # Enable or disable unlimited crypto
24849  # Check whether --enable-unlimited-crypto was given.
24850if test "${enable_unlimited_crypto+set}" = set; then :
24851  enableval=$enable_unlimited_crypto;
24852else
24853  enable_unlimited_crypto=yes
24854fi
24855
24856  if test "x$enable_unlimited_crypto" = "xyes"; then
24857    UNLIMITED_CRYPTO=true
24858  else
24859    UNLIMITED_CRYPTO=false
24860  fi
24861
24862
24863  # Should we build the serviceability agent (SA)?
24864  INCLUDE_SA=true
24865  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24866    INCLUDE_SA=false
24867  fi
24868  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24869    INCLUDE_SA=false
24870  fi
24871
24872
24873  # Compress jars
24874  COMPRESS_JARS=false
24875
24876
24877
24878  # Setup default copyright year. Mostly overridden when building close to a new year.
24879
24880# Check whether --with-copyright-year was given.
24881if test "${with_copyright_year+set}" = set; then :
24882  withval=$with_copyright_year;
24883fi
24884
24885  if test "x$with_copyright_year" = xyes; then
24886    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24887  elif test "x$with_copyright_year" != x; then
24888    COPYRIGHT_YEAR="$with_copyright_year"
24889  else
24890    COPYRIGHT_YEAR=`$DATE +'%Y'`
24891  fi
24892
24893
24894
24895  # Check whether --enable-keep-packaged-modules was given.
24896if test "${enable_keep_packaged_modules+set}" = set; then :
24897  enableval=$enable_keep_packaged_modules;
24898fi
24899
24900
24901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24902$as_echo_n "checking if packaged modules are kept... " >&6; }
24903  if test "x$enable_keep_packaged_modules" = "xyes"; then
24904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24905$as_echo "yes" >&6; }
24906    JLINK_KEEP_PACKAGED_MODULES=true
24907  elif test "x$enable_keep_packaged_modules" = "xno"; then
24908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24909$as_echo "no" >&6; }
24910    JLINK_KEEP_PACKAGED_MODULES=false
24911  elif test "x$enable_keep_packaged_modules" = "x"; then
24912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24913$as_echo "yes (default)" >&6; }
24914    JLINK_KEEP_PACKAGED_MODULES=true
24915  else
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24917$as_echo "error" >&6; }
24918    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24919  fi
24920
24921
24922
24923
24924  # Warn user that old version arguments are deprecated.
24925
24926
24927# Check whether --with-milestone was given.
24928if test "${with_milestone+set}" = set; then :
24929  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24930$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24931fi
24932
24933
24934
24935
24936# Check whether --with-update-version was given.
24937if test "${with_update_version+set}" = set; then :
24938  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24939$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24940fi
24941
24942
24943
24944
24945# Check whether --with-user-release-suffix was given.
24946if test "${with_user_release_suffix+set}" = set; then :
24947  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
24948$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24949fi
24950
24951
24952
24953
24954# Check whether --with-build-number was given.
24955if test "${with_build_number+set}" = set; then :
24956  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24957$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24958fi
24959
24960
24961
24962  # Source the version numbers file
24963  . $AUTOCONF_DIR/version-numbers
24964
24965  # Some non-version number information is set in that file
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975  # Override version from arguments
24976
24977  # If --with-version-string is set, process it first. It is possible to
24978  # override parts with more specific flags, since these are processed later.
24979
24980# Check whether --with-version-string was given.
24981if test "${with_version_string+set}" = set; then :
24982  withval=$with_version_string;
24983fi
24984
24985  if test "x$with_version_string" = xyes; then
24986    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24987  elif test "x$with_version_string" != x; then
24988    # Additional [] needed to keep m4 from mangling shell constructs.
24989    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24990      VERSION_MAJOR=${BASH_REMATCH[1]}
24991      VERSION_MINOR=${BASH_REMATCH[3]}
24992      VERSION_SECURITY=${BASH_REMATCH[5]}
24993      VERSION_PATCH=${BASH_REMATCH[7]}
24994      VERSION_PRE=${BASH_REMATCH[9]}
24995      version_plus_separator=${BASH_REMATCH[11]}
24996      VERSION_BUILD=${BASH_REMATCH[12]}
24997      VERSION_OPT=${BASH_REMATCH[14]}
24998      # Unspecified numerical fields are interpreted as 0.
24999      if test "x$VERSION_MINOR" = x; then
25000        VERSION_MINOR=0
25001      fi
25002      if test "x$VERSION_SECURITY" = x; then
25003        VERSION_SECURITY=0
25004      fi
25005      if test "x$VERSION_PATCH" = x; then
25006        VERSION_PATCH=0
25007      fi
25008      if test "x$version_plus_separator" != x \
25009          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25010        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25011      fi
25012      # Stop the version part process from setting default values.
25013      # We still allow them to explicitly override though.
25014      NO_DEFAULT_VERSION_PARTS=true
25015    else
25016      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25017    fi
25018  fi
25019
25020
25021# Check whether --with-version-pre was given.
25022if test "${with_version_pre+set}" = set; then :
25023  withval=$with_version_pre; with_version_pre_present=true
25024else
25025  with_version_pre_present=false
25026fi
25027
25028
25029  if test "x$with_version_pre_present" = xtrue; then
25030    if test "x$with_version_pre" = xyes; then
25031      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25032    elif test "x$with_version_pre" = xno; then
25033      # Interpret --without-* as empty string instead of the literal "no"
25034      VERSION_PRE=
25035    else
25036      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25037       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25038      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25040$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25041      fi
25042    fi
25043  else
25044    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25045      # Default is to use "internal" as pre
25046      VERSION_PRE="internal"
25047    fi
25048  fi
25049
25050
25051# Check whether --with-version-opt was given.
25052if test "${with_version_opt+set}" = set; then :
25053  withval=$with_version_opt; with_version_opt_present=true
25054else
25055  with_version_opt_present=false
25056fi
25057
25058
25059  if test "x$with_version_opt_present" = xtrue; then
25060    if test "x$with_version_opt" = xyes; then
25061      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25062    elif test "x$with_version_opt" = xno; then
25063      # Interpret --without-* as empty string instead of the literal "no"
25064      VERSION_OPT=
25065    else
25066      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25067       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25068      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25070$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25071      fi
25072    fi
25073  else
25074    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25075      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25076      # Outer [ ] to quote m4.
25077       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25078      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25079    fi
25080  fi
25081
25082
25083# Check whether --with-version-build was given.
25084if test "${with_version_build+set}" = set; then :
25085  withval=$with_version_build; with_version_build_present=true
25086else
25087  with_version_build_present=false
25088fi
25089
25090
25091  if test "x$with_version_build_present" = xtrue; then
25092    if test "x$with_version_build" = xyes; then
25093      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25094    elif test "x$with_version_build" = xno; then
25095      # Interpret --without-* as empty string instead of the literal "no"
25096      VERSION_BUILD=
25097    elif test "x$with_version_build" = x; then
25098      VERSION_BUILD=
25099    else
25100
25101  # Additional [] needed to keep m4 from mangling shell constructs.
25102  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25103    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25104  fi
25105  # Extract the version number without leading zeros.
25106  cleaned_value=${BASH_REMATCH[1]}
25107  if test "x$cleaned_value" = x; then
25108    # Special case for zero
25109    cleaned_value=${BASH_REMATCH[2]}
25110  fi
25111
25112  if test $cleaned_value -gt 255; then
25113    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25114  fi
25115  if test "x$cleaned_value" != "x$with_version_build"; then
25116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25117$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25118  fi
25119  VERSION_BUILD=$cleaned_value
25120
25121    fi
25122  else
25123    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25124      # Default is to not have a build number.
25125      VERSION_BUILD=""
25126      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25127      VERSION_BUILD=0
25128    fi
25129  fi
25130
25131
25132# Check whether --with-version-major was given.
25133if test "${with_version_major+set}" = set; then :
25134  withval=$with_version_major; with_version_major_present=true
25135else
25136  with_version_major_present=false
25137fi
25138
25139
25140  if test "x$with_version_major_present" = xtrue; then
25141    if test "x$with_version_major" = xyes; then
25142      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25143    else
25144
25145  # Additional [] needed to keep m4 from mangling shell constructs.
25146  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25147    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25148  fi
25149  # Extract the version number without leading zeros.
25150  cleaned_value=${BASH_REMATCH[1]}
25151  if test "x$cleaned_value" = x; then
25152    # Special case for zero
25153    cleaned_value=${BASH_REMATCH[2]}
25154  fi
25155
25156  if test $cleaned_value -gt 255; then
25157    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25158  fi
25159  if test "x$cleaned_value" != "x$with_version_major"; then
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25161$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25162  fi
25163  VERSION_MAJOR=$cleaned_value
25164
25165    fi
25166  else
25167    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25168      # Default is to get value from version-numbers
25169      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25170    fi
25171  fi
25172
25173
25174# Check whether --with-version-minor was given.
25175if test "${with_version_minor+set}" = set; then :
25176  withval=$with_version_minor; with_version_minor_present=true
25177else
25178  with_version_minor_present=false
25179fi
25180
25181
25182  if test "x$with_version_minor_present" = xtrue; then
25183    if test "x$with_version_minor" = xyes; then
25184      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25185    elif test "x$with_version_minor" = xno; then
25186      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25187      VERSION_MINOR=0
25188    elif test "x$with_version_minor" = x; then
25189      VERSION_MINOR=0
25190    else
25191
25192  # Additional [] needed to keep m4 from mangling shell constructs.
25193  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25194    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25195  fi
25196  # Extract the version number without leading zeros.
25197  cleaned_value=${BASH_REMATCH[1]}
25198  if test "x$cleaned_value" = x; then
25199    # Special case for zero
25200    cleaned_value=${BASH_REMATCH[2]}
25201  fi
25202
25203  if test $cleaned_value -gt 255; then
25204    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25205  fi
25206  if test "x$cleaned_value" != "x$with_version_minor"; then
25207    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25208$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25209  fi
25210  VERSION_MINOR=$cleaned_value
25211
25212    fi
25213  else
25214    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25215      # Default is 0, if unspecified
25216      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25217    fi
25218  fi
25219
25220
25221# Check whether --with-version-security was given.
25222if test "${with_version_security+set}" = set; then :
25223  withval=$with_version_security; with_version_security_present=true
25224else
25225  with_version_security_present=false
25226fi
25227
25228
25229  if test "x$with_version_security_present" = xtrue; then
25230    if test "x$with_version_security" = xyes; then
25231      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25232    elif test "x$with_version_security" = xno; then
25233      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25234      VERSION_SECURITY=0
25235    elif test "x$with_version_security" = x; then
25236      VERSION_SECURITY=0
25237    else
25238
25239  # Additional [] needed to keep m4 from mangling shell constructs.
25240  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25241    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25242  fi
25243  # Extract the version number without leading zeros.
25244  cleaned_value=${BASH_REMATCH[1]}
25245  if test "x$cleaned_value" = x; then
25246    # Special case for zero
25247    cleaned_value=${BASH_REMATCH[2]}
25248  fi
25249
25250  if test $cleaned_value -gt 255; then
25251    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25252  fi
25253  if test "x$cleaned_value" != "x$with_version_security"; then
25254    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25255$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25256  fi
25257  VERSION_SECURITY=$cleaned_value
25258
25259    fi
25260  else
25261    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25262      # Default is 0, if unspecified
25263      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25264    fi
25265  fi
25266
25267
25268# Check whether --with-version-patch was given.
25269if test "${with_version_patch+set}" = set; then :
25270  withval=$with_version_patch; with_version_patch_present=true
25271else
25272  with_version_patch_present=false
25273fi
25274
25275
25276  if test "x$with_version_patch_present" = xtrue; then
25277    if test "x$with_version_patch" = xyes; then
25278      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25279    elif test "x$with_version_patch" = xno; then
25280      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25281      VERSION_PATCH=0
25282    elif test "x$with_version_patch" = x; then
25283      VERSION_PATCH=0
25284    else
25285
25286  # Additional [] needed to keep m4 from mangling shell constructs.
25287  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25288    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25289  fi
25290  # Extract the version number without leading zeros.
25291  cleaned_value=${BASH_REMATCH[1]}
25292  if test "x$cleaned_value" = x; then
25293    # Special case for zero
25294    cleaned_value=${BASH_REMATCH[2]}
25295  fi
25296
25297  if test $cleaned_value -gt 255; then
25298    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25299  fi
25300  if test "x$cleaned_value" != "x$with_version_patch"; then
25301    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25302$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25303  fi
25304  VERSION_PATCH=$cleaned_value
25305
25306    fi
25307  else
25308    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25309      # Default is 0, if unspecified
25310      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25311    fi
25312  fi
25313
25314  # Calculate derived version properties
25315
25316  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25317  if test "x$VERSION_PRE" = x; then
25318    VERSION_IS_GA=true
25319  else
25320    VERSION_IS_GA=false
25321  fi
25322
25323  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25324  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25325
25326  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25327  # Strip trailing zeroes from stripped_version_number
25328  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25329  VERSION_NUMBER=$stripped_version_number
25330
25331  # The complete version string, with additional build information
25332  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25333    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25334  else
25335    # If either build or opt is set, we need a + separator
25336    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25337  fi
25338
25339  # The short version string, just VERSION_NUMBER and PRE, if present.
25340  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25341
25342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25343$as_echo_n "checking for version string... " >&6; }
25344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25345$as_echo "$VERSION_STRING" >&6; }
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361###############################################################################
25362#
25363# Setup BootJDK, used to bootstrap the build.
25364#
25365###############################################################################
25366
25367
25368  BOOT_JDK_FOUND=no
25369
25370# Check whether --with-boot-jdk was given.
25371if test "${with_boot_jdk+set}" = set; then :
25372  withval=$with_boot_jdk;
25373fi
25374
25375
25376  # We look for the Boot JDK through various means, going from more certain to
25377  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25378  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25379  # must check if this is indeed valid; otherwise we'll continue looking.
25380
25381  # Test: Is bootjdk explicitly set by command line arguments?
25382
25383  if test "x$BOOT_JDK_FOUND" = xno; then
25384    # Now execute the test
25385
25386  if test "x$with_boot_jdk" != x; then
25387    BOOT_JDK=$with_boot_jdk
25388    BOOT_JDK_FOUND=maybe
25389    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25390$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25391  fi
25392
25393
25394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25396      # Do we have a bin/java?
25397      if test ! -x "$BOOT_JDK/bin/java"; then
25398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25400        BOOT_JDK_FOUND=no
25401      else
25402        # Do we have a bin/javac?
25403        if test ! -x "$BOOT_JDK/bin/javac"; then
25404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25408          BOOT_JDK_FOUND=no
25409        else
25410          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25411          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25412
25413          # Extra M4 quote needed to protect [] in grep expression.
25414          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25415          if test "x$FOUND_CORRECT_VERSION" = x; then
25416            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25418            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25419$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25420            BOOT_JDK_FOUND=no
25421          else
25422            # We're done! :-)
25423            BOOT_JDK_FOUND=yes
25424
25425  # Only process if variable expands to non-empty
25426
25427  if test "x$BOOT_JDK" != x; then
25428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25429
25430  # Input might be given as Windows format, start by converting to
25431  # unix format.
25432  path="$BOOT_JDK"
25433  new_path=`$CYGPATH -u "$path"`
25434
25435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25438  # "foo.exe" is OK but "foo" is an error.
25439  #
25440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25441  # It is also a way to make sure we got the proper file name for the real test later on.
25442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25443  if test "x$test_shortpath" = x; then
25444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25446    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25447  fi
25448
25449  # Call helper function which possibly converts this using DOS-style short mode.
25450  # If so, the updated path is stored in $new_path.
25451
25452  input_path="$new_path"
25453  # Check if we need to convert this using DOS-style short mode. If the path
25454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25455  # take no chances and rewrite it.
25456  # Note: m4 eats our [], so we need to use [ and ] instead.
25457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25458  if test "x$has_forbidden_chars" != x; then
25459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25463      # Going to short mode and back again did indeed matter. Since short mode is
25464      # case insensitive, let's make it lowercase to improve readability.
25465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25466      # Now convert it back to Unix-style (cygpath)
25467      input_path=`$CYGPATH -u "$shortmode_path"`
25468      new_path="$input_path"
25469    fi
25470  fi
25471
25472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25473  if test "x$test_cygdrive_prefix" = x; then
25474    # As a simple fix, exclude /usr/bin since it's not a real path.
25475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25477      # a path prefixed by /cygdrive for fixpath to work.
25478      new_path="$CYGWIN_ROOT_PATH$input_path"
25479    fi
25480  fi
25481
25482
25483  if test "x$path" != "x$new_path"; then
25484    BOOT_JDK="$new_path"
25485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25487  fi
25488
25489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490
25491  path="$BOOT_JDK"
25492  has_colon=`$ECHO $path | $GREP ^.:`
25493  new_path="$path"
25494  if test "x$has_colon" = x; then
25495    # Not in mixed or Windows style, start by that.
25496    new_path=`cmd //c echo $path`
25497  fi
25498
25499
25500  input_path="$new_path"
25501  # Check if we need to convert this using DOS-style short mode. If the path
25502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25503  # take no chances and rewrite it.
25504  # Note: m4 eats our [], so we need to use [ and ] instead.
25505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25506  if test "x$has_forbidden_chars" != x; then
25507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25509  fi
25510
25511
25512  windows_path="$new_path"
25513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25514    unix_path=`$CYGPATH -u "$windows_path"`
25515    new_path="$unix_path"
25516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25518    new_path="$unix_path"
25519  fi
25520
25521  if test "x$path" != "x$new_path"; then
25522    BOOT_JDK="$new_path"
25523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25525  fi
25526
25527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25529
25530    else
25531      # We're on a unix platform. Hooray! :)
25532      path="$BOOT_JDK"
25533      has_space=`$ECHO "$path" | $GREP " "`
25534      if test "x$has_space" != x; then
25535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25537        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25538      fi
25539
25540      # Use eval to expand a potential ~
25541      eval path="$path"
25542      if test ! -f "$path" && test ! -d "$path"; then
25543        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25544      fi
25545
25546      if test -d "$path"; then
25547        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25548      else
25549        dir="`$DIRNAME "$path"`"
25550        base="`$BASENAME "$path"`"
25551        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25552      fi
25553    fi
25554  fi
25555
25556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25557$as_echo_n "checking for Boot JDK... " >&6; }
25558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25559$as_echo "$BOOT_JDK" >&6; }
25560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25561$as_echo_n "checking Boot JDK version... " >&6; }
25562            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25564$as_echo "$BOOT_JDK_VERSION" >&6; }
25565          fi # end check jdk version
25566        fi # end check javac
25567      fi # end check java
25568    fi # end check boot jdk found
25569  fi
25570
25571  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25572    # Having specified an argument which is incorrect will produce an instant failure;
25573    # we should not go on looking
25574    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25575  fi
25576
25577  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25578
25579  if test "x$BOOT_JDK_FOUND" = xno; then
25580    # Now execute the test
25581
25582  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25583    # First check at user selected default
25584
25585  if test "x$BOOT_JDK_FOUND" = xno; then
25586    # Now execute the test
25587
25588  if test -x /usr/libexec/java_home; then
25589    BOOT_JDK=`/usr/libexec/java_home `
25590    BOOT_JDK_FOUND=maybe
25591    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25592$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25593  fi
25594
25595
25596    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25597    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25598      # Do we have a bin/java?
25599      if test ! -x "$BOOT_JDK/bin/java"; then
25600        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25602        BOOT_JDK_FOUND=no
25603      else
25604        # Do we have a bin/javac?
25605        if test ! -x "$BOOT_JDK/bin/javac"; then
25606          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25608          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25609$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25610          BOOT_JDK_FOUND=no
25611        else
25612          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25613          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25614
25615          # Extra M4 quote needed to protect [] in grep expression.
25616          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25617          if test "x$FOUND_CORRECT_VERSION" = x; then
25618            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25620            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25621$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25622            BOOT_JDK_FOUND=no
25623          else
25624            # We're done! :-)
25625            BOOT_JDK_FOUND=yes
25626
25627  # Only process if variable expands to non-empty
25628
25629  if test "x$BOOT_JDK" != x; then
25630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25631
25632  # Input might be given as Windows format, start by converting to
25633  # unix format.
25634  path="$BOOT_JDK"
25635  new_path=`$CYGPATH -u "$path"`
25636
25637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25640  # "foo.exe" is OK but "foo" is an error.
25641  #
25642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25643  # It is also a way to make sure we got the proper file name for the real test later on.
25644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25645  if test "x$test_shortpath" = x; then
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25648    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25649  fi
25650
25651  # Call helper function which possibly converts this using DOS-style short mode.
25652  # If so, the updated path is stored in $new_path.
25653
25654  input_path="$new_path"
25655  # Check if we need to convert this using DOS-style short mode. If the path
25656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25657  # take no chances and rewrite it.
25658  # Note: m4 eats our [], so we need to use [ and ] instead.
25659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25660  if test "x$has_forbidden_chars" != x; then
25661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25665      # Going to short mode and back again did indeed matter. Since short mode is
25666      # case insensitive, let's make it lowercase to improve readability.
25667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668      # Now convert it back to Unix-style (cygpath)
25669      input_path=`$CYGPATH -u "$shortmode_path"`
25670      new_path="$input_path"
25671    fi
25672  fi
25673
25674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25675  if test "x$test_cygdrive_prefix" = x; then
25676    # As a simple fix, exclude /usr/bin since it's not a real path.
25677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25679      # a path prefixed by /cygdrive for fixpath to work.
25680      new_path="$CYGWIN_ROOT_PATH$input_path"
25681    fi
25682  fi
25683
25684
25685  if test "x$path" != "x$new_path"; then
25686    BOOT_JDK="$new_path"
25687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25689  fi
25690
25691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25692
25693  path="$BOOT_JDK"
25694  has_colon=`$ECHO $path | $GREP ^.:`
25695  new_path="$path"
25696  if test "x$has_colon" = x; then
25697    # Not in mixed or Windows style, start by that.
25698    new_path=`cmd //c echo $path`
25699  fi
25700
25701
25702  input_path="$new_path"
25703  # Check if we need to convert this using DOS-style short mode. If the path
25704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25705  # take no chances and rewrite it.
25706  # Note: m4 eats our [], so we need to use [ and ] instead.
25707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25708  if test "x$has_forbidden_chars" != x; then
25709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25711  fi
25712
25713
25714  windows_path="$new_path"
25715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25716    unix_path=`$CYGPATH -u "$windows_path"`
25717    new_path="$unix_path"
25718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25720    new_path="$unix_path"
25721  fi
25722
25723  if test "x$path" != "x$new_path"; then
25724    BOOT_JDK="$new_path"
25725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25726$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25727  fi
25728
25729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25731
25732    else
25733      # We're on a unix platform. Hooray! :)
25734      path="$BOOT_JDK"
25735      has_space=`$ECHO "$path" | $GREP " "`
25736      if test "x$has_space" != x; then
25737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25740      fi
25741
25742      # Use eval to expand a potential ~
25743      eval path="$path"
25744      if test ! -f "$path" && test ! -d "$path"; then
25745        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25746      fi
25747
25748      if test -d "$path"; then
25749        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25750      else
25751        dir="`$DIRNAME "$path"`"
25752        base="`$BASENAME "$path"`"
25753        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25754      fi
25755    fi
25756  fi
25757
25758            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25759$as_echo_n "checking for Boot JDK... " >&6; }
25760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25761$as_echo "$BOOT_JDK" >&6; }
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25763$as_echo_n "checking Boot JDK version... " >&6; }
25764            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25766$as_echo "$BOOT_JDK_VERSION" >&6; }
25767          fi # end check jdk version
25768        fi # end check javac
25769      fi # end check java
25770    fi # end check boot jdk found
25771  fi
25772
25773    # If that did not work out (e.g. too old), try explicit versions instead
25774
25775  if test "x$BOOT_JDK_FOUND" = xno; then
25776    # Now execute the test
25777
25778  if test -x /usr/libexec/java_home; then
25779    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25780    BOOT_JDK_FOUND=maybe
25781    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25782$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25783  fi
25784
25785
25786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25788      # Do we have a bin/java?
25789      if test ! -x "$BOOT_JDK/bin/java"; then
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25792        BOOT_JDK_FOUND=no
25793      else
25794        # Do we have a bin/javac?
25795        if test ! -x "$BOOT_JDK/bin/javac"; then
25796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25800          BOOT_JDK_FOUND=no
25801        else
25802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25804
25805          # Extra M4 quote needed to protect [] in grep expression.
25806          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25807          if test "x$FOUND_CORRECT_VERSION" = x; then
25808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25812            BOOT_JDK_FOUND=no
25813          else
25814            # We're done! :-)
25815            BOOT_JDK_FOUND=yes
25816
25817  # Only process if variable expands to non-empty
25818
25819  if test "x$BOOT_JDK" != x; then
25820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821
25822  # Input might be given as Windows format, start by converting to
25823  # unix format.
25824  path="$BOOT_JDK"
25825  new_path=`$CYGPATH -u "$path"`
25826
25827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25830  # "foo.exe" is OK but "foo" is an error.
25831  #
25832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25833  # It is also a way to make sure we got the proper file name for the real test later on.
25834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25835  if test "x$test_shortpath" = x; then
25836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25839  fi
25840
25841  # Call helper function which possibly converts this using DOS-style short mode.
25842  # If so, the updated path is stored in $new_path.
25843
25844  input_path="$new_path"
25845  # Check if we need to convert this using DOS-style short mode. If the path
25846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25847  # take no chances and rewrite it.
25848  # Note: m4 eats our [], so we need to use [ and ] instead.
25849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25850  if test "x$has_forbidden_chars" != x; then
25851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25855      # Going to short mode and back again did indeed matter. Since short mode is
25856      # case insensitive, let's make it lowercase to improve readability.
25857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25858      # Now convert it back to Unix-style (cygpath)
25859      input_path=`$CYGPATH -u "$shortmode_path"`
25860      new_path="$input_path"
25861    fi
25862  fi
25863
25864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25865  if test "x$test_cygdrive_prefix" = x; then
25866    # As a simple fix, exclude /usr/bin since it's not a real path.
25867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25869      # a path prefixed by /cygdrive for fixpath to work.
25870      new_path="$CYGWIN_ROOT_PATH$input_path"
25871    fi
25872  fi
25873
25874
25875  if test "x$path" != "x$new_path"; then
25876    BOOT_JDK="$new_path"
25877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25879  fi
25880
25881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25882
25883  path="$BOOT_JDK"
25884  has_colon=`$ECHO $path | $GREP ^.:`
25885  new_path="$path"
25886  if test "x$has_colon" = x; then
25887    # Not in mixed or Windows style, start by that.
25888    new_path=`cmd //c echo $path`
25889  fi
25890
25891
25892  input_path="$new_path"
25893  # Check if we need to convert this using DOS-style short mode. If the path
25894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25895  # take no chances and rewrite it.
25896  # Note: m4 eats our [], so we need to use [ and ] instead.
25897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25898  if test "x$has_forbidden_chars" != x; then
25899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25901  fi
25902
25903
25904  windows_path="$new_path"
25905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25906    unix_path=`$CYGPATH -u "$windows_path"`
25907    new_path="$unix_path"
25908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25910    new_path="$unix_path"
25911  fi
25912
25913  if test "x$path" != "x$new_path"; then
25914    BOOT_JDK="$new_path"
25915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25917  fi
25918
25919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25921
25922    else
25923      # We're on a unix platform. Hooray! :)
25924      path="$BOOT_JDK"
25925      has_space=`$ECHO "$path" | $GREP " "`
25926      if test "x$has_space" != x; then
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25930      fi
25931
25932      # Use eval to expand a potential ~
25933      eval path="$path"
25934      if test ! -f "$path" && test ! -d "$path"; then
25935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25936      fi
25937
25938      if test -d "$path"; then
25939        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25940      else
25941        dir="`$DIRNAME "$path"`"
25942        base="`$BASENAME "$path"`"
25943        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25944      fi
25945    fi
25946  fi
25947
25948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25949$as_echo_n "checking for Boot JDK... " >&6; }
25950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25951$as_echo "$BOOT_JDK" >&6; }
25952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25953$as_echo_n "checking Boot JDK version... " >&6; }
25954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25956$as_echo "$BOOT_JDK_VERSION" >&6; }
25957          fi # end check jdk version
25958        fi # end check javac
25959      fi # end check java
25960    fi # end check boot jdk found
25961  fi
25962
25963
25964  if test "x$BOOT_JDK_FOUND" = xno; then
25965    # Now execute the test
25966
25967  if test -x /usr/libexec/java_home; then
25968    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25969    BOOT_JDK_FOUND=maybe
25970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25971$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25972  fi
25973
25974
25975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25977      # Do we have a bin/java?
25978      if test ! -x "$BOOT_JDK/bin/java"; then
25979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25981        BOOT_JDK_FOUND=no
25982      else
25983        # Do we have a bin/javac?
25984        if test ! -x "$BOOT_JDK/bin/javac"; then
25985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25989          BOOT_JDK_FOUND=no
25990        else
25991          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25992          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25993
25994          # Extra M4 quote needed to protect [] in grep expression.
25995          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25996          if test "x$FOUND_CORRECT_VERSION" = x; then
25997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25999            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26000$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26001            BOOT_JDK_FOUND=no
26002          else
26003            # We're done! :-)
26004            BOOT_JDK_FOUND=yes
26005
26006  # Only process if variable expands to non-empty
26007
26008  if test "x$BOOT_JDK" != x; then
26009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26010
26011  # Input might be given as Windows format, start by converting to
26012  # unix format.
26013  path="$BOOT_JDK"
26014  new_path=`$CYGPATH -u "$path"`
26015
26016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26019  # "foo.exe" is OK but "foo" is an error.
26020  #
26021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26022  # It is also a way to make sure we got the proper file name for the real test later on.
26023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26024  if test "x$test_shortpath" = x; then
26025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26027    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26028  fi
26029
26030  # Call helper function which possibly converts this using DOS-style short mode.
26031  # If so, the updated path is stored in $new_path.
26032
26033  input_path="$new_path"
26034  # Check if we need to convert this using DOS-style short mode. If the path
26035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26036  # take no chances and rewrite it.
26037  # Note: m4 eats our [], so we need to use [ and ] instead.
26038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26039  if test "x$has_forbidden_chars" != x; then
26040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26044      # Going to short mode and back again did indeed matter. Since short mode is
26045      # case insensitive, let's make it lowercase to improve readability.
26046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26047      # Now convert it back to Unix-style (cygpath)
26048      input_path=`$CYGPATH -u "$shortmode_path"`
26049      new_path="$input_path"
26050    fi
26051  fi
26052
26053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26054  if test "x$test_cygdrive_prefix" = x; then
26055    # As a simple fix, exclude /usr/bin since it's not a real path.
26056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26058      # a path prefixed by /cygdrive for fixpath to work.
26059      new_path="$CYGWIN_ROOT_PATH$input_path"
26060    fi
26061  fi
26062
26063
26064  if test "x$path" != "x$new_path"; then
26065    BOOT_JDK="$new_path"
26066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26068  fi
26069
26070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071
26072  path="$BOOT_JDK"
26073  has_colon=`$ECHO $path | $GREP ^.:`
26074  new_path="$path"
26075  if test "x$has_colon" = x; then
26076    # Not in mixed or Windows style, start by that.
26077    new_path=`cmd //c echo $path`
26078  fi
26079
26080
26081  input_path="$new_path"
26082  # Check if we need to convert this using DOS-style short mode. If the path
26083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26084  # take no chances and rewrite it.
26085  # Note: m4 eats our [], so we need to use [ and ] instead.
26086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26087  if test "x$has_forbidden_chars" != x; then
26088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26090  fi
26091
26092
26093  windows_path="$new_path"
26094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26095    unix_path=`$CYGPATH -u "$windows_path"`
26096    new_path="$unix_path"
26097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26099    new_path="$unix_path"
26100  fi
26101
26102  if test "x$path" != "x$new_path"; then
26103    BOOT_JDK="$new_path"
26104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26106  fi
26107
26108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26110
26111    else
26112      # We're on a unix platform. Hooray! :)
26113      path="$BOOT_JDK"
26114      has_space=`$ECHO "$path" | $GREP " "`
26115      if test "x$has_space" != x; then
26116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26119      fi
26120
26121      # Use eval to expand a potential ~
26122      eval path="$path"
26123      if test ! -f "$path" && test ! -d "$path"; then
26124        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26125      fi
26126
26127      if test -d "$path"; then
26128        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26129      else
26130        dir="`$DIRNAME "$path"`"
26131        base="`$BASENAME "$path"`"
26132        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26133      fi
26134    fi
26135  fi
26136
26137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26138$as_echo_n "checking for Boot JDK... " >&6; }
26139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26140$as_echo "$BOOT_JDK" >&6; }
26141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26142$as_echo_n "checking Boot JDK version... " >&6; }
26143            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26145$as_echo "$BOOT_JDK_VERSION" >&6; }
26146          fi # end check jdk version
26147        fi # end check javac
26148      fi # end check java
26149    fi # end check boot jdk found
26150  fi
26151
26152
26153  if test "x$BOOT_JDK_FOUND" = xno; then
26154    # Now execute the test
26155
26156  if test -x /usr/libexec/java_home; then
26157    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26158    BOOT_JDK_FOUND=maybe
26159    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26160$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26161  fi
26162
26163
26164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26166      # Do we have a bin/java?
26167      if test ! -x "$BOOT_JDK/bin/java"; then
26168        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26170        BOOT_JDK_FOUND=no
26171      else
26172        # Do we have a bin/javac?
26173        if test ! -x "$BOOT_JDK/bin/javac"; then
26174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26176          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26178          BOOT_JDK_FOUND=no
26179        else
26180          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26181          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26182
26183          # Extra M4 quote needed to protect [] in grep expression.
26184          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26185          if test "x$FOUND_CORRECT_VERSION" = x; then
26186            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26188            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26189$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26190            BOOT_JDK_FOUND=no
26191          else
26192            # We're done! :-)
26193            BOOT_JDK_FOUND=yes
26194
26195  # Only process if variable expands to non-empty
26196
26197  if test "x$BOOT_JDK" != x; then
26198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26199
26200  # Input might be given as Windows format, start by converting to
26201  # unix format.
26202  path="$BOOT_JDK"
26203  new_path=`$CYGPATH -u "$path"`
26204
26205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26208  # "foo.exe" is OK but "foo" is an error.
26209  #
26210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26211  # It is also a way to make sure we got the proper file name for the real test later on.
26212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26213  if test "x$test_shortpath" = x; then
26214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26217  fi
26218
26219  # Call helper function which possibly converts this using DOS-style short mode.
26220  # If so, the updated path is stored in $new_path.
26221
26222  input_path="$new_path"
26223  # Check if we need to convert this using DOS-style short mode. If the path
26224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26225  # take no chances and rewrite it.
26226  # Note: m4 eats our [], so we need to use [ and ] instead.
26227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26228  if test "x$has_forbidden_chars" != x; then
26229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26233      # Going to short mode and back again did indeed matter. Since short mode is
26234      # case insensitive, let's make it lowercase to improve readability.
26235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26236      # Now convert it back to Unix-style (cygpath)
26237      input_path=`$CYGPATH -u "$shortmode_path"`
26238      new_path="$input_path"
26239    fi
26240  fi
26241
26242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26243  if test "x$test_cygdrive_prefix" = x; then
26244    # As a simple fix, exclude /usr/bin since it's not a real path.
26245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26247      # a path prefixed by /cygdrive for fixpath to work.
26248      new_path="$CYGWIN_ROOT_PATH$input_path"
26249    fi
26250  fi
26251
26252
26253  if test "x$path" != "x$new_path"; then
26254    BOOT_JDK="$new_path"
26255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26257  fi
26258
26259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26260
26261  path="$BOOT_JDK"
26262  has_colon=`$ECHO $path | $GREP ^.:`
26263  new_path="$path"
26264  if test "x$has_colon" = x; then
26265    # Not in mixed or Windows style, start by that.
26266    new_path=`cmd //c echo $path`
26267  fi
26268
26269
26270  input_path="$new_path"
26271  # Check if we need to convert this using DOS-style short mode. If the path
26272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26273  # take no chances and rewrite it.
26274  # Note: m4 eats our [], so we need to use [ and ] instead.
26275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26276  if test "x$has_forbidden_chars" != x; then
26277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26279  fi
26280
26281
26282  windows_path="$new_path"
26283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26284    unix_path=`$CYGPATH -u "$windows_path"`
26285    new_path="$unix_path"
26286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26288    new_path="$unix_path"
26289  fi
26290
26291  if test "x$path" != "x$new_path"; then
26292    BOOT_JDK="$new_path"
26293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26295  fi
26296
26297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26299
26300    else
26301      # We're on a unix platform. Hooray! :)
26302      path="$BOOT_JDK"
26303      has_space=`$ECHO "$path" | $GREP " "`
26304      if test "x$has_space" != x; then
26305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26308      fi
26309
26310      # Use eval to expand a potential ~
26311      eval path="$path"
26312      if test ! -f "$path" && test ! -d "$path"; then
26313        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26314      fi
26315
26316      if test -d "$path"; then
26317        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26318      else
26319        dir="`$DIRNAME "$path"`"
26320        base="`$BASENAME "$path"`"
26321        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26322      fi
26323    fi
26324  fi
26325
26326            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26327$as_echo_n "checking for Boot JDK... " >&6; }
26328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26329$as_echo "$BOOT_JDK" >&6; }
26330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26331$as_echo_n "checking Boot JDK version... " >&6; }
26332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26334$as_echo "$BOOT_JDK_VERSION" >&6; }
26335          fi # end check jdk version
26336        fi # end check javac
26337      fi # end check java
26338    fi # end check boot jdk found
26339  fi
26340
26341  fi
26342
26343
26344    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26345    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26346      # Do we have a bin/java?
26347      if test ! -x "$BOOT_JDK/bin/java"; then
26348        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26350        BOOT_JDK_FOUND=no
26351      else
26352        # Do we have a bin/javac?
26353        if test ! -x "$BOOT_JDK/bin/javac"; then
26354          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26356          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26357$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26358          BOOT_JDK_FOUND=no
26359        else
26360          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26361          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26362
26363          # Extra M4 quote needed to protect [] in grep expression.
26364          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26365          if test "x$FOUND_CORRECT_VERSION" = x; then
26366            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26368            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26369$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26370            BOOT_JDK_FOUND=no
26371          else
26372            # We're done! :-)
26373            BOOT_JDK_FOUND=yes
26374
26375  # Only process if variable expands to non-empty
26376
26377  if test "x$BOOT_JDK" != x; then
26378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26379
26380  # Input might be given as Windows format, start by converting to
26381  # unix format.
26382  path="$BOOT_JDK"
26383  new_path=`$CYGPATH -u "$path"`
26384
26385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26388  # "foo.exe" is OK but "foo" is an error.
26389  #
26390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26391  # It is also a way to make sure we got the proper file name for the real test later on.
26392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26393  if test "x$test_shortpath" = x; then
26394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26396    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26397  fi
26398
26399  # Call helper function which possibly converts this using DOS-style short mode.
26400  # If so, the updated path is stored in $new_path.
26401
26402  input_path="$new_path"
26403  # Check if we need to convert this using DOS-style short mode. If the path
26404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26405  # take no chances and rewrite it.
26406  # Note: m4 eats our [], so we need to use [ and ] instead.
26407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26408  if test "x$has_forbidden_chars" != x; then
26409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26413      # Going to short mode and back again did indeed matter. Since short mode is
26414      # case insensitive, let's make it lowercase to improve readability.
26415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26416      # Now convert it back to Unix-style (cygpath)
26417      input_path=`$CYGPATH -u "$shortmode_path"`
26418      new_path="$input_path"
26419    fi
26420  fi
26421
26422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26423  if test "x$test_cygdrive_prefix" = x; then
26424    # As a simple fix, exclude /usr/bin since it's not a real path.
26425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26427      # a path prefixed by /cygdrive for fixpath to work.
26428      new_path="$CYGWIN_ROOT_PATH$input_path"
26429    fi
26430  fi
26431
26432
26433  if test "x$path" != "x$new_path"; then
26434    BOOT_JDK="$new_path"
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26437  fi
26438
26439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26440
26441  path="$BOOT_JDK"
26442  has_colon=`$ECHO $path | $GREP ^.:`
26443  new_path="$path"
26444  if test "x$has_colon" = x; then
26445    # Not in mixed or Windows style, start by that.
26446    new_path=`cmd //c echo $path`
26447  fi
26448
26449
26450  input_path="$new_path"
26451  # Check if we need to convert this using DOS-style short mode. If the path
26452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26453  # take no chances and rewrite it.
26454  # Note: m4 eats our [], so we need to use [ and ] instead.
26455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26456  if test "x$has_forbidden_chars" != x; then
26457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26459  fi
26460
26461
26462  windows_path="$new_path"
26463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26464    unix_path=`$CYGPATH -u "$windows_path"`
26465    new_path="$unix_path"
26466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26468    new_path="$unix_path"
26469  fi
26470
26471  if test "x$path" != "x$new_path"; then
26472    BOOT_JDK="$new_path"
26473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26475  fi
26476
26477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26479
26480    else
26481      # We're on a unix platform. Hooray! :)
26482      path="$BOOT_JDK"
26483      has_space=`$ECHO "$path" | $GREP " "`
26484      if test "x$has_space" != x; then
26485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26487        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26488      fi
26489
26490      # Use eval to expand a potential ~
26491      eval path="$path"
26492      if test ! -f "$path" && test ! -d "$path"; then
26493        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26494      fi
26495
26496      if test -d "$path"; then
26497        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26498      else
26499        dir="`$DIRNAME "$path"`"
26500        base="`$BASENAME "$path"`"
26501        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26502      fi
26503    fi
26504  fi
26505
26506            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26507$as_echo_n "checking for Boot JDK... " >&6; }
26508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26509$as_echo "$BOOT_JDK" >&6; }
26510            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26511$as_echo_n "checking Boot JDK version... " >&6; }
26512            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26513            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26514$as_echo "$BOOT_JDK_VERSION" >&6; }
26515          fi # end check jdk version
26516        fi # end check javac
26517      fi # end check java
26518    fi # end check boot jdk found
26519  fi
26520
26521
26522  # Test: Is $JAVA_HOME set?
26523
26524  if test "x$BOOT_JDK_FOUND" = xno; then
26525    # Now execute the test
26526
26527  if test "x$JAVA_HOME" != x; then
26528    JAVA_HOME_PROCESSED="$JAVA_HOME"
26529
26530  # Only process if variable expands to non-empty
26531
26532  if test "x$JAVA_HOME_PROCESSED" != x; then
26533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26534
26535  # Input might be given as Windows format, start by converting to
26536  # unix format.
26537  path="$JAVA_HOME_PROCESSED"
26538  new_path=`$CYGPATH -u "$path"`
26539
26540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26543  # "foo.exe" is OK but "foo" is an error.
26544  #
26545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26546  # It is also a way to make sure we got the proper file name for the real test later on.
26547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26548  if test "x$test_shortpath" = x; then
26549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26550$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26551    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26552  fi
26553
26554  # Call helper function which possibly converts this using DOS-style short mode.
26555  # If so, the updated path is stored in $new_path.
26556
26557  input_path="$new_path"
26558  # Check if we need to convert this using DOS-style short mode. If the path
26559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26560  # take no chances and rewrite it.
26561  # Note: m4 eats our [], so we need to use [ and ] instead.
26562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26563  if test "x$has_forbidden_chars" != x; then
26564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26568      # Going to short mode and back again did indeed matter. Since short mode is
26569      # case insensitive, let's make it lowercase to improve readability.
26570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26571      # Now convert it back to Unix-style (cygpath)
26572      input_path=`$CYGPATH -u "$shortmode_path"`
26573      new_path="$input_path"
26574    fi
26575  fi
26576
26577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26578  if test "x$test_cygdrive_prefix" = x; then
26579    # As a simple fix, exclude /usr/bin since it's not a real path.
26580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26582      # a path prefixed by /cygdrive for fixpath to work.
26583      new_path="$CYGWIN_ROOT_PATH$input_path"
26584    fi
26585  fi
26586
26587
26588  if test "x$path" != "x$new_path"; then
26589    JAVA_HOME_PROCESSED="$new_path"
26590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26591$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26592  fi
26593
26594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26595
26596  path="$JAVA_HOME_PROCESSED"
26597  has_colon=`$ECHO $path | $GREP ^.:`
26598  new_path="$path"
26599  if test "x$has_colon" = x; then
26600    # Not in mixed or Windows style, start by that.
26601    new_path=`cmd //c echo $path`
26602  fi
26603
26604
26605  input_path="$new_path"
26606  # Check if we need to convert this using DOS-style short mode. If the path
26607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26608  # take no chances and rewrite it.
26609  # Note: m4 eats our [], so we need to use [ and ] instead.
26610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26611  if test "x$has_forbidden_chars" != x; then
26612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26614  fi
26615
26616
26617  windows_path="$new_path"
26618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26619    unix_path=`$CYGPATH -u "$windows_path"`
26620    new_path="$unix_path"
26621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26623    new_path="$unix_path"
26624  fi
26625
26626  if test "x$path" != "x$new_path"; then
26627    JAVA_HOME_PROCESSED="$new_path"
26628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26629$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26630  fi
26631
26632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26634
26635    else
26636      # We're on a unix platform. Hooray! :)
26637      path="$JAVA_HOME_PROCESSED"
26638      has_space=`$ECHO "$path" | $GREP " "`
26639      if test "x$has_space" != x; then
26640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26641$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26643      fi
26644
26645      # Use eval to expand a potential ~
26646      eval path="$path"
26647      if test ! -f "$path" && test ! -d "$path"; then
26648        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26649      fi
26650
26651      if test -d "$path"; then
26652        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26653      else
26654        dir="`$DIRNAME "$path"`"
26655        base="`$BASENAME "$path"`"
26656        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26657      fi
26658    fi
26659  fi
26660
26661    if test ! -d "$JAVA_HOME_PROCESSED"; then
26662      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26663$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26664    else
26665      # Aha, the user has set a JAVA_HOME
26666      # let us use that as the Boot JDK.
26667      BOOT_JDK="$JAVA_HOME_PROCESSED"
26668      BOOT_JDK_FOUND=maybe
26669      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26670$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26671    fi
26672  fi
26673
26674
26675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26677      # Do we have a bin/java?
26678      if test ! -x "$BOOT_JDK/bin/java"; then
26679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26681        BOOT_JDK_FOUND=no
26682      else
26683        # Do we have a bin/javac?
26684        if test ! -x "$BOOT_JDK/bin/javac"; then
26685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26689          BOOT_JDK_FOUND=no
26690        else
26691          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26692          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26693
26694          # Extra M4 quote needed to protect [] in grep expression.
26695          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26696          if test "x$FOUND_CORRECT_VERSION" = x; then
26697            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26699            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26700$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26701            BOOT_JDK_FOUND=no
26702          else
26703            # We're done! :-)
26704            BOOT_JDK_FOUND=yes
26705
26706  # Only process if variable expands to non-empty
26707
26708  if test "x$BOOT_JDK" != x; then
26709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26710
26711  # Input might be given as Windows format, start by converting to
26712  # unix format.
26713  path="$BOOT_JDK"
26714  new_path=`$CYGPATH -u "$path"`
26715
26716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26719  # "foo.exe" is OK but "foo" is an error.
26720  #
26721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26722  # It is also a way to make sure we got the proper file name for the real test later on.
26723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26724  if test "x$test_shortpath" = x; then
26725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26727    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26728  fi
26729
26730  # Call helper function which possibly converts this using DOS-style short mode.
26731  # If so, the updated path is stored in $new_path.
26732
26733  input_path="$new_path"
26734  # Check if we need to convert this using DOS-style short mode. If the path
26735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26736  # take no chances and rewrite it.
26737  # Note: m4 eats our [], so we need to use [ and ] instead.
26738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26739  if test "x$has_forbidden_chars" != x; then
26740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26744      # Going to short mode and back again did indeed matter. Since short mode is
26745      # case insensitive, let's make it lowercase to improve readability.
26746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26747      # Now convert it back to Unix-style (cygpath)
26748      input_path=`$CYGPATH -u "$shortmode_path"`
26749      new_path="$input_path"
26750    fi
26751  fi
26752
26753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26754  if test "x$test_cygdrive_prefix" = x; then
26755    # As a simple fix, exclude /usr/bin since it's not a real path.
26756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26758      # a path prefixed by /cygdrive for fixpath to work.
26759      new_path="$CYGWIN_ROOT_PATH$input_path"
26760    fi
26761  fi
26762
26763
26764  if test "x$path" != "x$new_path"; then
26765    BOOT_JDK="$new_path"
26766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26768  fi
26769
26770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26771
26772  path="$BOOT_JDK"
26773  has_colon=`$ECHO $path | $GREP ^.:`
26774  new_path="$path"
26775  if test "x$has_colon" = x; then
26776    # Not in mixed or Windows style, start by that.
26777    new_path=`cmd //c echo $path`
26778  fi
26779
26780
26781  input_path="$new_path"
26782  # Check if we need to convert this using DOS-style short mode. If the path
26783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26784  # take no chances and rewrite it.
26785  # Note: m4 eats our [], so we need to use [ and ] instead.
26786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26787  if test "x$has_forbidden_chars" != x; then
26788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26790  fi
26791
26792
26793  windows_path="$new_path"
26794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26795    unix_path=`$CYGPATH -u "$windows_path"`
26796    new_path="$unix_path"
26797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26799    new_path="$unix_path"
26800  fi
26801
26802  if test "x$path" != "x$new_path"; then
26803    BOOT_JDK="$new_path"
26804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26805$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26806  fi
26807
26808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26810
26811    else
26812      # We're on a unix platform. Hooray! :)
26813      path="$BOOT_JDK"
26814      has_space=`$ECHO "$path" | $GREP " "`
26815      if test "x$has_space" != x; then
26816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26819      fi
26820
26821      # Use eval to expand a potential ~
26822      eval path="$path"
26823      if test ! -f "$path" && test ! -d "$path"; then
26824        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26825      fi
26826
26827      if test -d "$path"; then
26828        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26829      else
26830        dir="`$DIRNAME "$path"`"
26831        base="`$BASENAME "$path"`"
26832        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26833      fi
26834    fi
26835  fi
26836
26837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26838$as_echo_n "checking for Boot JDK... " >&6; }
26839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26840$as_echo "$BOOT_JDK" >&6; }
26841            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26842$as_echo_n "checking Boot JDK version... " >&6; }
26843            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26845$as_echo "$BOOT_JDK_VERSION" >&6; }
26846          fi # end check jdk version
26847        fi # end check javac
26848      fi # end check java
26849    fi # end check boot jdk found
26850  fi
26851
26852
26853  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26854
26855  if test "x$BOOT_JDK_FOUND" = xno; then
26856    # Now execute the test
26857
26858  # Extract the first word of "javac", so it can be a program name with args.
26859set dummy javac; ac_word=$2
26860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26861$as_echo_n "checking for $ac_word... " >&6; }
26862if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26863  $as_echo_n "(cached) " >&6
26864else
26865  case $JAVAC_CHECK in
26866  [\\/]* | ?:[\\/]*)
26867  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26868  ;;
26869  *)
26870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26871for as_dir in $PATH
26872do
26873  IFS=$as_save_IFS
26874  test -z "$as_dir" && as_dir=.
26875    for ac_exec_ext in '' $ac_executable_extensions; do
26876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26877    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26879    break 2
26880  fi
26881done
26882  done
26883IFS=$as_save_IFS
26884
26885  ;;
26886esac
26887fi
26888JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26889if test -n "$JAVAC_CHECK"; then
26890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26891$as_echo "$JAVAC_CHECK" >&6; }
26892else
26893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26894$as_echo "no" >&6; }
26895fi
26896
26897
26898  # Extract the first word of "java", so it can be a program name with args.
26899set dummy java; ac_word=$2
26900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26901$as_echo_n "checking for $ac_word... " >&6; }
26902if ${ac_cv_path_JAVA_CHECK+:} false; then :
26903  $as_echo_n "(cached) " >&6
26904else
26905  case $JAVA_CHECK in
26906  [\\/]* | ?:[\\/]*)
26907  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26908  ;;
26909  *)
26910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26911for as_dir in $PATH
26912do
26913  IFS=$as_save_IFS
26914  test -z "$as_dir" && as_dir=.
26915    for ac_exec_ext in '' $ac_executable_extensions; do
26916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26917    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26919    break 2
26920  fi
26921done
26922  done
26923IFS=$as_save_IFS
26924
26925  ;;
26926esac
26927fi
26928JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26929if test -n "$JAVA_CHECK"; then
26930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26931$as_echo "$JAVA_CHECK" >&6; }
26932else
26933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26934$as_echo "no" >&6; }
26935fi
26936
26937
26938  BINARY="$JAVAC_CHECK"
26939  if test "x$JAVAC_CHECK" = x; then
26940    BINARY="$JAVA_CHECK"
26941  fi
26942  if test "x$BINARY" != x; then
26943    # So there is a java(c) binary, it might be part of a JDK.
26944    # Lets find the JDK/JRE directory by following symbolic links.
26945    # Linux/GNU systems often have links from /usr/bin/java to
26946    # /etc/alternatives/java to the real JDK binary.
26947
26948  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26949    # Follow a chain of symbolic links. Use readlink
26950    # where it exists, else fall back to horribly
26951    # complicated shell code.
26952    if test "x$READLINK_TESTED" != yes; then
26953      # On MacOSX there is a readlink tool with a different
26954      # purpose than the GNU readlink tool. Check the found readlink.
26955      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26956      if test "x$ISGNU" = x; then
26957        # A readlink that we do not know how to use.
26958        # Are there other non-GNU readlinks out there?
26959        READLINK_TESTED=yes
26960        READLINK=
26961      fi
26962    fi
26963
26964    if test "x$READLINK" != x; then
26965      BINARY=`$READLINK -f $BINARY`
26966    else
26967      # Save the current directory for restoring afterwards
26968      STARTDIR=$PWD
26969      COUNTER=0
26970      sym_link_dir=`$DIRNAME $BINARY`
26971      sym_link_file=`$BASENAME $BINARY`
26972      cd $sym_link_dir
26973      # Use -P flag to resolve symlinks in directories.
26974      cd `$THEPWDCMD -P`
26975      sym_link_dir=`$THEPWDCMD -P`
26976      # Resolve file symlinks
26977      while test $COUNTER -lt 20; do
26978        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26979        if test "x$ISLINK" == x; then
26980          # This is not a symbolic link! We are done!
26981          break
26982        fi
26983        # Again resolve directory symlinks since the target of the just found
26984        # link could be in a different directory
26985        cd `$DIRNAME $ISLINK`
26986        sym_link_dir=`$THEPWDCMD -P`
26987        sym_link_file=`$BASENAME $ISLINK`
26988        let COUNTER=COUNTER+1
26989      done
26990      cd $STARTDIR
26991      BINARY=$sym_link_dir/$sym_link_file
26992    fi
26993  fi
26994
26995    BOOT_JDK=`dirname "$BINARY"`
26996    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26997    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26998      # Looks like we found ourselves an JDK
26999      BOOT_JDK_FOUND=maybe
27000      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27001$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27002    fi
27003  fi
27004
27005
27006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27008      # Do we have a bin/java?
27009      if test ! -x "$BOOT_JDK/bin/java"; then
27010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27012        BOOT_JDK_FOUND=no
27013      else
27014        # Do we have a bin/javac?
27015        if test ! -x "$BOOT_JDK/bin/javac"; then
27016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27020          BOOT_JDK_FOUND=no
27021        else
27022          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27023          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27024
27025          # Extra M4 quote needed to protect [] in grep expression.
27026          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27027          if test "x$FOUND_CORRECT_VERSION" = x; then
27028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27030            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27031$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27032            BOOT_JDK_FOUND=no
27033          else
27034            # We're done! :-)
27035            BOOT_JDK_FOUND=yes
27036
27037  # Only process if variable expands to non-empty
27038
27039  if test "x$BOOT_JDK" != x; then
27040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27041
27042  # Input might be given as Windows format, start by converting to
27043  # unix format.
27044  path="$BOOT_JDK"
27045  new_path=`$CYGPATH -u "$path"`
27046
27047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27050  # "foo.exe" is OK but "foo" is an error.
27051  #
27052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27053  # It is also a way to make sure we got the proper file name for the real test later on.
27054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27055  if test "x$test_shortpath" = x; then
27056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27057$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27058    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27059  fi
27060
27061  # Call helper function which possibly converts this using DOS-style short mode.
27062  # If so, the updated path is stored in $new_path.
27063
27064  input_path="$new_path"
27065  # Check if we need to convert this using DOS-style short mode. If the path
27066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27067  # take no chances and rewrite it.
27068  # Note: m4 eats our [], so we need to use [ and ] instead.
27069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27070  if test "x$has_forbidden_chars" != x; then
27071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27075      # Going to short mode and back again did indeed matter. Since short mode is
27076      # case insensitive, let's make it lowercase to improve readability.
27077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27078      # Now convert it back to Unix-style (cygpath)
27079      input_path=`$CYGPATH -u "$shortmode_path"`
27080      new_path="$input_path"
27081    fi
27082  fi
27083
27084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27085  if test "x$test_cygdrive_prefix" = x; then
27086    # As a simple fix, exclude /usr/bin since it's not a real path.
27087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27089      # a path prefixed by /cygdrive for fixpath to work.
27090      new_path="$CYGWIN_ROOT_PATH$input_path"
27091    fi
27092  fi
27093
27094
27095  if test "x$path" != "x$new_path"; then
27096    BOOT_JDK="$new_path"
27097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27099  fi
27100
27101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27102
27103  path="$BOOT_JDK"
27104  has_colon=`$ECHO $path | $GREP ^.:`
27105  new_path="$path"
27106  if test "x$has_colon" = x; then
27107    # Not in mixed or Windows style, start by that.
27108    new_path=`cmd //c echo $path`
27109  fi
27110
27111
27112  input_path="$new_path"
27113  # Check if we need to convert this using DOS-style short mode. If the path
27114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27115  # take no chances and rewrite it.
27116  # Note: m4 eats our [], so we need to use [ and ] instead.
27117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27118  if test "x$has_forbidden_chars" != x; then
27119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27121  fi
27122
27123
27124  windows_path="$new_path"
27125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27126    unix_path=`$CYGPATH -u "$windows_path"`
27127    new_path="$unix_path"
27128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27130    new_path="$unix_path"
27131  fi
27132
27133  if test "x$path" != "x$new_path"; then
27134    BOOT_JDK="$new_path"
27135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27137  fi
27138
27139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27141
27142    else
27143      # We're on a unix platform. Hooray! :)
27144      path="$BOOT_JDK"
27145      has_space=`$ECHO "$path" | $GREP " "`
27146      if test "x$has_space" != x; then
27147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27150      fi
27151
27152      # Use eval to expand a potential ~
27153      eval path="$path"
27154      if test ! -f "$path" && test ! -d "$path"; then
27155        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27156      fi
27157
27158      if test -d "$path"; then
27159        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27160      else
27161        dir="`$DIRNAME "$path"`"
27162        base="`$BASENAME "$path"`"
27163        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27164      fi
27165    fi
27166  fi
27167
27168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27169$as_echo_n "checking for Boot JDK... " >&6; }
27170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27171$as_echo "$BOOT_JDK" >&6; }
27172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27173$as_echo_n "checking Boot JDK version... " >&6; }
27174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27176$as_echo "$BOOT_JDK_VERSION" >&6; }
27177          fi # end check jdk version
27178        fi # end check javac
27179      fi # end check java
27180    fi # end check boot jdk found
27181  fi
27182
27183
27184  # Test: Is there a JDK installed in default, well-known locations?
27185
27186  if test "x$BOOT_JDK_FOUND" = xno; then
27187    # Now execute the test
27188
27189  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27190
27191  if test "x$BOOT_JDK_FOUND" = xno; then
27192    # Now execute the test
27193
27194  if test "x$ProgramW6432" != x; then
27195    VIRTUAL_DIR="$ProgramW6432/Java"
27196
27197  windows_path="$VIRTUAL_DIR"
27198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27199    unix_path=`$CYGPATH -u "$windows_path"`
27200    VIRTUAL_DIR="$unix_path"
27201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27203    VIRTUAL_DIR="$unix_path"
27204  fi
27205
27206
27207  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27208  BOOT_JDK_SUFFIX=""
27209  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27210  if test "x$ALL_JDKS_FOUND" != x; then
27211    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27212
27213  if test "x$BOOT_JDK_FOUND" = xno; then
27214    # Now execute the test
27215
27216        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27217        if test -d "$BOOT_JDK"; then
27218          BOOT_JDK_FOUND=maybe
27219          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27220$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27221        fi
27222
27223
27224    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27225    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27226      # Do we have a bin/java?
27227      if test ! -x "$BOOT_JDK/bin/java"; then
27228        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27230        BOOT_JDK_FOUND=no
27231      else
27232        # Do we have a bin/javac?
27233        if test ! -x "$BOOT_JDK/bin/javac"; then
27234          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27236          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27237$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27238          BOOT_JDK_FOUND=no
27239        else
27240          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27241          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27242
27243          # Extra M4 quote needed to protect [] in grep expression.
27244          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27245          if test "x$FOUND_CORRECT_VERSION" = x; then
27246            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27248            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27249$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27250            BOOT_JDK_FOUND=no
27251          else
27252            # We're done! :-)
27253            BOOT_JDK_FOUND=yes
27254
27255  # Only process if variable expands to non-empty
27256
27257  if test "x$BOOT_JDK" != x; then
27258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27259
27260  # Input might be given as Windows format, start by converting to
27261  # unix format.
27262  path="$BOOT_JDK"
27263  new_path=`$CYGPATH -u "$path"`
27264
27265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27268  # "foo.exe" is OK but "foo" is an error.
27269  #
27270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27271  # It is also a way to make sure we got the proper file name for the real test later on.
27272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27273  if test "x$test_shortpath" = x; then
27274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27277  fi
27278
27279  # Call helper function which possibly converts this using DOS-style short mode.
27280  # If so, the updated path is stored in $new_path.
27281
27282  input_path="$new_path"
27283  # Check if we need to convert this using DOS-style short mode. If the path
27284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27285  # take no chances and rewrite it.
27286  # Note: m4 eats our [], so we need to use [ and ] instead.
27287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27288  if test "x$has_forbidden_chars" != x; then
27289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27293      # Going to short mode and back again did indeed matter. Since short mode is
27294      # case insensitive, let's make it lowercase to improve readability.
27295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27296      # Now convert it back to Unix-style (cygpath)
27297      input_path=`$CYGPATH -u "$shortmode_path"`
27298      new_path="$input_path"
27299    fi
27300  fi
27301
27302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27303  if test "x$test_cygdrive_prefix" = x; then
27304    # As a simple fix, exclude /usr/bin since it's not a real path.
27305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27307      # a path prefixed by /cygdrive for fixpath to work.
27308      new_path="$CYGWIN_ROOT_PATH$input_path"
27309    fi
27310  fi
27311
27312
27313  if test "x$path" != "x$new_path"; then
27314    BOOT_JDK="$new_path"
27315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27317  fi
27318
27319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27320
27321  path="$BOOT_JDK"
27322  has_colon=`$ECHO $path | $GREP ^.:`
27323  new_path="$path"
27324  if test "x$has_colon" = x; then
27325    # Not in mixed or Windows style, start by that.
27326    new_path=`cmd //c echo $path`
27327  fi
27328
27329
27330  input_path="$new_path"
27331  # Check if we need to convert this using DOS-style short mode. If the path
27332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27333  # take no chances and rewrite it.
27334  # Note: m4 eats our [], so we need to use [ and ] instead.
27335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27336  if test "x$has_forbidden_chars" != x; then
27337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27339  fi
27340
27341
27342  windows_path="$new_path"
27343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27344    unix_path=`$CYGPATH -u "$windows_path"`
27345    new_path="$unix_path"
27346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27348    new_path="$unix_path"
27349  fi
27350
27351  if test "x$path" != "x$new_path"; then
27352    BOOT_JDK="$new_path"
27353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27355  fi
27356
27357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27359
27360    else
27361      # We're on a unix platform. Hooray! :)
27362      path="$BOOT_JDK"
27363      has_space=`$ECHO "$path" | $GREP " "`
27364      if test "x$has_space" != x; then
27365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27368      fi
27369
27370      # Use eval to expand a potential ~
27371      eval path="$path"
27372      if test ! -f "$path" && test ! -d "$path"; then
27373        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27374      fi
27375
27376      if test -d "$path"; then
27377        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27378      else
27379        dir="`$DIRNAME "$path"`"
27380        base="`$BASENAME "$path"`"
27381        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27382      fi
27383    fi
27384  fi
27385
27386            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27387$as_echo_n "checking for Boot JDK... " >&6; }
27388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27389$as_echo "$BOOT_JDK" >&6; }
27390            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27391$as_echo_n "checking Boot JDK version... " >&6; }
27392            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27393            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27394$as_echo "$BOOT_JDK_VERSION" >&6; }
27395          fi # end check jdk version
27396        fi # end check javac
27397      fi # end check java
27398    fi # end check boot jdk found
27399  fi
27400
27401    done
27402  fi
27403
27404  fi
27405
27406
27407    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27408    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27409      # Do we have a bin/java?
27410      if test ! -x "$BOOT_JDK/bin/java"; then
27411        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27413        BOOT_JDK_FOUND=no
27414      else
27415        # Do we have a bin/javac?
27416        if test ! -x "$BOOT_JDK/bin/javac"; then
27417          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27419          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27420$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27421          BOOT_JDK_FOUND=no
27422        else
27423          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27424          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27425
27426          # Extra M4 quote needed to protect [] in grep expression.
27427          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27428          if test "x$FOUND_CORRECT_VERSION" = x; then
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27431            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27432$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27433            BOOT_JDK_FOUND=no
27434          else
27435            # We're done! :-)
27436            BOOT_JDK_FOUND=yes
27437
27438  # Only process if variable expands to non-empty
27439
27440  if test "x$BOOT_JDK" != x; then
27441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27442
27443  # Input might be given as Windows format, start by converting to
27444  # unix format.
27445  path="$BOOT_JDK"
27446  new_path=`$CYGPATH -u "$path"`
27447
27448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27451  # "foo.exe" is OK but "foo" is an error.
27452  #
27453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27454  # It is also a way to make sure we got the proper file name for the real test later on.
27455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27456  if test "x$test_shortpath" = x; then
27457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27459    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27460  fi
27461
27462  # Call helper function which possibly converts this using DOS-style short mode.
27463  # If so, the updated path is stored in $new_path.
27464
27465  input_path="$new_path"
27466  # Check if we need to convert this using DOS-style short mode. If the path
27467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27468  # take no chances and rewrite it.
27469  # Note: m4 eats our [], so we need to use [ and ] instead.
27470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27471  if test "x$has_forbidden_chars" != x; then
27472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27476      # Going to short mode and back again did indeed matter. Since short mode is
27477      # case insensitive, let's make it lowercase to improve readability.
27478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27479      # Now convert it back to Unix-style (cygpath)
27480      input_path=`$CYGPATH -u "$shortmode_path"`
27481      new_path="$input_path"
27482    fi
27483  fi
27484
27485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27486  if test "x$test_cygdrive_prefix" = x; then
27487    # As a simple fix, exclude /usr/bin since it's not a real path.
27488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27490      # a path prefixed by /cygdrive for fixpath to work.
27491      new_path="$CYGWIN_ROOT_PATH$input_path"
27492    fi
27493  fi
27494
27495
27496  if test "x$path" != "x$new_path"; then
27497    BOOT_JDK="$new_path"
27498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27500  fi
27501
27502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27503
27504  path="$BOOT_JDK"
27505  has_colon=`$ECHO $path | $GREP ^.:`
27506  new_path="$path"
27507  if test "x$has_colon" = x; then
27508    # Not in mixed or Windows style, start by that.
27509    new_path=`cmd //c echo $path`
27510  fi
27511
27512
27513  input_path="$new_path"
27514  # Check if we need to convert this using DOS-style short mode. If the path
27515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27516  # take no chances and rewrite it.
27517  # Note: m4 eats our [], so we need to use [ and ] instead.
27518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27519  if test "x$has_forbidden_chars" != x; then
27520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27522  fi
27523
27524
27525  windows_path="$new_path"
27526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27527    unix_path=`$CYGPATH -u "$windows_path"`
27528    new_path="$unix_path"
27529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27531    new_path="$unix_path"
27532  fi
27533
27534  if test "x$path" != "x$new_path"; then
27535    BOOT_JDK="$new_path"
27536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27538  fi
27539
27540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27542
27543    else
27544      # We're on a unix platform. Hooray! :)
27545      path="$BOOT_JDK"
27546      has_space=`$ECHO "$path" | $GREP " "`
27547      if test "x$has_space" != x; then
27548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27550        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27551      fi
27552
27553      # Use eval to expand a potential ~
27554      eval path="$path"
27555      if test ! -f "$path" && test ! -d "$path"; then
27556        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27557      fi
27558
27559      if test -d "$path"; then
27560        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27561      else
27562        dir="`$DIRNAME "$path"`"
27563        base="`$BASENAME "$path"`"
27564        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27565      fi
27566    fi
27567  fi
27568
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27570$as_echo_n "checking for Boot JDK... " >&6; }
27571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27572$as_echo "$BOOT_JDK" >&6; }
27573            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27574$as_echo_n "checking Boot JDK version... " >&6; }
27575            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27577$as_echo "$BOOT_JDK_VERSION" >&6; }
27578          fi # end check jdk version
27579        fi # end check javac
27580      fi # end check java
27581    fi # end check boot jdk found
27582  fi
27583
27584
27585  if test "x$BOOT_JDK_FOUND" = xno; then
27586    # Now execute the test
27587
27588  if test "x$PROGRAMW6432" != x; then
27589    VIRTUAL_DIR="$PROGRAMW6432/Java"
27590
27591  windows_path="$VIRTUAL_DIR"
27592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27593    unix_path=`$CYGPATH -u "$windows_path"`
27594    VIRTUAL_DIR="$unix_path"
27595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27597    VIRTUAL_DIR="$unix_path"
27598  fi
27599
27600
27601  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27602  BOOT_JDK_SUFFIX=""
27603  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27604  if test "x$ALL_JDKS_FOUND" != x; then
27605    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27606
27607  if test "x$BOOT_JDK_FOUND" = xno; then
27608    # Now execute the test
27609
27610        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27611        if test -d "$BOOT_JDK"; then
27612          BOOT_JDK_FOUND=maybe
27613          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27614$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27615        fi
27616
27617
27618    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27619    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27620      # Do we have a bin/java?
27621      if test ! -x "$BOOT_JDK/bin/java"; then
27622        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27624        BOOT_JDK_FOUND=no
27625      else
27626        # Do we have a bin/javac?
27627        if test ! -x "$BOOT_JDK/bin/javac"; then
27628          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27630          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27631$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27632          BOOT_JDK_FOUND=no
27633        else
27634          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27635          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27636
27637          # Extra M4 quote needed to protect [] in grep expression.
27638          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27639          if test "x$FOUND_CORRECT_VERSION" = x; then
27640            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27642            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27643$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27644            BOOT_JDK_FOUND=no
27645          else
27646            # We're done! :-)
27647            BOOT_JDK_FOUND=yes
27648
27649  # Only process if variable expands to non-empty
27650
27651  if test "x$BOOT_JDK" != x; then
27652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27653
27654  # Input might be given as Windows format, start by converting to
27655  # unix format.
27656  path="$BOOT_JDK"
27657  new_path=`$CYGPATH -u "$path"`
27658
27659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27662  # "foo.exe" is OK but "foo" is an error.
27663  #
27664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27665  # It is also a way to make sure we got the proper file name for the real test later on.
27666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27667  if test "x$test_shortpath" = x; then
27668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27670    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27671  fi
27672
27673  # Call helper function which possibly converts this using DOS-style short mode.
27674  # If so, the updated path is stored in $new_path.
27675
27676  input_path="$new_path"
27677  # Check if we need to convert this using DOS-style short mode. If the path
27678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27679  # take no chances and rewrite it.
27680  # Note: m4 eats our [], so we need to use [ and ] instead.
27681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27682  if test "x$has_forbidden_chars" != x; then
27683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27687      # Going to short mode and back again did indeed matter. Since short mode is
27688      # case insensitive, let's make it lowercase to improve readability.
27689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27690      # Now convert it back to Unix-style (cygpath)
27691      input_path=`$CYGPATH -u "$shortmode_path"`
27692      new_path="$input_path"
27693    fi
27694  fi
27695
27696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27697  if test "x$test_cygdrive_prefix" = x; then
27698    # As a simple fix, exclude /usr/bin since it's not a real path.
27699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27701      # a path prefixed by /cygdrive for fixpath to work.
27702      new_path="$CYGWIN_ROOT_PATH$input_path"
27703    fi
27704  fi
27705
27706
27707  if test "x$path" != "x$new_path"; then
27708    BOOT_JDK="$new_path"
27709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27711  fi
27712
27713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27714
27715  path="$BOOT_JDK"
27716  has_colon=`$ECHO $path | $GREP ^.:`
27717  new_path="$path"
27718  if test "x$has_colon" = x; then
27719    # Not in mixed or Windows style, start by that.
27720    new_path=`cmd //c echo $path`
27721  fi
27722
27723
27724  input_path="$new_path"
27725  # Check if we need to convert this using DOS-style short mode. If the path
27726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27727  # take no chances and rewrite it.
27728  # Note: m4 eats our [], so we need to use [ and ] instead.
27729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27730  if test "x$has_forbidden_chars" != x; then
27731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27733  fi
27734
27735
27736  windows_path="$new_path"
27737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27738    unix_path=`$CYGPATH -u "$windows_path"`
27739    new_path="$unix_path"
27740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27742    new_path="$unix_path"
27743  fi
27744
27745  if test "x$path" != "x$new_path"; then
27746    BOOT_JDK="$new_path"
27747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27748$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27749  fi
27750
27751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27753
27754    else
27755      # We're on a unix platform. Hooray! :)
27756      path="$BOOT_JDK"
27757      has_space=`$ECHO "$path" | $GREP " "`
27758      if test "x$has_space" != x; then
27759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27762      fi
27763
27764      # Use eval to expand a potential ~
27765      eval path="$path"
27766      if test ! -f "$path" && test ! -d "$path"; then
27767        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27768      fi
27769
27770      if test -d "$path"; then
27771        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27772      else
27773        dir="`$DIRNAME "$path"`"
27774        base="`$BASENAME "$path"`"
27775        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27776      fi
27777    fi
27778  fi
27779
27780            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27781$as_echo_n "checking for Boot JDK... " >&6; }
27782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27783$as_echo "$BOOT_JDK" >&6; }
27784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27785$as_echo_n "checking Boot JDK version... " >&6; }
27786            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27788$as_echo "$BOOT_JDK_VERSION" >&6; }
27789          fi # end check jdk version
27790        fi # end check javac
27791      fi # end check java
27792    fi # end check boot jdk found
27793  fi
27794
27795    done
27796  fi
27797
27798  fi
27799
27800
27801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27803      # Do we have a bin/java?
27804      if test ! -x "$BOOT_JDK/bin/java"; then
27805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27807        BOOT_JDK_FOUND=no
27808      else
27809        # Do we have a bin/javac?
27810        if test ! -x "$BOOT_JDK/bin/javac"; then
27811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27815          BOOT_JDK_FOUND=no
27816        else
27817          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27818          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27819
27820          # Extra M4 quote needed to protect [] in grep expression.
27821          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27822          if test "x$FOUND_CORRECT_VERSION" = x; then
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27825            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27826$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27827            BOOT_JDK_FOUND=no
27828          else
27829            # We're done! :-)
27830            BOOT_JDK_FOUND=yes
27831
27832  # Only process if variable expands to non-empty
27833
27834  if test "x$BOOT_JDK" != x; then
27835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27836
27837  # Input might be given as Windows format, start by converting to
27838  # unix format.
27839  path="$BOOT_JDK"
27840  new_path=`$CYGPATH -u "$path"`
27841
27842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27845  # "foo.exe" is OK but "foo" is an error.
27846  #
27847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27848  # It is also a way to make sure we got the proper file name for the real test later on.
27849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27850  if test "x$test_shortpath" = x; then
27851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27854  fi
27855
27856  # Call helper function which possibly converts this using DOS-style short mode.
27857  # If so, the updated path is stored in $new_path.
27858
27859  input_path="$new_path"
27860  # Check if we need to convert this using DOS-style short mode. If the path
27861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27862  # take no chances and rewrite it.
27863  # Note: m4 eats our [], so we need to use [ and ] instead.
27864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27865  if test "x$has_forbidden_chars" != x; then
27866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27870      # Going to short mode and back again did indeed matter. Since short mode is
27871      # case insensitive, let's make it lowercase to improve readability.
27872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27873      # Now convert it back to Unix-style (cygpath)
27874      input_path=`$CYGPATH -u "$shortmode_path"`
27875      new_path="$input_path"
27876    fi
27877  fi
27878
27879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27880  if test "x$test_cygdrive_prefix" = x; then
27881    # As a simple fix, exclude /usr/bin since it's not a real path.
27882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27884      # a path prefixed by /cygdrive for fixpath to work.
27885      new_path="$CYGWIN_ROOT_PATH$input_path"
27886    fi
27887  fi
27888
27889
27890  if test "x$path" != "x$new_path"; then
27891    BOOT_JDK="$new_path"
27892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27894  fi
27895
27896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897
27898  path="$BOOT_JDK"
27899  has_colon=`$ECHO $path | $GREP ^.:`
27900  new_path="$path"
27901  if test "x$has_colon" = x; then
27902    # Not in mixed or Windows style, start by that.
27903    new_path=`cmd //c echo $path`
27904  fi
27905
27906
27907  input_path="$new_path"
27908  # Check if we need to convert this using DOS-style short mode. If the path
27909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27910  # take no chances and rewrite it.
27911  # Note: m4 eats our [], so we need to use [ and ] instead.
27912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27913  if test "x$has_forbidden_chars" != x; then
27914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27916  fi
27917
27918
27919  windows_path="$new_path"
27920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27921    unix_path=`$CYGPATH -u "$windows_path"`
27922    new_path="$unix_path"
27923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27925    new_path="$unix_path"
27926  fi
27927
27928  if test "x$path" != "x$new_path"; then
27929    BOOT_JDK="$new_path"
27930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27932  fi
27933
27934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27936
27937    else
27938      # We're on a unix platform. Hooray! :)
27939      path="$BOOT_JDK"
27940      has_space=`$ECHO "$path" | $GREP " "`
27941      if test "x$has_space" != x; then
27942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27945      fi
27946
27947      # Use eval to expand a potential ~
27948      eval path="$path"
27949      if test ! -f "$path" && test ! -d "$path"; then
27950        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27951      fi
27952
27953      if test -d "$path"; then
27954        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27955      else
27956        dir="`$DIRNAME "$path"`"
27957        base="`$BASENAME "$path"`"
27958        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27959      fi
27960    fi
27961  fi
27962
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27964$as_echo_n "checking for Boot JDK... " >&6; }
27965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27966$as_echo "$BOOT_JDK" >&6; }
27967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27968$as_echo_n "checking Boot JDK version... " >&6; }
27969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27971$as_echo "$BOOT_JDK_VERSION" >&6; }
27972          fi # end check jdk version
27973        fi # end check javac
27974      fi # end check java
27975    fi # end check boot jdk found
27976  fi
27977
27978
27979  if test "x$BOOT_JDK_FOUND" = xno; then
27980    # Now execute the test
27981
27982  if test "x$PROGRAMFILES" != x; then
27983    VIRTUAL_DIR="$PROGRAMFILES/Java"
27984
27985  windows_path="$VIRTUAL_DIR"
27986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27987    unix_path=`$CYGPATH -u "$windows_path"`
27988    VIRTUAL_DIR="$unix_path"
27989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27991    VIRTUAL_DIR="$unix_path"
27992  fi
27993
27994
27995  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27996  BOOT_JDK_SUFFIX=""
27997  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27998  if test "x$ALL_JDKS_FOUND" != x; then
27999    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28000
28001  if test "x$BOOT_JDK_FOUND" = xno; then
28002    # Now execute the test
28003
28004        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28005        if test -d "$BOOT_JDK"; then
28006          BOOT_JDK_FOUND=maybe
28007          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28008$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28009        fi
28010
28011
28012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28014      # Do we have a bin/java?
28015      if test ! -x "$BOOT_JDK/bin/java"; then
28016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28018        BOOT_JDK_FOUND=no
28019      else
28020        # Do we have a bin/javac?
28021        if test ! -x "$BOOT_JDK/bin/javac"; then
28022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28026          BOOT_JDK_FOUND=no
28027        else
28028          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28029          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28030
28031          # Extra M4 quote needed to protect [] in grep expression.
28032          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28033          if test "x$FOUND_CORRECT_VERSION" = x; then
28034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28036            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28037$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28038            BOOT_JDK_FOUND=no
28039          else
28040            # We're done! :-)
28041            BOOT_JDK_FOUND=yes
28042
28043  # Only process if variable expands to non-empty
28044
28045  if test "x$BOOT_JDK" != x; then
28046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28047
28048  # Input might be given as Windows format, start by converting to
28049  # unix format.
28050  path="$BOOT_JDK"
28051  new_path=`$CYGPATH -u "$path"`
28052
28053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28056  # "foo.exe" is OK but "foo" is an error.
28057  #
28058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28059  # It is also a way to make sure we got the proper file name for the real test later on.
28060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28061  if test "x$test_shortpath" = x; then
28062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28065  fi
28066
28067  # Call helper function which possibly converts this using DOS-style short mode.
28068  # If so, the updated path is stored in $new_path.
28069
28070  input_path="$new_path"
28071  # Check if we need to convert this using DOS-style short mode. If the path
28072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28073  # take no chances and rewrite it.
28074  # Note: m4 eats our [], so we need to use [ and ] instead.
28075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28076  if test "x$has_forbidden_chars" != x; then
28077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28081      # Going to short mode and back again did indeed matter. Since short mode is
28082      # case insensitive, let's make it lowercase to improve readability.
28083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28084      # Now convert it back to Unix-style (cygpath)
28085      input_path=`$CYGPATH -u "$shortmode_path"`
28086      new_path="$input_path"
28087    fi
28088  fi
28089
28090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28091  if test "x$test_cygdrive_prefix" = x; then
28092    # As a simple fix, exclude /usr/bin since it's not a real path.
28093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28095      # a path prefixed by /cygdrive for fixpath to work.
28096      new_path="$CYGWIN_ROOT_PATH$input_path"
28097    fi
28098  fi
28099
28100
28101  if test "x$path" != "x$new_path"; then
28102    BOOT_JDK="$new_path"
28103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28105  fi
28106
28107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28108
28109  path="$BOOT_JDK"
28110  has_colon=`$ECHO $path | $GREP ^.:`
28111  new_path="$path"
28112  if test "x$has_colon" = x; then
28113    # Not in mixed or Windows style, start by that.
28114    new_path=`cmd //c echo $path`
28115  fi
28116
28117
28118  input_path="$new_path"
28119  # Check if we need to convert this using DOS-style short mode. If the path
28120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28121  # take no chances and rewrite it.
28122  # Note: m4 eats our [], so we need to use [ and ] instead.
28123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28124  if test "x$has_forbidden_chars" != x; then
28125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28127  fi
28128
28129
28130  windows_path="$new_path"
28131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132    unix_path=`$CYGPATH -u "$windows_path"`
28133    new_path="$unix_path"
28134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28136    new_path="$unix_path"
28137  fi
28138
28139  if test "x$path" != "x$new_path"; then
28140    BOOT_JDK="$new_path"
28141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28143  fi
28144
28145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28147
28148    else
28149      # We're on a unix platform. Hooray! :)
28150      path="$BOOT_JDK"
28151      has_space=`$ECHO "$path" | $GREP " "`
28152      if test "x$has_space" != x; then
28153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28156      fi
28157
28158      # Use eval to expand a potential ~
28159      eval path="$path"
28160      if test ! -f "$path" && test ! -d "$path"; then
28161        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28162      fi
28163
28164      if test -d "$path"; then
28165        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28166      else
28167        dir="`$DIRNAME "$path"`"
28168        base="`$BASENAME "$path"`"
28169        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28170      fi
28171    fi
28172  fi
28173
28174            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28175$as_echo_n "checking for Boot JDK... " >&6; }
28176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28177$as_echo "$BOOT_JDK" >&6; }
28178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28179$as_echo_n "checking Boot JDK version... " >&6; }
28180            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28182$as_echo "$BOOT_JDK_VERSION" >&6; }
28183          fi # end check jdk version
28184        fi # end check javac
28185      fi # end check java
28186    fi # end check boot jdk found
28187  fi
28188
28189    done
28190  fi
28191
28192  fi
28193
28194
28195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28197      # Do we have a bin/java?
28198      if test ! -x "$BOOT_JDK/bin/java"; then
28199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28201        BOOT_JDK_FOUND=no
28202      else
28203        # Do we have a bin/javac?
28204        if test ! -x "$BOOT_JDK/bin/javac"; then
28205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28209          BOOT_JDK_FOUND=no
28210        else
28211          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28212          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28213
28214          # Extra M4 quote needed to protect [] in grep expression.
28215          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28216          if test "x$FOUND_CORRECT_VERSION" = x; then
28217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28219            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28220$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28221            BOOT_JDK_FOUND=no
28222          else
28223            # We're done! :-)
28224            BOOT_JDK_FOUND=yes
28225
28226  # Only process if variable expands to non-empty
28227
28228  if test "x$BOOT_JDK" != x; then
28229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28230
28231  # Input might be given as Windows format, start by converting to
28232  # unix format.
28233  path="$BOOT_JDK"
28234  new_path=`$CYGPATH -u "$path"`
28235
28236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28239  # "foo.exe" is OK but "foo" is an error.
28240  #
28241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28242  # It is also a way to make sure we got the proper file name for the real test later on.
28243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28244  if test "x$test_shortpath" = x; then
28245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28248  fi
28249
28250  # Call helper function which possibly converts this using DOS-style short mode.
28251  # If so, the updated path is stored in $new_path.
28252
28253  input_path="$new_path"
28254  # Check if we need to convert this using DOS-style short mode. If the path
28255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28256  # take no chances and rewrite it.
28257  # Note: m4 eats our [], so we need to use [ and ] instead.
28258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28259  if test "x$has_forbidden_chars" != x; then
28260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28264      # Going to short mode and back again did indeed matter. Since short mode is
28265      # case insensitive, let's make it lowercase to improve readability.
28266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28267      # Now convert it back to Unix-style (cygpath)
28268      input_path=`$CYGPATH -u "$shortmode_path"`
28269      new_path="$input_path"
28270    fi
28271  fi
28272
28273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28274  if test "x$test_cygdrive_prefix" = x; then
28275    # As a simple fix, exclude /usr/bin since it's not a real path.
28276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28278      # a path prefixed by /cygdrive for fixpath to work.
28279      new_path="$CYGWIN_ROOT_PATH$input_path"
28280    fi
28281  fi
28282
28283
28284  if test "x$path" != "x$new_path"; then
28285    BOOT_JDK="$new_path"
28286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28288  fi
28289
28290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28291
28292  path="$BOOT_JDK"
28293  has_colon=`$ECHO $path | $GREP ^.:`
28294  new_path="$path"
28295  if test "x$has_colon" = x; then
28296    # Not in mixed or Windows style, start by that.
28297    new_path=`cmd //c echo $path`
28298  fi
28299
28300
28301  input_path="$new_path"
28302  # Check if we need to convert this using DOS-style short mode. If the path
28303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28304  # take no chances and rewrite it.
28305  # Note: m4 eats our [], so we need to use [ and ] instead.
28306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28307  if test "x$has_forbidden_chars" != x; then
28308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28310  fi
28311
28312
28313  windows_path="$new_path"
28314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28315    unix_path=`$CYGPATH -u "$windows_path"`
28316    new_path="$unix_path"
28317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28319    new_path="$unix_path"
28320  fi
28321
28322  if test "x$path" != "x$new_path"; then
28323    BOOT_JDK="$new_path"
28324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28326  fi
28327
28328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28330
28331    else
28332      # We're on a unix platform. Hooray! :)
28333      path="$BOOT_JDK"
28334      has_space=`$ECHO "$path" | $GREP " "`
28335      if test "x$has_space" != x; then
28336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28339      fi
28340
28341      # Use eval to expand a potential ~
28342      eval path="$path"
28343      if test ! -f "$path" && test ! -d "$path"; then
28344        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28345      fi
28346
28347      if test -d "$path"; then
28348        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28349      else
28350        dir="`$DIRNAME "$path"`"
28351        base="`$BASENAME "$path"`"
28352        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28353      fi
28354    fi
28355  fi
28356
28357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28358$as_echo_n "checking for Boot JDK... " >&6; }
28359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28360$as_echo "$BOOT_JDK" >&6; }
28361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28362$as_echo_n "checking Boot JDK version... " >&6; }
28363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28365$as_echo "$BOOT_JDK_VERSION" >&6; }
28366          fi # end check jdk version
28367        fi # end check javac
28368      fi # end check java
28369    fi # end check boot jdk found
28370  fi
28371
28372
28373  if test "x$BOOT_JDK_FOUND" = xno; then
28374    # Now execute the test
28375
28376  if test "x$ProgramFiles" != x; then
28377    VIRTUAL_DIR="$ProgramFiles/Java"
28378
28379  windows_path="$VIRTUAL_DIR"
28380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28381    unix_path=`$CYGPATH -u "$windows_path"`
28382    VIRTUAL_DIR="$unix_path"
28383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28385    VIRTUAL_DIR="$unix_path"
28386  fi
28387
28388
28389  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28390  BOOT_JDK_SUFFIX=""
28391  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28392  if test "x$ALL_JDKS_FOUND" != x; then
28393    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28394
28395  if test "x$BOOT_JDK_FOUND" = xno; then
28396    # Now execute the test
28397
28398        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28399        if test -d "$BOOT_JDK"; then
28400          BOOT_JDK_FOUND=maybe
28401          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28402$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28403        fi
28404
28405
28406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28408      # Do we have a bin/java?
28409      if test ! -x "$BOOT_JDK/bin/java"; then
28410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28412        BOOT_JDK_FOUND=no
28413      else
28414        # Do we have a bin/javac?
28415        if test ! -x "$BOOT_JDK/bin/javac"; then
28416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28420          BOOT_JDK_FOUND=no
28421        else
28422          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28423          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28424
28425          # Extra M4 quote needed to protect [] in grep expression.
28426          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28427          if test "x$FOUND_CORRECT_VERSION" = x; then
28428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28430            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28431$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28432            BOOT_JDK_FOUND=no
28433          else
28434            # We're done! :-)
28435            BOOT_JDK_FOUND=yes
28436
28437  # Only process if variable expands to non-empty
28438
28439  if test "x$BOOT_JDK" != x; then
28440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28441
28442  # Input might be given as Windows format, start by converting to
28443  # unix format.
28444  path="$BOOT_JDK"
28445  new_path=`$CYGPATH -u "$path"`
28446
28447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28450  # "foo.exe" is OK but "foo" is an error.
28451  #
28452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28453  # It is also a way to make sure we got the proper file name for the real test later on.
28454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28455  if test "x$test_shortpath" = x; then
28456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28458    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28459  fi
28460
28461  # Call helper function which possibly converts this using DOS-style short mode.
28462  # If so, the updated path is stored in $new_path.
28463
28464  input_path="$new_path"
28465  # Check if we need to convert this using DOS-style short mode. If the path
28466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28467  # take no chances and rewrite it.
28468  # Note: m4 eats our [], so we need to use [ and ] instead.
28469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28470  if test "x$has_forbidden_chars" != x; then
28471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28475      # Going to short mode and back again did indeed matter. Since short mode is
28476      # case insensitive, let's make it lowercase to improve readability.
28477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28478      # Now convert it back to Unix-style (cygpath)
28479      input_path=`$CYGPATH -u "$shortmode_path"`
28480      new_path="$input_path"
28481    fi
28482  fi
28483
28484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28485  if test "x$test_cygdrive_prefix" = x; then
28486    # As a simple fix, exclude /usr/bin since it's not a real path.
28487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28489      # a path prefixed by /cygdrive for fixpath to work.
28490      new_path="$CYGWIN_ROOT_PATH$input_path"
28491    fi
28492  fi
28493
28494
28495  if test "x$path" != "x$new_path"; then
28496    BOOT_JDK="$new_path"
28497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28499  fi
28500
28501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28502
28503  path="$BOOT_JDK"
28504  has_colon=`$ECHO $path | $GREP ^.:`
28505  new_path="$path"
28506  if test "x$has_colon" = x; then
28507    # Not in mixed or Windows style, start by that.
28508    new_path=`cmd //c echo $path`
28509  fi
28510
28511
28512  input_path="$new_path"
28513  # Check if we need to convert this using DOS-style short mode. If the path
28514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28515  # take no chances and rewrite it.
28516  # Note: m4 eats our [], so we need to use [ and ] instead.
28517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28518  if test "x$has_forbidden_chars" != x; then
28519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28521  fi
28522
28523
28524  windows_path="$new_path"
28525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28526    unix_path=`$CYGPATH -u "$windows_path"`
28527    new_path="$unix_path"
28528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28530    new_path="$unix_path"
28531  fi
28532
28533  if test "x$path" != "x$new_path"; then
28534    BOOT_JDK="$new_path"
28535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28537  fi
28538
28539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28541
28542    else
28543      # We're on a unix platform. Hooray! :)
28544      path="$BOOT_JDK"
28545      has_space=`$ECHO "$path" | $GREP " "`
28546      if test "x$has_space" != x; then
28547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28550      fi
28551
28552      # Use eval to expand a potential ~
28553      eval path="$path"
28554      if test ! -f "$path" && test ! -d "$path"; then
28555        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28556      fi
28557
28558      if test -d "$path"; then
28559        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28560      else
28561        dir="`$DIRNAME "$path"`"
28562        base="`$BASENAME "$path"`"
28563        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28564      fi
28565    fi
28566  fi
28567
28568            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28569$as_echo_n "checking for Boot JDK... " >&6; }
28570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28571$as_echo "$BOOT_JDK" >&6; }
28572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28573$as_echo_n "checking Boot JDK version... " >&6; }
28574            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28576$as_echo "$BOOT_JDK_VERSION" >&6; }
28577          fi # end check jdk version
28578        fi # end check javac
28579      fi # end check java
28580    fi # end check boot jdk found
28581  fi
28582
28583    done
28584  fi
28585
28586  fi
28587
28588
28589    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28590    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28591      # Do we have a bin/java?
28592      if test ! -x "$BOOT_JDK/bin/java"; then
28593        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28595        BOOT_JDK_FOUND=no
28596      else
28597        # Do we have a bin/javac?
28598        if test ! -x "$BOOT_JDK/bin/javac"; then
28599          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28601          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28602$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28603          BOOT_JDK_FOUND=no
28604        else
28605          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28606          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28607
28608          # Extra M4 quote needed to protect [] in grep expression.
28609          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28610          if test "x$FOUND_CORRECT_VERSION" = x; then
28611            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28613            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28614$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28615            BOOT_JDK_FOUND=no
28616          else
28617            # We're done! :-)
28618            BOOT_JDK_FOUND=yes
28619
28620  # Only process if variable expands to non-empty
28621
28622  if test "x$BOOT_JDK" != x; then
28623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28624
28625  # Input might be given as Windows format, start by converting to
28626  # unix format.
28627  path="$BOOT_JDK"
28628  new_path=`$CYGPATH -u "$path"`
28629
28630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28633  # "foo.exe" is OK but "foo" is an error.
28634  #
28635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28636  # It is also a way to make sure we got the proper file name for the real test later on.
28637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28638  if test "x$test_shortpath" = x; then
28639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28641    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28642  fi
28643
28644  # Call helper function which possibly converts this using DOS-style short mode.
28645  # If so, the updated path is stored in $new_path.
28646
28647  input_path="$new_path"
28648  # Check if we need to convert this using DOS-style short mode. If the path
28649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28650  # take no chances and rewrite it.
28651  # Note: m4 eats our [], so we need to use [ and ] instead.
28652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28653  if test "x$has_forbidden_chars" != x; then
28654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28658      # Going to short mode and back again did indeed matter. Since short mode is
28659      # case insensitive, let's make it lowercase to improve readability.
28660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28661      # Now convert it back to Unix-style (cygpath)
28662      input_path=`$CYGPATH -u "$shortmode_path"`
28663      new_path="$input_path"
28664    fi
28665  fi
28666
28667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28668  if test "x$test_cygdrive_prefix" = x; then
28669    # As a simple fix, exclude /usr/bin since it's not a real path.
28670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28672      # a path prefixed by /cygdrive for fixpath to work.
28673      new_path="$CYGWIN_ROOT_PATH$input_path"
28674    fi
28675  fi
28676
28677
28678  if test "x$path" != "x$new_path"; then
28679    BOOT_JDK="$new_path"
28680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28682  fi
28683
28684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28685
28686  path="$BOOT_JDK"
28687  has_colon=`$ECHO $path | $GREP ^.:`
28688  new_path="$path"
28689  if test "x$has_colon" = x; then
28690    # Not in mixed or Windows style, start by that.
28691    new_path=`cmd //c echo $path`
28692  fi
28693
28694
28695  input_path="$new_path"
28696  # Check if we need to convert this using DOS-style short mode. If the path
28697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28698  # take no chances and rewrite it.
28699  # Note: m4 eats our [], so we need to use [ and ] instead.
28700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28701  if test "x$has_forbidden_chars" != x; then
28702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28704  fi
28705
28706
28707  windows_path="$new_path"
28708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28709    unix_path=`$CYGPATH -u "$windows_path"`
28710    new_path="$unix_path"
28711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28713    new_path="$unix_path"
28714  fi
28715
28716  if test "x$path" != "x$new_path"; then
28717    BOOT_JDK="$new_path"
28718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28719$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28720  fi
28721
28722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28724
28725    else
28726      # We're on a unix platform. Hooray! :)
28727      path="$BOOT_JDK"
28728      has_space=`$ECHO "$path" | $GREP " "`
28729      if test "x$has_space" != x; then
28730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28733      fi
28734
28735      # Use eval to expand a potential ~
28736      eval path="$path"
28737      if test ! -f "$path" && test ! -d "$path"; then
28738        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28739      fi
28740
28741      if test -d "$path"; then
28742        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28743      else
28744        dir="`$DIRNAME "$path"`"
28745        base="`$BASENAME "$path"`"
28746        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28747      fi
28748    fi
28749  fi
28750
28751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28752$as_echo_n "checking for Boot JDK... " >&6; }
28753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28754$as_echo "$BOOT_JDK" >&6; }
28755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28756$as_echo_n "checking Boot JDK version... " >&6; }
28757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28759$as_echo "$BOOT_JDK_VERSION" >&6; }
28760          fi # end check jdk version
28761        fi # end check javac
28762      fi # end check java
28763    fi # end check boot jdk found
28764  fi
28765
28766
28767  if test "x$BOOT_JDK_FOUND" = xno; then
28768    # Now execute the test
28769
28770  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28771  BOOT_JDK_SUFFIX=""
28772  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28773  if test "x$ALL_JDKS_FOUND" != x; then
28774    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28775
28776  if test "x$BOOT_JDK_FOUND" = xno; then
28777    # Now execute the test
28778
28779        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28780        if test -d "$BOOT_JDK"; then
28781          BOOT_JDK_FOUND=maybe
28782          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28783$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28784        fi
28785
28786
28787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28789      # Do we have a bin/java?
28790      if test ! -x "$BOOT_JDK/bin/java"; then
28791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28793        BOOT_JDK_FOUND=no
28794      else
28795        # Do we have a bin/javac?
28796        if test ! -x "$BOOT_JDK/bin/javac"; then
28797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28801          BOOT_JDK_FOUND=no
28802        else
28803          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28804          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28805
28806          # Extra M4 quote needed to protect [] in grep expression.
28807          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28808          if test "x$FOUND_CORRECT_VERSION" = x; then
28809            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28811            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28812$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28813            BOOT_JDK_FOUND=no
28814          else
28815            # We're done! :-)
28816            BOOT_JDK_FOUND=yes
28817
28818  # Only process if variable expands to non-empty
28819
28820  if test "x$BOOT_JDK" != x; then
28821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28822
28823  # Input might be given as Windows format, start by converting to
28824  # unix format.
28825  path="$BOOT_JDK"
28826  new_path=`$CYGPATH -u "$path"`
28827
28828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28831  # "foo.exe" is OK but "foo" is an error.
28832  #
28833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28834  # It is also a way to make sure we got the proper file name for the real test later on.
28835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28836  if test "x$test_shortpath" = x; then
28837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28839    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28840  fi
28841
28842  # Call helper function which possibly converts this using DOS-style short mode.
28843  # If so, the updated path is stored in $new_path.
28844
28845  input_path="$new_path"
28846  # Check if we need to convert this using DOS-style short mode. If the path
28847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28848  # take no chances and rewrite it.
28849  # Note: m4 eats our [], so we need to use [ and ] instead.
28850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28851  if test "x$has_forbidden_chars" != x; then
28852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28856      # Going to short mode and back again did indeed matter. Since short mode is
28857      # case insensitive, let's make it lowercase to improve readability.
28858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28859      # Now convert it back to Unix-style (cygpath)
28860      input_path=`$CYGPATH -u "$shortmode_path"`
28861      new_path="$input_path"
28862    fi
28863  fi
28864
28865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28866  if test "x$test_cygdrive_prefix" = x; then
28867    # As a simple fix, exclude /usr/bin since it's not a real path.
28868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28870      # a path prefixed by /cygdrive for fixpath to work.
28871      new_path="$CYGWIN_ROOT_PATH$input_path"
28872    fi
28873  fi
28874
28875
28876  if test "x$path" != "x$new_path"; then
28877    BOOT_JDK="$new_path"
28878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28880  fi
28881
28882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28883
28884  path="$BOOT_JDK"
28885  has_colon=`$ECHO $path | $GREP ^.:`
28886  new_path="$path"
28887  if test "x$has_colon" = x; then
28888    # Not in mixed or Windows style, start by that.
28889    new_path=`cmd //c echo $path`
28890  fi
28891
28892
28893  input_path="$new_path"
28894  # Check if we need to convert this using DOS-style short mode. If the path
28895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28896  # take no chances and rewrite it.
28897  # Note: m4 eats our [], so we need to use [ and ] instead.
28898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28899  if test "x$has_forbidden_chars" != x; then
28900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28902  fi
28903
28904
28905  windows_path="$new_path"
28906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28907    unix_path=`$CYGPATH -u "$windows_path"`
28908    new_path="$unix_path"
28909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28911    new_path="$unix_path"
28912  fi
28913
28914  if test "x$path" != "x$new_path"; then
28915    BOOT_JDK="$new_path"
28916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28918  fi
28919
28920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28922
28923    else
28924      # We're on a unix platform. Hooray! :)
28925      path="$BOOT_JDK"
28926      has_space=`$ECHO "$path" | $GREP " "`
28927      if test "x$has_space" != x; then
28928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28931      fi
28932
28933      # Use eval to expand a potential ~
28934      eval path="$path"
28935      if test ! -f "$path" && test ! -d "$path"; then
28936        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28937      fi
28938
28939      if test -d "$path"; then
28940        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28941      else
28942        dir="`$DIRNAME "$path"`"
28943        base="`$BASENAME "$path"`"
28944        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28945      fi
28946    fi
28947  fi
28948
28949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28950$as_echo_n "checking for Boot JDK... " >&6; }
28951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28952$as_echo "$BOOT_JDK" >&6; }
28953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28954$as_echo_n "checking Boot JDK version... " >&6; }
28955            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28957$as_echo "$BOOT_JDK_VERSION" >&6; }
28958          fi # end check jdk version
28959        fi # end check javac
28960      fi # end check java
28961    fi # end check boot jdk found
28962  fi
28963
28964    done
28965  fi
28966
28967
28968    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28969    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28970      # Do we have a bin/java?
28971      if test ! -x "$BOOT_JDK/bin/java"; then
28972        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28974        BOOT_JDK_FOUND=no
28975      else
28976        # Do we have a bin/javac?
28977        if test ! -x "$BOOT_JDK/bin/javac"; then
28978          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28980          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28981$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28982          BOOT_JDK_FOUND=no
28983        else
28984          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28985          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28986
28987          # Extra M4 quote needed to protect [] in grep expression.
28988          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28989          if test "x$FOUND_CORRECT_VERSION" = x; then
28990            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28992            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28993$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28994            BOOT_JDK_FOUND=no
28995          else
28996            # We're done! :-)
28997            BOOT_JDK_FOUND=yes
28998
28999  # Only process if variable expands to non-empty
29000
29001  if test "x$BOOT_JDK" != x; then
29002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29003
29004  # Input might be given as Windows format, start by converting to
29005  # unix format.
29006  path="$BOOT_JDK"
29007  new_path=`$CYGPATH -u "$path"`
29008
29009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29012  # "foo.exe" is OK but "foo" is an error.
29013  #
29014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29015  # It is also a way to make sure we got the proper file name for the real test later on.
29016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29017  if test "x$test_shortpath" = x; then
29018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29020    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29021  fi
29022
29023  # Call helper function which possibly converts this using DOS-style short mode.
29024  # If so, the updated path is stored in $new_path.
29025
29026  input_path="$new_path"
29027  # Check if we need to convert this using DOS-style short mode. If the path
29028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29029  # take no chances and rewrite it.
29030  # Note: m4 eats our [], so we need to use [ and ] instead.
29031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29032  if test "x$has_forbidden_chars" != x; then
29033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29037      # Going to short mode and back again did indeed matter. Since short mode is
29038      # case insensitive, let's make it lowercase to improve readability.
29039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29040      # Now convert it back to Unix-style (cygpath)
29041      input_path=`$CYGPATH -u "$shortmode_path"`
29042      new_path="$input_path"
29043    fi
29044  fi
29045
29046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29047  if test "x$test_cygdrive_prefix" = x; then
29048    # As a simple fix, exclude /usr/bin since it's not a real path.
29049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29051      # a path prefixed by /cygdrive for fixpath to work.
29052      new_path="$CYGWIN_ROOT_PATH$input_path"
29053    fi
29054  fi
29055
29056
29057  if test "x$path" != "x$new_path"; then
29058    BOOT_JDK="$new_path"
29059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29061  fi
29062
29063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29064
29065  path="$BOOT_JDK"
29066  has_colon=`$ECHO $path | $GREP ^.:`
29067  new_path="$path"
29068  if test "x$has_colon" = x; then
29069    # Not in mixed or Windows style, start by that.
29070    new_path=`cmd //c echo $path`
29071  fi
29072
29073
29074  input_path="$new_path"
29075  # Check if we need to convert this using DOS-style short mode. If the path
29076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29077  # take no chances and rewrite it.
29078  # Note: m4 eats our [], so we need to use [ and ] instead.
29079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29080  if test "x$has_forbidden_chars" != x; then
29081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29083  fi
29084
29085
29086  windows_path="$new_path"
29087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29088    unix_path=`$CYGPATH -u "$windows_path"`
29089    new_path="$unix_path"
29090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29092    new_path="$unix_path"
29093  fi
29094
29095  if test "x$path" != "x$new_path"; then
29096    BOOT_JDK="$new_path"
29097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29099  fi
29100
29101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29103
29104    else
29105      # We're on a unix platform. Hooray! :)
29106      path="$BOOT_JDK"
29107      has_space=`$ECHO "$path" | $GREP " "`
29108      if test "x$has_space" != x; then
29109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29112      fi
29113
29114      # Use eval to expand a potential ~
29115      eval path="$path"
29116      if test ! -f "$path" && test ! -d "$path"; then
29117        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29118      fi
29119
29120      if test -d "$path"; then
29121        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29122      else
29123        dir="`$DIRNAME "$path"`"
29124        base="`$BASENAME "$path"`"
29125        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29126      fi
29127    fi
29128  fi
29129
29130            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29131$as_echo_n "checking for Boot JDK... " >&6; }
29132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29133$as_echo "$BOOT_JDK" >&6; }
29134            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29135$as_echo_n "checking Boot JDK version... " >&6; }
29136            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29137            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29138$as_echo "$BOOT_JDK_VERSION" >&6; }
29139          fi # end check jdk version
29140        fi # end check javac
29141      fi # end check java
29142    fi # end check boot jdk found
29143  fi
29144
29145  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29146
29147  if test "x$BOOT_JDK_FOUND" = xno; then
29148    # Now execute the test
29149
29150  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29151  BOOT_JDK_SUFFIX="/Contents/Home"
29152  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29153  if test "x$ALL_JDKS_FOUND" != x; then
29154    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29155
29156  if test "x$BOOT_JDK_FOUND" = xno; then
29157    # Now execute the test
29158
29159        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29160        if test -d "$BOOT_JDK"; then
29161          BOOT_JDK_FOUND=maybe
29162          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29163$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29164        fi
29165
29166
29167    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29168    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29169      # Do we have a bin/java?
29170      if test ! -x "$BOOT_JDK/bin/java"; then
29171        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29173        BOOT_JDK_FOUND=no
29174      else
29175        # Do we have a bin/javac?
29176        if test ! -x "$BOOT_JDK/bin/javac"; then
29177          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29179          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29180$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29181          BOOT_JDK_FOUND=no
29182        else
29183          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29184          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29185
29186          # Extra M4 quote needed to protect [] in grep expression.
29187          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29188          if test "x$FOUND_CORRECT_VERSION" = x; then
29189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29191            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29192$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29193            BOOT_JDK_FOUND=no
29194          else
29195            # We're done! :-)
29196            BOOT_JDK_FOUND=yes
29197
29198  # Only process if variable expands to non-empty
29199
29200  if test "x$BOOT_JDK" != x; then
29201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29202
29203  # Input might be given as Windows format, start by converting to
29204  # unix format.
29205  path="$BOOT_JDK"
29206  new_path=`$CYGPATH -u "$path"`
29207
29208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29211  # "foo.exe" is OK but "foo" is an error.
29212  #
29213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29214  # It is also a way to make sure we got the proper file name for the real test later on.
29215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29216  if test "x$test_shortpath" = x; then
29217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29219    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29220  fi
29221
29222  # Call helper function which possibly converts this using DOS-style short mode.
29223  # If so, the updated path is stored in $new_path.
29224
29225  input_path="$new_path"
29226  # Check if we need to convert this using DOS-style short mode. If the path
29227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29228  # take no chances and rewrite it.
29229  # Note: m4 eats our [], so we need to use [ and ] instead.
29230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29231  if test "x$has_forbidden_chars" != x; then
29232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29236      # Going to short mode and back again did indeed matter. Since short mode is
29237      # case insensitive, let's make it lowercase to improve readability.
29238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29239      # Now convert it back to Unix-style (cygpath)
29240      input_path=`$CYGPATH -u "$shortmode_path"`
29241      new_path="$input_path"
29242    fi
29243  fi
29244
29245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29246  if test "x$test_cygdrive_prefix" = x; then
29247    # As a simple fix, exclude /usr/bin since it's not a real path.
29248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29250      # a path prefixed by /cygdrive for fixpath to work.
29251      new_path="$CYGWIN_ROOT_PATH$input_path"
29252    fi
29253  fi
29254
29255
29256  if test "x$path" != "x$new_path"; then
29257    BOOT_JDK="$new_path"
29258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29260  fi
29261
29262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29263
29264  path="$BOOT_JDK"
29265  has_colon=`$ECHO $path | $GREP ^.:`
29266  new_path="$path"
29267  if test "x$has_colon" = x; then
29268    # Not in mixed or Windows style, start by that.
29269    new_path=`cmd //c echo $path`
29270  fi
29271
29272
29273  input_path="$new_path"
29274  # Check if we need to convert this using DOS-style short mode. If the path
29275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29276  # take no chances and rewrite it.
29277  # Note: m4 eats our [], so we need to use [ and ] instead.
29278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29279  if test "x$has_forbidden_chars" != x; then
29280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29282  fi
29283
29284
29285  windows_path="$new_path"
29286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29287    unix_path=`$CYGPATH -u "$windows_path"`
29288    new_path="$unix_path"
29289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29291    new_path="$unix_path"
29292  fi
29293
29294  if test "x$path" != "x$new_path"; then
29295    BOOT_JDK="$new_path"
29296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29298  fi
29299
29300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29302
29303    else
29304      # We're on a unix platform. Hooray! :)
29305      path="$BOOT_JDK"
29306      has_space=`$ECHO "$path" | $GREP " "`
29307      if test "x$has_space" != x; then
29308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29311      fi
29312
29313      # Use eval to expand a potential ~
29314      eval path="$path"
29315      if test ! -f "$path" && test ! -d "$path"; then
29316        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29317      fi
29318
29319      if test -d "$path"; then
29320        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29321      else
29322        dir="`$DIRNAME "$path"`"
29323        base="`$BASENAME "$path"`"
29324        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29325      fi
29326    fi
29327  fi
29328
29329            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29330$as_echo_n "checking for Boot JDK... " >&6; }
29331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29332$as_echo "$BOOT_JDK" >&6; }
29333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29334$as_echo_n "checking Boot JDK version... " >&6; }
29335            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29337$as_echo "$BOOT_JDK_VERSION" >&6; }
29338          fi # end check jdk version
29339        fi # end check javac
29340      fi # end check java
29341    fi # end check boot jdk found
29342  fi
29343
29344    done
29345  fi
29346
29347
29348    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29349    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29350      # Do we have a bin/java?
29351      if test ! -x "$BOOT_JDK/bin/java"; then
29352        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29354        BOOT_JDK_FOUND=no
29355      else
29356        # Do we have a bin/javac?
29357        if test ! -x "$BOOT_JDK/bin/javac"; then
29358          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29360          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29361$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29362          BOOT_JDK_FOUND=no
29363        else
29364          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29365          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29366
29367          # Extra M4 quote needed to protect [] in grep expression.
29368          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29369          if test "x$FOUND_CORRECT_VERSION" = x; then
29370            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29372            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29373$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29374            BOOT_JDK_FOUND=no
29375          else
29376            # We're done! :-)
29377            BOOT_JDK_FOUND=yes
29378
29379  # Only process if variable expands to non-empty
29380
29381  if test "x$BOOT_JDK" != x; then
29382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29383
29384  # Input might be given as Windows format, start by converting to
29385  # unix format.
29386  path="$BOOT_JDK"
29387  new_path=`$CYGPATH -u "$path"`
29388
29389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29392  # "foo.exe" is OK but "foo" is an error.
29393  #
29394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29395  # It is also a way to make sure we got the proper file name for the real test later on.
29396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29397  if test "x$test_shortpath" = x; then
29398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29400    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29401  fi
29402
29403  # Call helper function which possibly converts this using DOS-style short mode.
29404  # If so, the updated path is stored in $new_path.
29405
29406  input_path="$new_path"
29407  # Check if we need to convert this using DOS-style short mode. If the path
29408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29409  # take no chances and rewrite it.
29410  # Note: m4 eats our [], so we need to use [ and ] instead.
29411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29412  if test "x$has_forbidden_chars" != x; then
29413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29417      # Going to short mode and back again did indeed matter. Since short mode is
29418      # case insensitive, let's make it lowercase to improve readability.
29419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29420      # Now convert it back to Unix-style (cygpath)
29421      input_path=`$CYGPATH -u "$shortmode_path"`
29422      new_path="$input_path"
29423    fi
29424  fi
29425
29426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29427  if test "x$test_cygdrive_prefix" = x; then
29428    # As a simple fix, exclude /usr/bin since it's not a real path.
29429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29431      # a path prefixed by /cygdrive for fixpath to work.
29432      new_path="$CYGWIN_ROOT_PATH$input_path"
29433    fi
29434  fi
29435
29436
29437  if test "x$path" != "x$new_path"; then
29438    BOOT_JDK="$new_path"
29439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29441  fi
29442
29443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29444
29445  path="$BOOT_JDK"
29446  has_colon=`$ECHO $path | $GREP ^.:`
29447  new_path="$path"
29448  if test "x$has_colon" = x; then
29449    # Not in mixed or Windows style, start by that.
29450    new_path=`cmd //c echo $path`
29451  fi
29452
29453
29454  input_path="$new_path"
29455  # Check if we need to convert this using DOS-style short mode. If the path
29456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29457  # take no chances and rewrite it.
29458  # Note: m4 eats our [], so we need to use [ and ] instead.
29459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29460  if test "x$has_forbidden_chars" != x; then
29461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29463  fi
29464
29465
29466  windows_path="$new_path"
29467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29468    unix_path=`$CYGPATH -u "$windows_path"`
29469    new_path="$unix_path"
29470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29472    new_path="$unix_path"
29473  fi
29474
29475  if test "x$path" != "x$new_path"; then
29476    BOOT_JDK="$new_path"
29477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29479  fi
29480
29481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29483
29484    else
29485      # We're on a unix platform. Hooray! :)
29486      path="$BOOT_JDK"
29487      has_space=`$ECHO "$path" | $GREP " "`
29488      if test "x$has_space" != x; then
29489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29491        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29492      fi
29493
29494      # Use eval to expand a potential ~
29495      eval path="$path"
29496      if test ! -f "$path" && test ! -d "$path"; then
29497        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29498      fi
29499
29500      if test -d "$path"; then
29501        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29502      else
29503        dir="`$DIRNAME "$path"`"
29504        base="`$BASENAME "$path"`"
29505        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29506      fi
29507    fi
29508  fi
29509
29510            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29511$as_echo_n "checking for Boot JDK... " >&6; }
29512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29513$as_echo "$BOOT_JDK" >&6; }
29514            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29515$as_echo_n "checking Boot JDK version... " >&6; }
29516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29518$as_echo "$BOOT_JDK_VERSION" >&6; }
29519          fi # end check jdk version
29520        fi # end check javac
29521      fi # end check java
29522    fi # end check boot jdk found
29523  fi
29524
29525
29526  if test "x$BOOT_JDK_FOUND" = xno; then
29527    # Now execute the test
29528
29529  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29530  BOOT_JDK_SUFFIX="/Contents/Home"
29531  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29532  if test "x$ALL_JDKS_FOUND" != x; then
29533    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29534
29535  if test "x$BOOT_JDK_FOUND" = xno; then
29536    # Now execute the test
29537
29538        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29539        if test -d "$BOOT_JDK"; then
29540          BOOT_JDK_FOUND=maybe
29541          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29542$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29543        fi
29544
29545
29546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29548      # Do we have a bin/java?
29549      if test ! -x "$BOOT_JDK/bin/java"; then
29550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29552        BOOT_JDK_FOUND=no
29553      else
29554        # Do we have a bin/javac?
29555        if test ! -x "$BOOT_JDK/bin/javac"; then
29556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29560          BOOT_JDK_FOUND=no
29561        else
29562          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29563          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29564
29565          # Extra M4 quote needed to protect [] in grep expression.
29566          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29567          if test "x$FOUND_CORRECT_VERSION" = x; then
29568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29570            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29571$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29572            BOOT_JDK_FOUND=no
29573          else
29574            # We're done! :-)
29575            BOOT_JDK_FOUND=yes
29576
29577  # Only process if variable expands to non-empty
29578
29579  if test "x$BOOT_JDK" != x; then
29580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29581
29582  # Input might be given as Windows format, start by converting to
29583  # unix format.
29584  path="$BOOT_JDK"
29585  new_path=`$CYGPATH -u "$path"`
29586
29587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29590  # "foo.exe" is OK but "foo" is an error.
29591  #
29592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29593  # It is also a way to make sure we got the proper file name for the real test later on.
29594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29595  if test "x$test_shortpath" = x; then
29596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29599  fi
29600
29601  # Call helper function which possibly converts this using DOS-style short mode.
29602  # If so, the updated path is stored in $new_path.
29603
29604  input_path="$new_path"
29605  # Check if we need to convert this using DOS-style short mode. If the path
29606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29607  # take no chances and rewrite it.
29608  # Note: m4 eats our [], so we need to use [ and ] instead.
29609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29610  if test "x$has_forbidden_chars" != x; then
29611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29615      # Going to short mode and back again did indeed matter. Since short mode is
29616      # case insensitive, let's make it lowercase to improve readability.
29617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29618      # Now convert it back to Unix-style (cygpath)
29619      input_path=`$CYGPATH -u "$shortmode_path"`
29620      new_path="$input_path"
29621    fi
29622  fi
29623
29624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29625  if test "x$test_cygdrive_prefix" = x; then
29626    # As a simple fix, exclude /usr/bin since it's not a real path.
29627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29629      # a path prefixed by /cygdrive for fixpath to work.
29630      new_path="$CYGWIN_ROOT_PATH$input_path"
29631    fi
29632  fi
29633
29634
29635  if test "x$path" != "x$new_path"; then
29636    BOOT_JDK="$new_path"
29637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29639  fi
29640
29641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29642
29643  path="$BOOT_JDK"
29644  has_colon=`$ECHO $path | $GREP ^.:`
29645  new_path="$path"
29646  if test "x$has_colon" = x; then
29647    # Not in mixed or Windows style, start by that.
29648    new_path=`cmd //c echo $path`
29649  fi
29650
29651
29652  input_path="$new_path"
29653  # Check if we need to convert this using DOS-style short mode. If the path
29654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29655  # take no chances and rewrite it.
29656  # Note: m4 eats our [], so we need to use [ and ] instead.
29657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29658  if test "x$has_forbidden_chars" != x; then
29659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29661  fi
29662
29663
29664  windows_path="$new_path"
29665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29666    unix_path=`$CYGPATH -u "$windows_path"`
29667    new_path="$unix_path"
29668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29670    new_path="$unix_path"
29671  fi
29672
29673  if test "x$path" != "x$new_path"; then
29674    BOOT_JDK="$new_path"
29675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29677  fi
29678
29679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29681
29682    else
29683      # We're on a unix platform. Hooray! :)
29684      path="$BOOT_JDK"
29685      has_space=`$ECHO "$path" | $GREP " "`
29686      if test "x$has_space" != x; then
29687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29690      fi
29691
29692      # Use eval to expand a potential ~
29693      eval path="$path"
29694      if test ! -f "$path" && test ! -d "$path"; then
29695        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29696      fi
29697
29698      if test -d "$path"; then
29699        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29700      else
29701        dir="`$DIRNAME "$path"`"
29702        base="`$BASENAME "$path"`"
29703        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29704      fi
29705    fi
29706  fi
29707
29708            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29709$as_echo_n "checking for Boot JDK... " >&6; }
29710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29711$as_echo "$BOOT_JDK" >&6; }
29712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29713$as_echo_n "checking Boot JDK version... " >&6; }
29714            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29716$as_echo "$BOOT_JDK_VERSION" >&6; }
29717          fi # end check jdk version
29718        fi # end check javac
29719      fi # end check java
29720    fi # end check boot jdk found
29721  fi
29722
29723    done
29724  fi
29725
29726
29727    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29728    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29729      # Do we have a bin/java?
29730      if test ! -x "$BOOT_JDK/bin/java"; then
29731        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29733        BOOT_JDK_FOUND=no
29734      else
29735        # Do we have a bin/javac?
29736        if test ! -x "$BOOT_JDK/bin/javac"; then
29737          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29739          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29740$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29741          BOOT_JDK_FOUND=no
29742        else
29743          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29744          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29745
29746          # Extra M4 quote needed to protect [] in grep expression.
29747          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29748          if test "x$FOUND_CORRECT_VERSION" = x; then
29749            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29751            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29752$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29753            BOOT_JDK_FOUND=no
29754          else
29755            # We're done! :-)
29756            BOOT_JDK_FOUND=yes
29757
29758  # Only process if variable expands to non-empty
29759
29760  if test "x$BOOT_JDK" != x; then
29761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29762
29763  # Input might be given as Windows format, start by converting to
29764  # unix format.
29765  path="$BOOT_JDK"
29766  new_path=`$CYGPATH -u "$path"`
29767
29768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29771  # "foo.exe" is OK but "foo" is an error.
29772  #
29773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29774  # It is also a way to make sure we got the proper file name for the real test later on.
29775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29776  if test "x$test_shortpath" = x; then
29777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29779    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29780  fi
29781
29782  # Call helper function which possibly converts this using DOS-style short mode.
29783  # If so, the updated path is stored in $new_path.
29784
29785  input_path="$new_path"
29786  # Check if we need to convert this using DOS-style short mode. If the path
29787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29788  # take no chances and rewrite it.
29789  # Note: m4 eats our [], so we need to use [ and ] instead.
29790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29791  if test "x$has_forbidden_chars" != x; then
29792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29796      # Going to short mode and back again did indeed matter. Since short mode is
29797      # case insensitive, let's make it lowercase to improve readability.
29798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29799      # Now convert it back to Unix-style (cygpath)
29800      input_path=`$CYGPATH -u "$shortmode_path"`
29801      new_path="$input_path"
29802    fi
29803  fi
29804
29805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29806  if test "x$test_cygdrive_prefix" = x; then
29807    # As a simple fix, exclude /usr/bin since it's not a real path.
29808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29810      # a path prefixed by /cygdrive for fixpath to work.
29811      new_path="$CYGWIN_ROOT_PATH$input_path"
29812    fi
29813  fi
29814
29815
29816  if test "x$path" != "x$new_path"; then
29817    BOOT_JDK="$new_path"
29818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29820  fi
29821
29822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29823
29824  path="$BOOT_JDK"
29825  has_colon=`$ECHO $path | $GREP ^.:`
29826  new_path="$path"
29827  if test "x$has_colon" = x; then
29828    # Not in mixed or Windows style, start by that.
29829    new_path=`cmd //c echo $path`
29830  fi
29831
29832
29833  input_path="$new_path"
29834  # Check if we need to convert this using DOS-style short mode. If the path
29835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29836  # take no chances and rewrite it.
29837  # Note: m4 eats our [], so we need to use [ and ] instead.
29838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29839  if test "x$has_forbidden_chars" != x; then
29840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29842  fi
29843
29844
29845  windows_path="$new_path"
29846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29847    unix_path=`$CYGPATH -u "$windows_path"`
29848    new_path="$unix_path"
29849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29851    new_path="$unix_path"
29852  fi
29853
29854  if test "x$path" != "x$new_path"; then
29855    BOOT_JDK="$new_path"
29856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29858  fi
29859
29860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29862
29863    else
29864      # We're on a unix platform. Hooray! :)
29865      path="$BOOT_JDK"
29866      has_space=`$ECHO "$path" | $GREP " "`
29867      if test "x$has_space" != x; then
29868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29871      fi
29872
29873      # Use eval to expand a potential ~
29874      eval path="$path"
29875      if test ! -f "$path" && test ! -d "$path"; then
29876        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29877      fi
29878
29879      if test -d "$path"; then
29880        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29881      else
29882        dir="`$DIRNAME "$path"`"
29883        base="`$BASENAME "$path"`"
29884        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29885      fi
29886    fi
29887  fi
29888
29889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29890$as_echo_n "checking for Boot JDK... " >&6; }
29891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29892$as_echo "$BOOT_JDK" >&6; }
29893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29894$as_echo_n "checking Boot JDK version... " >&6; }
29895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29897$as_echo "$BOOT_JDK_VERSION" >&6; }
29898          fi # end check jdk version
29899        fi # end check javac
29900      fi # end check java
29901    fi # end check boot jdk found
29902  fi
29903
29904  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29905
29906  if test "x$BOOT_JDK_FOUND" = xno; then
29907    # Now execute the test
29908
29909  BOOT_JDK_PREFIX="/usr/lib/jvm"
29910  BOOT_JDK_SUFFIX=""
29911  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29912  if test "x$ALL_JDKS_FOUND" != x; then
29913    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29914
29915  if test "x$BOOT_JDK_FOUND" = xno; then
29916    # Now execute the test
29917
29918        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29919        if test -d "$BOOT_JDK"; then
29920          BOOT_JDK_FOUND=maybe
29921          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29922$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29923        fi
29924
29925
29926    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29927    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29928      # Do we have a bin/java?
29929      if test ! -x "$BOOT_JDK/bin/java"; then
29930        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29932        BOOT_JDK_FOUND=no
29933      else
29934        # Do we have a bin/javac?
29935        if test ! -x "$BOOT_JDK/bin/javac"; then
29936          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29938          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29939$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29940          BOOT_JDK_FOUND=no
29941        else
29942          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29943          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29944
29945          # Extra M4 quote needed to protect [] in grep expression.
29946          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29947          if test "x$FOUND_CORRECT_VERSION" = x; then
29948            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29950            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29951$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29952            BOOT_JDK_FOUND=no
29953          else
29954            # We're done! :-)
29955            BOOT_JDK_FOUND=yes
29956
29957  # Only process if variable expands to non-empty
29958
29959  if test "x$BOOT_JDK" != x; then
29960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29961
29962  # Input might be given as Windows format, start by converting to
29963  # unix format.
29964  path="$BOOT_JDK"
29965  new_path=`$CYGPATH -u "$path"`
29966
29967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29970  # "foo.exe" is OK but "foo" is an error.
29971  #
29972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29973  # It is also a way to make sure we got the proper file name for the real test later on.
29974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29975  if test "x$test_shortpath" = x; then
29976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29978    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29979  fi
29980
29981  # Call helper function which possibly converts this using DOS-style short mode.
29982  # If so, the updated path is stored in $new_path.
29983
29984  input_path="$new_path"
29985  # Check if we need to convert this using DOS-style short mode. If the path
29986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29987  # take no chances and rewrite it.
29988  # Note: m4 eats our [], so we need to use [ and ] instead.
29989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29990  if test "x$has_forbidden_chars" != x; then
29991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29995      # Going to short mode and back again did indeed matter. Since short mode is
29996      # case insensitive, let's make it lowercase to improve readability.
29997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29998      # Now convert it back to Unix-style (cygpath)
29999      input_path=`$CYGPATH -u "$shortmode_path"`
30000      new_path="$input_path"
30001    fi
30002  fi
30003
30004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30005  if test "x$test_cygdrive_prefix" = x; then
30006    # As a simple fix, exclude /usr/bin since it's not a real path.
30007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30009      # a path prefixed by /cygdrive for fixpath to work.
30010      new_path="$CYGWIN_ROOT_PATH$input_path"
30011    fi
30012  fi
30013
30014
30015  if test "x$path" != "x$new_path"; then
30016    BOOT_JDK="$new_path"
30017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30018$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30019  fi
30020
30021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30022
30023  path="$BOOT_JDK"
30024  has_colon=`$ECHO $path | $GREP ^.:`
30025  new_path="$path"
30026  if test "x$has_colon" = x; then
30027    # Not in mixed or Windows style, start by that.
30028    new_path=`cmd //c echo $path`
30029  fi
30030
30031
30032  input_path="$new_path"
30033  # Check if we need to convert this using DOS-style short mode. If the path
30034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30035  # take no chances and rewrite it.
30036  # Note: m4 eats our [], so we need to use [ and ] instead.
30037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30038  if test "x$has_forbidden_chars" != x; then
30039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30041  fi
30042
30043
30044  windows_path="$new_path"
30045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30046    unix_path=`$CYGPATH -u "$windows_path"`
30047    new_path="$unix_path"
30048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30050    new_path="$unix_path"
30051  fi
30052
30053  if test "x$path" != "x$new_path"; then
30054    BOOT_JDK="$new_path"
30055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30056$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30057  fi
30058
30059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30061
30062    else
30063      # We're on a unix platform. Hooray! :)
30064      path="$BOOT_JDK"
30065      has_space=`$ECHO "$path" | $GREP " "`
30066      if test "x$has_space" != x; then
30067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30070      fi
30071
30072      # Use eval to expand a potential ~
30073      eval path="$path"
30074      if test ! -f "$path" && test ! -d "$path"; then
30075        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30076      fi
30077
30078      if test -d "$path"; then
30079        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30080      else
30081        dir="`$DIRNAME "$path"`"
30082        base="`$BASENAME "$path"`"
30083        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30084      fi
30085    fi
30086  fi
30087
30088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30089$as_echo_n "checking for Boot JDK... " >&6; }
30090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30091$as_echo "$BOOT_JDK" >&6; }
30092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30093$as_echo_n "checking Boot JDK version... " >&6; }
30094            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30096$as_echo "$BOOT_JDK_VERSION" >&6; }
30097          fi # end check jdk version
30098        fi # end check javac
30099      fi # end check java
30100    fi # end check boot jdk found
30101  fi
30102
30103    done
30104  fi
30105
30106
30107    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30108    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30109      # Do we have a bin/java?
30110      if test ! -x "$BOOT_JDK/bin/java"; then
30111        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30113        BOOT_JDK_FOUND=no
30114      else
30115        # Do we have a bin/javac?
30116        if test ! -x "$BOOT_JDK/bin/javac"; then
30117          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30119          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30120$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30121          BOOT_JDK_FOUND=no
30122        else
30123          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30124          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30125
30126          # Extra M4 quote needed to protect [] in grep expression.
30127          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30128          if test "x$FOUND_CORRECT_VERSION" = x; then
30129            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30131            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30132$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30133            BOOT_JDK_FOUND=no
30134          else
30135            # We're done! :-)
30136            BOOT_JDK_FOUND=yes
30137
30138  # Only process if variable expands to non-empty
30139
30140  if test "x$BOOT_JDK" != x; then
30141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30142
30143  # Input might be given as Windows format, start by converting to
30144  # unix format.
30145  path="$BOOT_JDK"
30146  new_path=`$CYGPATH -u "$path"`
30147
30148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30151  # "foo.exe" is OK but "foo" is an error.
30152  #
30153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30154  # It is also a way to make sure we got the proper file name for the real test later on.
30155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30156  if test "x$test_shortpath" = x; then
30157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30159    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30160  fi
30161
30162  # Call helper function which possibly converts this using DOS-style short mode.
30163  # If so, the updated path is stored in $new_path.
30164
30165  input_path="$new_path"
30166  # Check if we need to convert this using DOS-style short mode. If the path
30167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30168  # take no chances and rewrite it.
30169  # Note: m4 eats our [], so we need to use [ and ] instead.
30170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30171  if test "x$has_forbidden_chars" != x; then
30172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30176      # Going to short mode and back again did indeed matter. Since short mode is
30177      # case insensitive, let's make it lowercase to improve readability.
30178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30179      # Now convert it back to Unix-style (cygpath)
30180      input_path=`$CYGPATH -u "$shortmode_path"`
30181      new_path="$input_path"
30182    fi
30183  fi
30184
30185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30186  if test "x$test_cygdrive_prefix" = x; then
30187    # As a simple fix, exclude /usr/bin since it's not a real path.
30188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30190      # a path prefixed by /cygdrive for fixpath to work.
30191      new_path="$CYGWIN_ROOT_PATH$input_path"
30192    fi
30193  fi
30194
30195
30196  if test "x$path" != "x$new_path"; then
30197    BOOT_JDK="$new_path"
30198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30200  fi
30201
30202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30203
30204  path="$BOOT_JDK"
30205  has_colon=`$ECHO $path | $GREP ^.:`
30206  new_path="$path"
30207  if test "x$has_colon" = x; then
30208    # Not in mixed or Windows style, start by that.
30209    new_path=`cmd //c echo $path`
30210  fi
30211
30212
30213  input_path="$new_path"
30214  # Check if we need to convert this using DOS-style short mode. If the path
30215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30216  # take no chances and rewrite it.
30217  # Note: m4 eats our [], so we need to use [ and ] instead.
30218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30219  if test "x$has_forbidden_chars" != x; then
30220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30222  fi
30223
30224
30225  windows_path="$new_path"
30226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30227    unix_path=`$CYGPATH -u "$windows_path"`
30228    new_path="$unix_path"
30229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30231    new_path="$unix_path"
30232  fi
30233
30234  if test "x$path" != "x$new_path"; then
30235    BOOT_JDK="$new_path"
30236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30237$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30238  fi
30239
30240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30242
30243    else
30244      # We're on a unix platform. Hooray! :)
30245      path="$BOOT_JDK"
30246      has_space=`$ECHO "$path" | $GREP " "`
30247      if test "x$has_space" != x; then
30248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30251      fi
30252
30253      # Use eval to expand a potential ~
30254      eval path="$path"
30255      if test ! -f "$path" && test ! -d "$path"; then
30256        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30257      fi
30258
30259      if test -d "$path"; then
30260        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30261      else
30262        dir="`$DIRNAME "$path"`"
30263        base="`$BASENAME "$path"`"
30264        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30265      fi
30266    fi
30267  fi
30268
30269            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30270$as_echo_n "checking for Boot JDK... " >&6; }
30271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30272$as_echo "$BOOT_JDK" >&6; }
30273            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30274$as_echo_n "checking Boot JDK version... " >&6; }
30275            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30277$as_echo "$BOOT_JDK_VERSION" >&6; }
30278          fi # end check jdk version
30279        fi # end check javac
30280      fi # end check java
30281    fi # end check boot jdk found
30282  fi
30283
30284  fi
30285
30286
30287    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30288    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30289      # Do we have a bin/java?
30290      if test ! -x "$BOOT_JDK/bin/java"; then
30291        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30293        BOOT_JDK_FOUND=no
30294      else
30295        # Do we have a bin/javac?
30296        if test ! -x "$BOOT_JDK/bin/javac"; then
30297          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30299          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30300$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30301          BOOT_JDK_FOUND=no
30302        else
30303          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30304          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30305
30306          # Extra M4 quote needed to protect [] in grep expression.
30307          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30308          if test "x$FOUND_CORRECT_VERSION" = x; then
30309            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30311            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30312$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30313            BOOT_JDK_FOUND=no
30314          else
30315            # We're done! :-)
30316            BOOT_JDK_FOUND=yes
30317
30318  # Only process if variable expands to non-empty
30319
30320  if test "x$BOOT_JDK" != x; then
30321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30322
30323  # Input might be given as Windows format, start by converting to
30324  # unix format.
30325  path="$BOOT_JDK"
30326  new_path=`$CYGPATH -u "$path"`
30327
30328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30331  # "foo.exe" is OK but "foo" is an error.
30332  #
30333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30334  # It is also a way to make sure we got the proper file name for the real test later on.
30335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30336  if test "x$test_shortpath" = x; then
30337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30340  fi
30341
30342  # Call helper function which possibly converts this using DOS-style short mode.
30343  # If so, the updated path is stored in $new_path.
30344
30345  input_path="$new_path"
30346  # Check if we need to convert this using DOS-style short mode. If the path
30347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30348  # take no chances and rewrite it.
30349  # Note: m4 eats our [], so we need to use [ and ] instead.
30350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30351  if test "x$has_forbidden_chars" != x; then
30352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30356      # Going to short mode and back again did indeed matter. Since short mode is
30357      # case insensitive, let's make it lowercase to improve readability.
30358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30359      # Now convert it back to Unix-style (cygpath)
30360      input_path=`$CYGPATH -u "$shortmode_path"`
30361      new_path="$input_path"
30362    fi
30363  fi
30364
30365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30366  if test "x$test_cygdrive_prefix" = x; then
30367    # As a simple fix, exclude /usr/bin since it's not a real path.
30368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30370      # a path prefixed by /cygdrive for fixpath to work.
30371      new_path="$CYGWIN_ROOT_PATH$input_path"
30372    fi
30373  fi
30374
30375
30376  if test "x$path" != "x$new_path"; then
30377    BOOT_JDK="$new_path"
30378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30380  fi
30381
30382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30383
30384  path="$BOOT_JDK"
30385  has_colon=`$ECHO $path | $GREP ^.:`
30386  new_path="$path"
30387  if test "x$has_colon" = x; then
30388    # Not in mixed or Windows style, start by that.
30389    new_path=`cmd //c echo $path`
30390  fi
30391
30392
30393  input_path="$new_path"
30394  # Check if we need to convert this using DOS-style short mode. If the path
30395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30396  # take no chances and rewrite it.
30397  # Note: m4 eats our [], so we need to use [ and ] instead.
30398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30399  if test "x$has_forbidden_chars" != x; then
30400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30402  fi
30403
30404
30405  windows_path="$new_path"
30406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30407    unix_path=`$CYGPATH -u "$windows_path"`
30408    new_path="$unix_path"
30409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30411    new_path="$unix_path"
30412  fi
30413
30414  if test "x$path" != "x$new_path"; then
30415    BOOT_JDK="$new_path"
30416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30418  fi
30419
30420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30422
30423    else
30424      # We're on a unix platform. Hooray! :)
30425      path="$BOOT_JDK"
30426      has_space=`$ECHO "$path" | $GREP " "`
30427      if test "x$has_space" != x; then
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30431      fi
30432
30433      # Use eval to expand a potential ~
30434      eval path="$path"
30435      if test ! -f "$path" && test ! -d "$path"; then
30436        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30437      fi
30438
30439      if test -d "$path"; then
30440        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30441      else
30442        dir="`$DIRNAME "$path"`"
30443        base="`$BASENAME "$path"`"
30444        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30445      fi
30446    fi
30447  fi
30448
30449            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30450$as_echo_n "checking for Boot JDK... " >&6; }
30451            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30452$as_echo "$BOOT_JDK" >&6; }
30453            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30454$as_echo_n "checking Boot JDK version... " >&6; }
30455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30457$as_echo "$BOOT_JDK_VERSION" >&6; }
30458          fi # end check jdk version
30459        fi # end check javac
30460      fi # end check java
30461    fi # end check boot jdk found
30462  fi
30463
30464
30465  # If we haven't found anything yet, we've truly lost. Give up.
30466  if test "x$BOOT_JDK_FOUND" = xno; then
30467
30468  # Print a helpful message on how to acquire the necessary build dependency.
30469  # openjdk is the help tag: freetype, cups, alsa etc
30470  MISSING_DEPENDENCY=openjdk
30471
30472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30473    cygwin_help $MISSING_DEPENDENCY
30474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30475    msys_help $MISSING_DEPENDENCY
30476  else
30477    PKGHANDLER_COMMAND=
30478
30479    case $PKGHANDLER in
30480      apt-get)
30481        apt_help     $MISSING_DEPENDENCY ;;
30482      yum)
30483        yum_help     $MISSING_DEPENDENCY ;;
30484      brew)
30485        brew_help    $MISSING_DEPENDENCY ;;
30486      port)
30487        port_help    $MISSING_DEPENDENCY ;;
30488      pkgutil)
30489        pkgutil_help $MISSING_DEPENDENCY ;;
30490      pkgadd)
30491        pkgadd_help  $MISSING_DEPENDENCY ;;
30492    esac
30493
30494    if test "x$PKGHANDLER_COMMAND" != x; then
30495      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30496    fi
30497  fi
30498
30499    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30500$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30501    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30502$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30503    as_fn_error $? "Cannot continue" "$LINENO" 5
30504  fi
30505
30506
30507
30508  # Setup tools from the Boot JDK.
30509
30510  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30511
30512  # Publish this variable in the help.
30513
30514
30515  if [ -z "${JAVA+x}" ]; then
30516    # The variable is not set by user, try to locate tool using the code snippet
30517
30518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30519$as_echo_n "checking for java in Boot JDK... " >&6; }
30520      JAVA=$BOOT_JDK/bin/java
30521      if test ! -x $JAVA; then
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30523$as_echo "not found" >&6; }
30524        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30525$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30526        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30527      fi
30528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30529$as_echo "ok" >&6; }
30530
30531
30532  else
30533    # The variable is set, but is it from the command line or the environment?
30534
30535    # Try to remove the string !JAVA! from our list.
30536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30538      # If it failed, the variable was not from the command line. Ignore it,
30539      # but warn the user (except for BASH, which is always set by the calling BASH).
30540      if test "xJAVA" != xBASH; then
30541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30542$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30543      fi
30544      # Try to locate tool using the code snippet
30545
30546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30547$as_echo_n "checking for java in Boot JDK... " >&6; }
30548      JAVA=$BOOT_JDK/bin/java
30549      if test ! -x $JAVA; then
30550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30551$as_echo "not found" >&6; }
30552        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30553$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30554        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30555      fi
30556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30557$as_echo "ok" >&6; }
30558
30559
30560    else
30561      # If it succeeded, then it was overridden by the user. We will use it
30562      # for the tool.
30563
30564      # First remove it from the list of overridden variables, so we can test
30565      # for unknown variables in the end.
30566      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30567
30568      # Check if we try to supply an empty value
30569      if test "x$JAVA" = x; then
30570        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30571$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30573$as_echo_n "checking for JAVA... " >&6; }
30574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30575$as_echo "disabled" >&6; }
30576      else
30577        # Check if the provided tool contains a complete path.
30578        tool_specified="$JAVA"
30579        tool_basename="${tool_specified##*/}"
30580        if test "x$tool_basename" = "x$tool_specified"; then
30581          # A command without a complete path is provided, search $PATH.
30582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30583$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30584          # Extract the first word of "$tool_basename", so it can be a program name with args.
30585set dummy $tool_basename; ac_word=$2
30586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30587$as_echo_n "checking for $ac_word... " >&6; }
30588if ${ac_cv_path_JAVA+:} false; then :
30589  $as_echo_n "(cached) " >&6
30590else
30591  case $JAVA in
30592  [\\/]* | ?:[\\/]*)
30593  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30594  ;;
30595  *)
30596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30597for as_dir in $PATH
30598do
30599  IFS=$as_save_IFS
30600  test -z "$as_dir" && as_dir=.
30601    for ac_exec_ext in '' $ac_executable_extensions; do
30602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30603    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30605    break 2
30606  fi
30607done
30608  done
30609IFS=$as_save_IFS
30610
30611  ;;
30612esac
30613fi
30614JAVA=$ac_cv_path_JAVA
30615if test -n "$JAVA"; then
30616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30617$as_echo "$JAVA" >&6; }
30618else
30619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30620$as_echo "no" >&6; }
30621fi
30622
30623
30624          if test "x$JAVA" = x; then
30625            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30626          fi
30627        else
30628          # Otherwise we believe it is a complete path. Use it as it is.
30629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30630$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30631          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30632$as_echo_n "checking for JAVA... " >&6; }
30633          if test ! -x "$tool_specified"; then
30634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30635$as_echo "not found" >&6; }
30636            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30637          fi
30638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30639$as_echo "$tool_specified" >&6; }
30640        fi
30641      fi
30642    fi
30643
30644  fi
30645
30646
30647
30648  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30649
30650  # Publish this variable in the help.
30651
30652
30653  if [ -z "${JAVAC+x}" ]; then
30654    # The variable is not set by user, try to locate tool using the code snippet
30655
30656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30657$as_echo_n "checking for javac in Boot JDK... " >&6; }
30658      JAVAC=$BOOT_JDK/bin/javac
30659      if test ! -x $JAVAC; then
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30661$as_echo "not found" >&6; }
30662        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30663$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30664        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30665      fi
30666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30667$as_echo "ok" >&6; }
30668
30669
30670  else
30671    # The variable is set, but is it from the command line or the environment?
30672
30673    # Try to remove the string !JAVAC! from our list.
30674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30676      # If it failed, the variable was not from the command line. Ignore it,
30677      # but warn the user (except for BASH, which is always set by the calling BASH).
30678      if test "xJAVAC" != xBASH; then
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30680$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30681      fi
30682      # Try to locate tool using the code snippet
30683
30684      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30685$as_echo_n "checking for javac in Boot JDK... " >&6; }
30686      JAVAC=$BOOT_JDK/bin/javac
30687      if test ! -x $JAVAC; then
30688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30689$as_echo "not found" >&6; }
30690        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30691$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30692        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30693      fi
30694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30695$as_echo "ok" >&6; }
30696
30697
30698    else
30699      # If it succeeded, then it was overridden by the user. We will use it
30700      # for the tool.
30701
30702      # First remove it from the list of overridden variables, so we can test
30703      # for unknown variables in the end.
30704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30705
30706      # Check if we try to supply an empty value
30707      if test "x$JAVAC" = x; then
30708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30709$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30711$as_echo_n "checking for JAVAC... " >&6; }
30712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30713$as_echo "disabled" >&6; }
30714      else
30715        # Check if the provided tool contains a complete path.
30716        tool_specified="$JAVAC"
30717        tool_basename="${tool_specified##*/}"
30718        if test "x$tool_basename" = "x$tool_specified"; then
30719          # A command without a complete path is provided, search $PATH.
30720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30721$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30722          # Extract the first word of "$tool_basename", so it can be a program name with args.
30723set dummy $tool_basename; ac_word=$2
30724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30725$as_echo_n "checking for $ac_word... " >&6; }
30726if ${ac_cv_path_JAVAC+:} false; then :
30727  $as_echo_n "(cached) " >&6
30728else
30729  case $JAVAC in
30730  [\\/]* | ?:[\\/]*)
30731  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30732  ;;
30733  *)
30734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30735for as_dir in $PATH
30736do
30737  IFS=$as_save_IFS
30738  test -z "$as_dir" && as_dir=.
30739    for ac_exec_ext in '' $ac_executable_extensions; do
30740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30741    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30743    break 2
30744  fi
30745done
30746  done
30747IFS=$as_save_IFS
30748
30749  ;;
30750esac
30751fi
30752JAVAC=$ac_cv_path_JAVAC
30753if test -n "$JAVAC"; then
30754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30755$as_echo "$JAVAC" >&6; }
30756else
30757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30758$as_echo "no" >&6; }
30759fi
30760
30761
30762          if test "x$JAVAC" = x; then
30763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30764          fi
30765        else
30766          # Otherwise we believe it is a complete path. Use it as it is.
30767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30768$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30770$as_echo_n "checking for JAVAC... " >&6; }
30771          if test ! -x "$tool_specified"; then
30772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30773$as_echo "not found" >&6; }
30774            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30775          fi
30776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30777$as_echo "$tool_specified" >&6; }
30778        fi
30779      fi
30780    fi
30781
30782  fi
30783
30784
30785
30786  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30787
30788  # Publish this variable in the help.
30789
30790
30791  if [ -z "${JAVAH+x}" ]; then
30792    # The variable is not set by user, try to locate tool using the code snippet
30793
30794      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30795$as_echo_n "checking for javah in Boot JDK... " >&6; }
30796      JAVAH=$BOOT_JDK/bin/javah
30797      if test ! -x $JAVAH; then
30798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30799$as_echo "not found" >&6; }
30800        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30801$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30802        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30803      fi
30804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30805$as_echo "ok" >&6; }
30806
30807
30808  else
30809    # The variable is set, but is it from the command line or the environment?
30810
30811    # Try to remove the string !JAVAH! from our list.
30812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30814      # If it failed, the variable was not from the command line. Ignore it,
30815      # but warn the user (except for BASH, which is always set by the calling BASH).
30816      if test "xJAVAH" != xBASH; then
30817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30818$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30819      fi
30820      # Try to locate tool using the code snippet
30821
30822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30823$as_echo_n "checking for javah in Boot JDK... " >&6; }
30824      JAVAH=$BOOT_JDK/bin/javah
30825      if test ! -x $JAVAH; then
30826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30827$as_echo "not found" >&6; }
30828        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30829$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30830        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30831      fi
30832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30833$as_echo "ok" >&6; }
30834
30835
30836    else
30837      # If it succeeded, then it was overridden by the user. We will use it
30838      # for the tool.
30839
30840      # First remove it from the list of overridden variables, so we can test
30841      # for unknown variables in the end.
30842      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30843
30844      # Check if we try to supply an empty value
30845      if test "x$JAVAH" = x; then
30846        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30847$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30849$as_echo_n "checking for JAVAH... " >&6; }
30850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30851$as_echo "disabled" >&6; }
30852      else
30853        # Check if the provided tool contains a complete path.
30854        tool_specified="$JAVAH"
30855        tool_basename="${tool_specified##*/}"
30856        if test "x$tool_basename" = "x$tool_specified"; then
30857          # A command without a complete path is provided, search $PATH.
30858          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30859$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30860          # Extract the first word of "$tool_basename", so it can be a program name with args.
30861set dummy $tool_basename; ac_word=$2
30862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30863$as_echo_n "checking for $ac_word... " >&6; }
30864if ${ac_cv_path_JAVAH+:} false; then :
30865  $as_echo_n "(cached) " >&6
30866else
30867  case $JAVAH in
30868  [\\/]* | ?:[\\/]*)
30869  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30870  ;;
30871  *)
30872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30873for as_dir in $PATH
30874do
30875  IFS=$as_save_IFS
30876  test -z "$as_dir" && as_dir=.
30877    for ac_exec_ext in '' $ac_executable_extensions; do
30878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30879    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30881    break 2
30882  fi
30883done
30884  done
30885IFS=$as_save_IFS
30886
30887  ;;
30888esac
30889fi
30890JAVAH=$ac_cv_path_JAVAH
30891if test -n "$JAVAH"; then
30892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30893$as_echo "$JAVAH" >&6; }
30894else
30895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30896$as_echo "no" >&6; }
30897fi
30898
30899
30900          if test "x$JAVAH" = x; then
30901            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30902          fi
30903        else
30904          # Otherwise we believe it is a complete path. Use it as it is.
30905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30906$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30907          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30908$as_echo_n "checking for JAVAH... " >&6; }
30909          if test ! -x "$tool_specified"; then
30910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30911$as_echo "not found" >&6; }
30912            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30913          fi
30914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30915$as_echo "$tool_specified" >&6; }
30916        fi
30917      fi
30918    fi
30919
30920  fi
30921
30922
30923
30924  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30925
30926  # Publish this variable in the help.
30927
30928
30929  if [ -z "${JAR+x}" ]; then
30930    # The variable is not set by user, try to locate tool using the code snippet
30931
30932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30933$as_echo_n "checking for jar in Boot JDK... " >&6; }
30934      JAR=$BOOT_JDK/bin/jar
30935      if test ! -x $JAR; then
30936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30937$as_echo "not found" >&6; }
30938        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30939$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30940        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30941      fi
30942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30943$as_echo "ok" >&6; }
30944
30945
30946  else
30947    # The variable is set, but is it from the command line or the environment?
30948
30949    # Try to remove the string !JAR! from our list.
30950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30952      # If it failed, the variable was not from the command line. Ignore it,
30953      # but warn the user (except for BASH, which is always set by the calling BASH).
30954      if test "xJAR" != xBASH; then
30955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30956$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30957      fi
30958      # Try to locate tool using the code snippet
30959
30960      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30961$as_echo_n "checking for jar in Boot JDK... " >&6; }
30962      JAR=$BOOT_JDK/bin/jar
30963      if test ! -x $JAR; then
30964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30965$as_echo "not found" >&6; }
30966        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30967$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30968        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30969      fi
30970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30971$as_echo "ok" >&6; }
30972
30973
30974    else
30975      # If it succeeded, then it was overridden by the user. We will use it
30976      # for the tool.
30977
30978      # First remove it from the list of overridden variables, so we can test
30979      # for unknown variables in the end.
30980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30981
30982      # Check if we try to supply an empty value
30983      if test "x$JAR" = x; then
30984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30985$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30987$as_echo_n "checking for JAR... " >&6; }
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30989$as_echo "disabled" >&6; }
30990      else
30991        # Check if the provided tool contains a complete path.
30992        tool_specified="$JAR"
30993        tool_basename="${tool_specified##*/}"
30994        if test "x$tool_basename" = "x$tool_specified"; then
30995          # A command without a complete path is provided, search $PATH.
30996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30997$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30998          # Extract the first word of "$tool_basename", so it can be a program name with args.
30999set dummy $tool_basename; ac_word=$2
31000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31001$as_echo_n "checking for $ac_word... " >&6; }
31002if ${ac_cv_path_JAR+:} false; then :
31003  $as_echo_n "(cached) " >&6
31004else
31005  case $JAR in
31006  [\\/]* | ?:[\\/]*)
31007  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31008  ;;
31009  *)
31010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31011for as_dir in $PATH
31012do
31013  IFS=$as_save_IFS
31014  test -z "$as_dir" && as_dir=.
31015    for ac_exec_ext in '' $ac_executable_extensions; do
31016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31017    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31019    break 2
31020  fi
31021done
31022  done
31023IFS=$as_save_IFS
31024
31025  ;;
31026esac
31027fi
31028JAR=$ac_cv_path_JAR
31029if test -n "$JAR"; then
31030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31031$as_echo "$JAR" >&6; }
31032else
31033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31034$as_echo "no" >&6; }
31035fi
31036
31037
31038          if test "x$JAR" = x; then
31039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31040          fi
31041        else
31042          # Otherwise we believe it is a complete path. Use it as it is.
31043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31044$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31046$as_echo_n "checking for JAR... " >&6; }
31047          if test ! -x "$tool_specified"; then
31048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31049$as_echo "not found" >&6; }
31050            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31051          fi
31052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31053$as_echo "$tool_specified" >&6; }
31054        fi
31055      fi
31056    fi
31057
31058  fi
31059
31060
31061
31062  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31063
31064  # Publish this variable in the help.
31065
31066
31067  if [ -z "${JARSIGNER+x}" ]; then
31068    # The variable is not set by user, try to locate tool using the code snippet
31069
31070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31071$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31072      JARSIGNER=$BOOT_JDK/bin/jarsigner
31073      if test ! -x $JARSIGNER; then
31074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31075$as_echo "not found" >&6; }
31076        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31077$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31078        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31079      fi
31080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31081$as_echo "ok" >&6; }
31082
31083
31084  else
31085    # The variable is set, but is it from the command line or the environment?
31086
31087    # Try to remove the string !JARSIGNER! from our list.
31088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31090      # If it failed, the variable was not from the command line. Ignore it,
31091      # but warn the user (except for BASH, which is always set by the calling BASH).
31092      if test "xJARSIGNER" != xBASH; then
31093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31094$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31095      fi
31096      # Try to locate tool using the code snippet
31097
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31099$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31100      JARSIGNER=$BOOT_JDK/bin/jarsigner
31101      if test ! -x $JARSIGNER; then
31102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31103$as_echo "not found" >&6; }
31104        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31105$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31106        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31107      fi
31108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31109$as_echo "ok" >&6; }
31110
31111
31112    else
31113      # If it succeeded, then it was overridden by the user. We will use it
31114      # for the tool.
31115
31116      # First remove it from the list of overridden variables, so we can test
31117      # for unknown variables in the end.
31118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31119
31120      # Check if we try to supply an empty value
31121      if test "x$JARSIGNER" = x; then
31122        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31123$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31125$as_echo_n "checking for JARSIGNER... " >&6; }
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31127$as_echo "disabled" >&6; }
31128      else
31129        # Check if the provided tool contains a complete path.
31130        tool_specified="$JARSIGNER"
31131        tool_basename="${tool_specified##*/}"
31132        if test "x$tool_basename" = "x$tool_specified"; then
31133          # A command without a complete path is provided, search $PATH.
31134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31135$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31136          # Extract the first word of "$tool_basename", so it can be a program name with args.
31137set dummy $tool_basename; ac_word=$2
31138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31139$as_echo_n "checking for $ac_word... " >&6; }
31140if ${ac_cv_path_JARSIGNER+:} false; then :
31141  $as_echo_n "(cached) " >&6
31142else
31143  case $JARSIGNER in
31144  [\\/]* | ?:[\\/]*)
31145  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31146  ;;
31147  *)
31148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31149for as_dir in $PATH
31150do
31151  IFS=$as_save_IFS
31152  test -z "$as_dir" && as_dir=.
31153    for ac_exec_ext in '' $ac_executable_extensions; do
31154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31155    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31157    break 2
31158  fi
31159done
31160  done
31161IFS=$as_save_IFS
31162
31163  ;;
31164esac
31165fi
31166JARSIGNER=$ac_cv_path_JARSIGNER
31167if test -n "$JARSIGNER"; then
31168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31169$as_echo "$JARSIGNER" >&6; }
31170else
31171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31172$as_echo "no" >&6; }
31173fi
31174
31175
31176          if test "x$JARSIGNER" = x; then
31177            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31178          fi
31179        else
31180          # Otherwise we believe it is a complete path. Use it as it is.
31181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31182$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31183          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31184$as_echo_n "checking for JARSIGNER... " >&6; }
31185          if test ! -x "$tool_specified"; then
31186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31187$as_echo "not found" >&6; }
31188            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31189          fi
31190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31191$as_echo "$tool_specified" >&6; }
31192        fi
31193      fi
31194    fi
31195
31196  fi
31197
31198
31199
31200  # Finally, set some other options...
31201
31202  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31203  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31204
31205
31206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31207$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31208  if "$JAVA" --list-modules > /dev/null 2>&1; then
31209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31210$as_echo "yes" >&6; }
31211    BOOT_JDK_MODULAR="true"
31212  else
31213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31214$as_echo "no" >&6; }
31215    BOOT_JDK_MODULAR="false"
31216  fi
31217
31218
31219
31220
31221  # Check if the boot jdk is 32 or 64 bit
31222  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31223    BOOT_JDK_BITS="64"
31224  else
31225    BOOT_JDK_BITS="32"
31226  fi
31227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31228$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31230$as_echo "$BOOT_JDK_BITS" >&6; }
31231
31232
31233
31234# Check whether --with-build-jdk was given.
31235if test "${with_build_jdk+set}" = set; then :
31236  withval=$with_build_jdk;
31237fi
31238
31239
31240  CREATE_BUILDJDK=false
31241  EXTERNAL_BUILDJDK=false
31242  BUILD_JDK_FOUND="no"
31243  if test "x$with_build_jdk" != "x"; then
31244
31245  if test "x$BUILD_JDK_FOUND" = xno; then
31246    # Execute the test
31247
31248       if test "x$with_build_jdk" != x; then
31249         BUILD_JDK=$with_build_jdk
31250         BUILD_JDK_FOUND=maybe
31251         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31252$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31253       fi
31254
31255    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31256    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31257      # Do we have a bin/java?
31258      if test ! -x "$BUILD_JDK/bin/java"; then
31259        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31260$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31261        BUILD_JDK_FOUND=no
31262      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31264$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31265        BUILD_JDK_FOUND=no
31266      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31267        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31268$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31269        BUILD_JDK_FOUND=no
31270      elif test ! -x "$BUILD_JDK/bin/javac"; then
31271        # Do we have a bin/javac?
31272        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31273$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31274        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31275$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31276        BUILD_JDK_FOUND=no
31277      else
31278        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31279        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31280
31281        # Extra M4 quote needed to protect [] in grep expression.
31282        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31283        if test "x$FOUND_CORRECT_VERSION" = x; then
31284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31285$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31286          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31287$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31288          BUILD_JDK_FOUND=no
31289        else
31290          # We're done!
31291          BUILD_JDK_FOUND=yes
31292
31293  # Only process if variable expands to non-empty
31294
31295  if test "x$BUILD_JDK" != x; then
31296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31297
31298  # Input might be given as Windows format, start by converting to
31299  # unix format.
31300  path="$BUILD_JDK"
31301  new_path=`$CYGPATH -u "$path"`
31302
31303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31306  # "foo.exe" is OK but "foo" is an error.
31307  #
31308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31309  # It is also a way to make sure we got the proper file name for the real test later on.
31310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31311  if test "x$test_shortpath" = x; then
31312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31313$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31314    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31315  fi
31316
31317  # Call helper function which possibly converts this using DOS-style short mode.
31318  # If so, the updated path is stored in $new_path.
31319
31320  input_path="$new_path"
31321  # Check if we need to convert this using DOS-style short mode. If the path
31322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31323  # take no chances and rewrite it.
31324  # Note: m4 eats our [], so we need to use [ and ] instead.
31325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31326  if test "x$has_forbidden_chars" != x; then
31327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31331      # Going to short mode and back again did indeed matter. Since short mode is
31332      # case insensitive, let's make it lowercase to improve readability.
31333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31334      # Now convert it back to Unix-style (cygpath)
31335      input_path=`$CYGPATH -u "$shortmode_path"`
31336      new_path="$input_path"
31337    fi
31338  fi
31339
31340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31341  if test "x$test_cygdrive_prefix" = x; then
31342    # As a simple fix, exclude /usr/bin since it's not a real path.
31343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31345      # a path prefixed by /cygdrive for fixpath to work.
31346      new_path="$CYGWIN_ROOT_PATH$input_path"
31347    fi
31348  fi
31349
31350
31351  if test "x$path" != "x$new_path"; then
31352    BUILD_JDK="$new_path"
31353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31354$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31355  fi
31356
31357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31358
31359  path="$BUILD_JDK"
31360  has_colon=`$ECHO $path | $GREP ^.:`
31361  new_path="$path"
31362  if test "x$has_colon" = x; then
31363    # Not in mixed or Windows style, start by that.
31364    new_path=`cmd //c echo $path`
31365  fi
31366
31367
31368  input_path="$new_path"
31369  # Check if we need to convert this using DOS-style short mode. If the path
31370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31371  # take no chances and rewrite it.
31372  # Note: m4 eats our [], so we need to use [ and ] instead.
31373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31374  if test "x$has_forbidden_chars" != x; then
31375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31377  fi
31378
31379
31380  windows_path="$new_path"
31381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31382    unix_path=`$CYGPATH -u "$windows_path"`
31383    new_path="$unix_path"
31384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31386    new_path="$unix_path"
31387  fi
31388
31389  if test "x$path" != "x$new_path"; then
31390    BUILD_JDK="$new_path"
31391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31392$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31393  fi
31394
31395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31397
31398    else
31399      # We're on a unix platform. Hooray! :)
31400      path="$BUILD_JDK"
31401      has_space=`$ECHO "$path" | $GREP " "`
31402      if test "x$has_space" != x; then
31403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31404$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31406      fi
31407
31408      # Use eval to expand a potential ~
31409      eval path="$path"
31410      if test ! -f "$path" && test ! -d "$path"; then
31411        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31412      fi
31413
31414      if test -d "$path"; then
31415        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31416      else
31417        dir="`$DIRNAME "$path"`"
31418        base="`$BASENAME "$path"`"
31419        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31420      fi
31421    fi
31422  fi
31423
31424          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31425$as_echo_n "checking for Build JDK... " >&6; }
31426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31427$as_echo "$BUILD_JDK" >&6; }
31428          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31429$as_echo_n "checking Build JDK version... " >&6; }
31430          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31432$as_echo "$BUILD_JDK_VERSION" >&6; }
31433        fi # end check jdk version
31434      fi # end check java
31435    fi # end check build jdk found
31436  fi
31437
31438    EXTERNAL_BUILDJDK=true
31439  else
31440    if test "x$COMPILE_TYPE" = "xcross"; then
31441      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31442      BUILD_JDK_FOUND=yes
31443      CREATE_BUILDJDK=true
31444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31445$as_echo_n "checking for Build JDK... " >&6; }
31446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31447$as_echo "yes, will build it for the host platform" >&6; }
31448    else
31449      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31450      BUILD_JDK_FOUND=yes
31451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31452$as_echo_n "checking for Build JDK... " >&6; }
31453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31454$as_echo "yes, will use output dir" >&6; }
31455    fi
31456  fi
31457
31458  JMOD="$BUILD_JDK/bin/jmod"
31459  JLINK="$BUILD_JDK/bin/jlink"
31460
31461
31462
31463  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31465$as_echo_n "checking for Build JDK... " >&6; }
31466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31467$as_echo "no" >&6; }
31468    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31469  fi
31470
31471
31472
31473
31474
31475
31476###############################################################################
31477#
31478# Configure the sources to use. We can add or override individual directories.
31479#
31480###############################################################################
31481
31482
31483  # Where are the sources.
31484  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31485  CORBA_TOPDIR="$SRC_ROOT/corba"
31486  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31487  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31488  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31489  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31490  JDK_TOPDIR="$SRC_ROOT/jdk"
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500  # This feature is no longer supported.
31501
31502
31503
31504# Check whether --with-add-source-root was given.
31505if test "${with_add_source_root+set}" = set; then :
31506  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
31507$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31508fi
31509
31510
31511
31512
31513# Check whether --with-override-source-root was given.
31514if test "${with_override_source_root+set}" = set; then :
31515  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
31516$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31517fi
31518
31519
31520
31521
31522# Check whether --with-adds-and-overrides was given.
31523if test "${with_adds_and_overrides+set}" = set; then :
31524  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
31525$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31526fi
31527
31528
31529
31530
31531# Check whether --with-override-langtools was given.
31532if test "${with_override_langtools+set}" = set; then :
31533  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31534$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31535fi
31536
31537
31538
31539
31540# Check whether --with-override-corba was given.
31541if test "${with_override_corba+set}" = set; then :
31542  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31543$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31544fi
31545
31546
31547
31548
31549# Check whether --with-override-jaxp was given.
31550if test "${with_override_jaxp+set}" = set; then :
31551  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31552$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31553fi
31554
31555
31556
31557
31558# Check whether --with-override-jaxws was given.
31559if test "${with_override_jaxws+set}" = set; then :
31560  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31561$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31562fi
31563
31564
31565
31566
31567# Check whether --with-override-hotspot was given.
31568if test "${with_override_hotspot+set}" = set; then :
31569  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31570$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31571fi
31572
31573
31574
31575
31576# Check whether --with-override-nashorn was given.
31577if test "${with_override_nashorn+set}" = set; then :
31578  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31579$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31580fi
31581
31582
31583
31584
31585# Check whether --with-override-jdk was given.
31586if test "${with_override_jdk+set}" = set; then :
31587  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31588$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31589fi
31590
31591
31592
31593
31594  BUILD_OUTPUT="$OUTPUT_ROOT"
31595
31596  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31597
31598
31599
31600# Check whether --with-import_hotspot was given.
31601if test "${with_import_hotspot+set}" = set; then :
31602  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31603$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31604fi
31605
31606
31607
31608
31609
31610
31611# Check whether --with-import-modules was given.
31612if test "${with_import_modules+set}" = set; then :
31613  withval=$with_import_modules;
31614fi
31615
31616
31617  if test "x$with_import_modules" != x \
31618      && test "x$with_import_modules" != "xno"; then
31619    if test -d "$with_import_modules"; then
31620      IMPORT_MODULES_TOPDIR="$with_import_modules"
31621
31622  # Only process if variable expands to non-empty
31623
31624  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31626
31627  # Input might be given as Windows format, start by converting to
31628  # unix format.
31629  path="$IMPORT_MODULES_TOPDIR"
31630  new_path=`$CYGPATH -u "$path"`
31631
31632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31635  # "foo.exe" is OK but "foo" is an error.
31636  #
31637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31638  # It is also a way to make sure we got the proper file name for the real test later on.
31639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31640  if test "x$test_shortpath" = x; then
31641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31642$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31643    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31644  fi
31645
31646  # Call helper function which possibly converts this using DOS-style short mode.
31647  # If so, the updated path is stored in $new_path.
31648
31649  input_path="$new_path"
31650  # Check if we need to convert this using DOS-style short mode. If the path
31651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31652  # take no chances and rewrite it.
31653  # Note: m4 eats our [], so we need to use [ and ] instead.
31654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31655  if test "x$has_forbidden_chars" != x; then
31656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31660      # Going to short mode and back again did indeed matter. Since short mode is
31661      # case insensitive, let's make it lowercase to improve readability.
31662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31663      # Now convert it back to Unix-style (cygpath)
31664      input_path=`$CYGPATH -u "$shortmode_path"`
31665      new_path="$input_path"
31666    fi
31667  fi
31668
31669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31670  if test "x$test_cygdrive_prefix" = x; then
31671    # As a simple fix, exclude /usr/bin since it's not a real path.
31672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31674      # a path prefixed by /cygdrive for fixpath to work.
31675      new_path="$CYGWIN_ROOT_PATH$input_path"
31676    fi
31677  fi
31678
31679
31680  if test "x$path" != "x$new_path"; then
31681    IMPORT_MODULES_TOPDIR="$new_path"
31682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31683$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31684  fi
31685
31686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31687
31688  path="$IMPORT_MODULES_TOPDIR"
31689  has_colon=`$ECHO $path | $GREP ^.:`
31690  new_path="$path"
31691  if test "x$has_colon" = x; then
31692    # Not in mixed or Windows style, start by that.
31693    new_path=`cmd //c echo $path`
31694  fi
31695
31696
31697  input_path="$new_path"
31698  # Check if we need to convert this using DOS-style short mode. If the path
31699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31700  # take no chances and rewrite it.
31701  # Note: m4 eats our [], so we need to use [ and ] instead.
31702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31703  if test "x$has_forbidden_chars" != x; then
31704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31706  fi
31707
31708
31709  windows_path="$new_path"
31710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31711    unix_path=`$CYGPATH -u "$windows_path"`
31712    new_path="$unix_path"
31713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31715    new_path="$unix_path"
31716  fi
31717
31718  if test "x$path" != "x$new_path"; then
31719    IMPORT_MODULES_TOPDIR="$new_path"
31720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31721$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31722  fi
31723
31724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31726
31727    else
31728      # We're on a unix platform. Hooray! :)
31729      path="$IMPORT_MODULES_TOPDIR"
31730      has_space=`$ECHO "$path" | $GREP " "`
31731      if test "x$has_space" != x; then
31732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31733$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31735      fi
31736
31737      # Use eval to expand a potential ~
31738      eval path="$path"
31739      if test ! -f "$path" && test ! -d "$path"; then
31740        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31741      fi
31742
31743      if test -d "$path"; then
31744        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31745      else
31746        dir="`$DIRNAME "$path"`"
31747        base="`$BASENAME "$path"`"
31748        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31749      fi
31750    fi
31751  fi
31752
31753    elif test -e "$with_import_modules"; then
31754      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31755      $RM -rf "$IMPORT_MODULES_TOPDIR"
31756      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31757      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31758        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31759      fi
31760    else
31761      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31762    fi
31763  fi
31764
31765  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31766    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31767  fi
31768  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31769    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31770  fi
31771  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31772    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31773  fi
31774  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31775    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31776  fi
31777  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31778    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31779  fi
31780  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31781    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31782  fi
31783  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31784    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31785  fi
31786  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31787    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31788  fi
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800###############################################################################
31801#
31802# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31803# native code.
31804#
31805###############################################################################
31806
31807# See if we are doing a complete static build or not
31808
31809  # Check whether --enable-static-build was given.
31810if test "${enable_static_build+set}" = set; then :
31811  enableval=$enable_static_build;
31812fi
31813
31814  STATIC_BUILD=false
31815  if test "x$enable_static_build" = "xyes"; then
31816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31817$as_echo_n "checking if static build is enabled... " >&6; }
31818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31819$as_echo "yes" >&6; }
31820    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31821      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31822    fi
31823    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31824    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31825    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31826    STATIC_BUILD=true
31827  elif test "x$enable_static_build" = "xno"; then
31828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31829$as_echo_n "checking if static build is enabled... " >&6; }
31830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31831$as_echo "no" >&6; }
31832  elif test "x$enable_static_build" != "x"; then
31833    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31834  fi
31835
31836
31837
31838
31839# First determine the toolchain type (compiler family)
31840
31841
31842# Check whether --with-toolchain-type was given.
31843if test "${with_toolchain_type+set}" = set; then :
31844  withval=$with_toolchain_type;
31845fi
31846
31847
31848  # Use indirect variable referencing
31849  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31850  VALID_TOOLCHAINS=${!toolchain_var_name}
31851
31852  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31853    if test -n "$XCODEBUILD"; then
31854      # On Mac OS X, default toolchain to clang after Xcode 5
31855      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31856      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31857      if test $? -ne 0; then
31858        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31859      fi
31860      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31861          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31862          $CUT -f 1 -d .`
31863      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31864$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31865      if test $XCODE_MAJOR_VERSION -ge 5; then
31866          DEFAULT_TOOLCHAIN="clang"
31867      else
31868          DEFAULT_TOOLCHAIN="gcc"
31869      fi
31870    else
31871      # If Xcode is not installed, but the command line tools are
31872      # then we can't run xcodebuild. On these systems we should
31873      # default to clang
31874      DEFAULT_TOOLCHAIN="clang"
31875    fi
31876  else
31877    # First toolchain type in the list is the default
31878    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31879  fi
31880
31881  if test "x$with_toolchain_type" = xlist; then
31882    # List all toolchains
31883    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31884$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31885    for toolchain in $VALID_TOOLCHAINS; do
31886      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31887      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31888      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31889    done
31890
31891    exit 0
31892  elif test "x$with_toolchain_type" != x; then
31893    # User override; check that it is valid
31894    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31895      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31896$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31897      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31898$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31899      as_fn_error $? "Cannot continue." "$LINENO" 5
31900    fi
31901    TOOLCHAIN_TYPE=$with_toolchain_type
31902  else
31903    # No flag given, use default
31904    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31905  fi
31906
31907
31908  TOOLCHAIN_CC_BINARY_clang="clang"
31909  TOOLCHAIN_CC_BINARY_gcc="gcc"
31910  TOOLCHAIN_CC_BINARY_microsoft="cl"
31911  TOOLCHAIN_CC_BINARY_solstudio="cc"
31912  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31913
31914  TOOLCHAIN_CXX_BINARY_clang="clang++"
31915  TOOLCHAIN_CXX_BINARY_gcc="g++"
31916  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31917  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31918  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31919
31920  # Use indirect variable referencing
31921  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31922  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31923  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31924  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31925  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31926  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31927  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31928  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31929
31930
31931  # Define filename patterns
31932  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31933    LIBRARY_PREFIX=
31934    SHARED_LIBRARY_SUFFIX='.dll'
31935    STATIC_LIBRARY_SUFFIX='.lib'
31936    SHARED_LIBRARY='$1.dll'
31937    STATIC_LIBRARY='$1.lib'
31938    OBJ_SUFFIX='.obj'
31939    EXE_SUFFIX='.exe'
31940  else
31941    LIBRARY_PREFIX=lib
31942    SHARED_LIBRARY_SUFFIX='.so'
31943    STATIC_LIBRARY_SUFFIX='.a'
31944    SHARED_LIBRARY='lib$1.so'
31945    STATIC_LIBRARY='lib$1.a'
31946    OBJ_SUFFIX='.o'
31947    EXE_SUFFIX=''
31948    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31949      # For full static builds, we're overloading the SHARED_LIBRARY
31950      # variables in order to limit the amount of changes required.
31951      # It would be better to remove SHARED and just use LIBRARY and
31952      # LIBRARY_SUFFIX for libraries that can be built either
31953      # shared or static and use STATIC_* for libraries that are
31954      # always built statically.
31955      if test "x$STATIC_BUILD" = xtrue; then
31956        SHARED_LIBRARY='lib$1.a'
31957        SHARED_LIBRARY_SUFFIX='.a'
31958      else
31959        SHARED_LIBRARY='lib$1.dylib'
31960        SHARED_LIBRARY_SUFFIX='.dylib'
31961      fi
31962    fi
31963  fi
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31975    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31976$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31977  else
31978    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31979$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31980  fi
31981
31982
31983# User supplied flags should be used when configure detects compilers
31984
31985  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31986    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31987$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31988  fi
31989
31990  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31991    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31992$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31993  fi
31994
31995  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31996    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31997$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31998  fi
31999
32000
32001# Check whether --with-extra-cflags was given.
32002if test "${with_extra_cflags+set}" = set; then :
32003  withval=$with_extra_cflags;
32004fi
32005
32006
32007
32008# Check whether --with-extra-cxxflags was given.
32009if test "${with_extra_cxxflags+set}" = set; then :
32010  withval=$with_extra_cxxflags;
32011fi
32012
32013
32014
32015# Check whether --with-extra-ldflags was given.
32016if test "${with_extra_ldflags+set}" = set; then :
32017  withval=$with_extra_ldflags;
32018fi
32019
32020
32021  EXTRA_CFLAGS="$with_extra_cflags"
32022  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32023  EXTRA_LDFLAGS="$with_extra_ldflags"
32024
32025
32026
32027
32028
32029  # The global CFLAGS and LDLAGS variables are used by configure tests and
32030  # should include the extra parameters
32031  CFLAGS="$EXTRA_CFLAGS"
32032  CXXFLAGS="$EXTRA_CXXFLAGS"
32033  LDFLAGS="$EXTRA_LDFLAGS"
32034  CPPFLAGS=""
32035
32036# The sysroot cflags are needed for configure to be able to run the compilers
32037
32038  if test "x$SYSROOT" != "x"; then
32039    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32040      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32041        # Solaris Studio does not have a concept of sysroot. Instead we must
32042        # make sure the default include and lib dirs are appended to each
32043        # compile and link command line. Must also add -I-xbuiltin to enable
32044        # inlining of system functions and intrinsics.
32045        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32046        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32047            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32048      fi
32049    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32050      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32051      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32052    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32053      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32054      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32055    fi
32056    # The global CFLAGS and LDFLAGS variables need these for configure to function
32057    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32058    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32059    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32060    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32061  fi
32062
32063  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32064    # We also need -iframework<path>/System/Library/Frameworks
32065    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32066    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32067    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32068    # set this here so it doesn't have to be peppered throughout the forest
32069    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32070    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32071  fi
32072
32073
32074
32075
32076
32077# Then detect the actual binaries needed
32078
32079  # FIXME: Is this needed?
32080  ac_ext=cpp
32081ac_cpp='$CXXCPP $CPPFLAGS'
32082ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32083ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32084ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32085
32086
32087  # Store the CFLAGS etc passed to the configure script.
32088  ORG_CFLAGS="$CFLAGS"
32089  ORG_CXXFLAGS="$CXXFLAGS"
32090
32091  # autoconf magic only relies on PATH, so update it if tools dir is specified
32092  OLD_PATH="$PATH"
32093
32094  # On Windows, we need to detect the visual studio installation first.
32095  # This will change the PATH, but we need to keep that new PATH even
32096  # after toolchain detection is done, since the compiler (on x86) uses
32097  # it for DLL resolution in runtime.
32098  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32099      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32100
32101  # Store path to cygwin link.exe to help excluding it when searching for
32102  # VS linker. This must be done before changing the PATH when looking for VS.
32103  # Extract the first word of "link", so it can be a program name with args.
32104set dummy link; ac_word=$2
32105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32106$as_echo_n "checking for $ac_word... " >&6; }
32107if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32108  $as_echo_n "(cached) " >&6
32109else
32110  case $CYGWIN_LINK in
32111  [\\/]* | ?:[\\/]*)
32112  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32113  ;;
32114  *)
32115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32116for as_dir in $PATH
32117do
32118  IFS=$as_save_IFS
32119  test -z "$as_dir" && as_dir=.
32120    for ac_exec_ext in '' $ac_executable_extensions; do
32121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32122    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32124    break 2
32125  fi
32126done
32127  done
32128IFS=$as_save_IFS
32129
32130  ;;
32131esac
32132fi
32133CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32134if test -n "$CYGWIN_LINK"; then
32135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32136$as_echo "$CYGWIN_LINK" >&6; }
32137else
32138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32139$as_echo "no" >&6; }
32140fi
32141
32142
32143  if test "x$CYGWIN_LINK" != x; then
32144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32145$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32146    "$CYGWIN_LINK" --version > /dev/null
32147    if test $? -eq 0 ; then
32148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32149$as_echo "yes" >&6; }
32150    else
32151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32152$as_echo "no" >&6; }
32153      # This might be the VS linker. Don't exclude it later on.
32154      CYGWIN_LINK=""
32155    fi
32156  fi
32157
32158  # First-hand choice is to locate and run the vsvars bat file.
32159
32160
32161# Check whether --with-toolchain-version was given.
32162if test "${with_toolchain_version+set}" = set; then :
32163  withval=$with_toolchain_version;
32164fi
32165
32166
32167  if test "x$with_toolchain_version" = xlist; then
32168    # List all toolchains
32169    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32170$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32171    for version in $VALID_VS_VERSIONS; do
32172      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32173      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32174    done
32175
32176    exit 0
32177  elif test "x$DEVKIT_VS_VERSION" != x; then
32178    VS_VERSION=$DEVKIT_VS_VERSION
32179    TOOLCHAIN_VERSION=$VS_VERSION
32180    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32181    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32182    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32183    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32184    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32185    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32186
32187    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32188    # can still be exported as INCLUDE for compiler invocations without
32189    # SYSROOT_CFLAGS
32190    OLDIFS="$IFS"
32191    IFS=";"
32192    for i in $DEVKIT_VS_INCLUDE; do
32193      ipath=$i
32194
32195  unix_path="$ipath"
32196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32197    windows_path=`$CYGPATH -m "$unix_path"`
32198    ipath="$windows_path"
32199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32200    windows_path=`cmd //c echo $unix_path`
32201    ipath="$windows_path"
32202  fi
32203
32204      VS_INCLUDE="$VS_INCLUDE;$ipath"
32205    done
32206    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32207    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32208    for i in $DEVKIT_VS_LIB; do
32209      libpath=$i
32210
32211  unix_path="$libpath"
32212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32213    windows_path=`$CYGPATH -m "$unix_path"`
32214    libpath="$windows_path"
32215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32216    windows_path=`cmd //c echo $unix_path`
32217    libpath="$windows_path"
32218  fi
32219
32220      VS_LIB="$VS_LIB;$libpath"
32221    done
32222    IFS="$OLDIFS"
32223
32224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32225$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32226
32227  elif test "x$with_toolchain_version" != x; then
32228    # User override; check that it is valid
32229    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32230      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32231$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32232      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32233$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32234      as_fn_error $? "Cannot continue." "$LINENO" 5
32235    fi
32236    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32237  else
32238    # No flag given, use default
32239    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32240  fi
32241
32242  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32243
32244  VS_VERSION="$VS_VERSION"
32245  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32246  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32247  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32248  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32249
32250  # When using --with-tools-dir, assume it points to the correct and default
32251  # version of Visual Studio or that --with-toolchain-version was also set.
32252  if test "x$with_tools_dir" != x; then
32253
32254  if test "x$VS_ENV_CMD" = x; then
32255    VS_VERSION="${VS_VERSION}"
32256    VS_BASE="$with_tools_dir/../.."
32257    METHOD="--with-tools-dir"
32258
32259    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32260      VCVARSFILE="vc/bin/vcvars32.bat"
32261    else
32262      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32263    fi
32264
32265
32266  windows_path="$VS_BASE"
32267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32268    unix_path=`$CYGPATH -u "$windows_path"`
32269    VS_BASE="$unix_path"
32270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32272    VS_BASE="$unix_path"
32273  fi
32274
32275    if test -d "$VS_BASE"; then
32276      if test -f "$VS_BASE/$VCVARSFILE"; then
32277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32278$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32279        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32280        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32281        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32282        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32283      else
32284        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32285$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32286        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32287$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32288      fi
32289    fi
32290  fi
32291
32292
32293  if test "x$VS_ENV_CMD" = x; then
32294    VS_VERSION="${VS_VERSION}"
32295    VS_BASE="$with_tools_dir/../../.."
32296    METHOD="--with-tools-dir"
32297
32298    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32299      VCVARSFILE="vc/bin/vcvars32.bat"
32300    else
32301      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32302    fi
32303
32304
32305  windows_path="$VS_BASE"
32306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32307    unix_path=`$CYGPATH -u "$windows_path"`
32308    VS_BASE="$unix_path"
32309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32311    VS_BASE="$unix_path"
32312  fi
32313
32314    if test -d "$VS_BASE"; then
32315      if test -f "$VS_BASE/$VCVARSFILE"; then
32316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32317$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32318        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32319        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32320        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32321        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32322      else
32323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32324$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32325        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32326$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32327      fi
32328    fi
32329  fi
32330
32331    if test "x$VS_ENV_CMD" = x; then
32332      # Having specified an argument which is incorrect will produce an instant failure;
32333      # we should not go on looking
32334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32335$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32336      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32337$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32338      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32339$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32340      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32341    fi
32342  fi
32343
32344  VS_ENV_CMD=""
32345  VS_ENV_ARGS=""
32346
32347  if test "x$VS_COMNTOOLS" != x; then
32348
32349  if test "x$VS_ENV_CMD" = x; then
32350    VS_VERSION="${VS_VERSION}"
32351    VS_BASE="$VS_COMNTOOLS/../.."
32352    METHOD="$VS_COMNTOOLS_VAR variable"
32353
32354    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32355      VCVARSFILE="vc/bin/vcvars32.bat"
32356    else
32357      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32358    fi
32359
32360
32361  windows_path="$VS_BASE"
32362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32363    unix_path=`$CYGPATH -u "$windows_path"`
32364    VS_BASE="$unix_path"
32365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32367    VS_BASE="$unix_path"
32368  fi
32369
32370    if test -d "$VS_BASE"; then
32371      if test -f "$VS_BASE/$VCVARSFILE"; then
32372        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32373$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32374        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32375        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32376        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32377        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32378      else
32379        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32380$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32381        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32382$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32383      fi
32384    fi
32385  fi
32386
32387  fi
32388  if test "x$PROGRAMFILES" != x; then
32389
32390  if test "x$VS_ENV_CMD" = x; then
32391    VS_VERSION="${VS_VERSION}"
32392    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32393    METHOD="well-known name"
32394
32395    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32396      VCVARSFILE="vc/bin/vcvars32.bat"
32397    else
32398      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32399    fi
32400
32401
32402  windows_path="$VS_BASE"
32403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32404    unix_path=`$CYGPATH -u "$windows_path"`
32405    VS_BASE="$unix_path"
32406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32408    VS_BASE="$unix_path"
32409  fi
32410
32411    if test -d "$VS_BASE"; then
32412      if test -f "$VS_BASE/$VCVARSFILE"; then
32413        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32414$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32415        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32416        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32417        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32418        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32419      else
32420        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32421$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32422        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32423$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32424      fi
32425    fi
32426  fi
32427
32428  fi
32429  # Work around the insanely named ProgramFiles(x86) env variable
32430  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32431  if test "x$PROGRAMFILES_X86" != x; then
32432
32433  if test "x$VS_ENV_CMD" = x; then
32434    VS_VERSION="${VS_VERSION}"
32435    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32436    METHOD="well-known name"
32437
32438    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32439      VCVARSFILE="vc/bin/vcvars32.bat"
32440    else
32441      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32442    fi
32443
32444
32445  windows_path="$VS_BASE"
32446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32447    unix_path=`$CYGPATH -u "$windows_path"`
32448    VS_BASE="$unix_path"
32449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32451    VS_BASE="$unix_path"
32452  fi
32453
32454    if test -d "$VS_BASE"; then
32455      if test -f "$VS_BASE/$VCVARSFILE"; then
32456        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32457$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32458        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32459        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32460        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32461        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32462      else
32463        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32464$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32465        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32466$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32467      fi
32468    fi
32469  fi
32470
32471  fi
32472
32473  if test "x$VS_ENV_CMD" = x; then
32474    VS_VERSION="${VS_VERSION}"
32475    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32476    METHOD="well-known name"
32477
32478    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32479      VCVARSFILE="vc/bin/vcvars32.bat"
32480    else
32481      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32482    fi
32483
32484
32485  windows_path="$VS_BASE"
32486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32487    unix_path=`$CYGPATH -u "$windows_path"`
32488    VS_BASE="$unix_path"
32489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32491    VS_BASE="$unix_path"
32492  fi
32493
32494    if test -d "$VS_BASE"; then
32495      if test -f "$VS_BASE/$VCVARSFILE"; then
32496        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32497$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32498        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32499        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32500        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32501        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32502      else
32503        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32504$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32505        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32506$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32507      fi
32508    fi
32509  fi
32510
32511
32512  if test "x$VS_ENV_CMD" = x; then
32513    VS_VERSION="${VS_VERSION}"
32514    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32515    METHOD="well-known name"
32516
32517    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32518      VCVARSFILE="vc/bin/vcvars32.bat"
32519    else
32520      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32521    fi
32522
32523
32524  windows_path="$VS_BASE"
32525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32526    unix_path=`$CYGPATH -u "$windows_path"`
32527    VS_BASE="$unix_path"
32528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32530    VS_BASE="$unix_path"
32531  fi
32532
32533    if test -d "$VS_BASE"; then
32534      if test -f "$VS_BASE/$VCVARSFILE"; then
32535        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32536$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32537        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32538        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32539        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32540        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32541      else
32542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32543$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32544        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32545$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32546      fi
32547    fi
32548  fi
32549
32550
32551  if test "x$SDK_INSTALL_DIR" != x; then
32552    if test "x$ProgramW6432" != x; then
32553
32554  if test "x$VS_ENV_CMD" = x; then
32555    VS_VERSION="${VS_VERSION}"
32556    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32557    METHOD="well-known name"
32558
32559  windows_path="$WIN_SDK_BASE"
32560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32561    unix_path=`$CYGPATH -u "$windows_path"`
32562    WIN_SDK_BASE="$unix_path"
32563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32565    WIN_SDK_BASE="$unix_path"
32566  fi
32567
32568    if test -d "$WIN_SDK_BASE"; then
32569      # There have been cases of partial or broken SDK installations. A missing
32570      # lib dir is not going to work.
32571      if test ! -d "$WIN_SDK_BASE/lib"; then
32572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32573$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32574        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32575$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32576      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32577        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32578$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32579        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32580        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32581          VS_ENV_ARGS="/x86"
32582        else
32583          VS_ENV_ARGS="/x64"
32584        fi
32585        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32586        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32587        # TODO: improve detection for other versions of SDK
32588        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32589      else
32590        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32591$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32592        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32593$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32594      fi
32595    fi
32596  fi
32597
32598    fi
32599    if test "x$PROGRAMW6432" != x; then
32600
32601  if test "x$VS_ENV_CMD" = x; then
32602    VS_VERSION="${VS_VERSION}"
32603    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32604    METHOD="well-known name"
32605
32606  windows_path="$WIN_SDK_BASE"
32607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32608    unix_path=`$CYGPATH -u "$windows_path"`
32609    WIN_SDK_BASE="$unix_path"
32610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32612    WIN_SDK_BASE="$unix_path"
32613  fi
32614
32615    if test -d "$WIN_SDK_BASE"; then
32616      # There have been cases of partial or broken SDK installations. A missing
32617      # lib dir is not going to work.
32618      if test ! -d "$WIN_SDK_BASE/lib"; then
32619        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32620$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32621        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32622$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32623      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32624        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32625$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32626        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32627        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32628          VS_ENV_ARGS="/x86"
32629        else
32630          VS_ENV_ARGS="/x64"
32631        fi
32632        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32633        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32634        # TODO: improve detection for other versions of SDK
32635        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32636      else
32637        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32638$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32639        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32640$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32641      fi
32642    fi
32643  fi
32644
32645    fi
32646    if test "x$PROGRAMFILES" != x; then
32647
32648  if test "x$VS_ENV_CMD" = x; then
32649    VS_VERSION="${VS_VERSION}"
32650    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32651    METHOD="well-known name"
32652
32653  windows_path="$WIN_SDK_BASE"
32654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32655    unix_path=`$CYGPATH -u "$windows_path"`
32656    WIN_SDK_BASE="$unix_path"
32657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32659    WIN_SDK_BASE="$unix_path"
32660  fi
32661
32662    if test -d "$WIN_SDK_BASE"; then
32663      # There have been cases of partial or broken SDK installations. A missing
32664      # lib dir is not going to work.
32665      if test ! -d "$WIN_SDK_BASE/lib"; then
32666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32667$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32668        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32669$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32670      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32672$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32673        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32674        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32675          VS_ENV_ARGS="/x86"
32676        else
32677          VS_ENV_ARGS="/x64"
32678        fi
32679        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32680        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32681        # TODO: improve detection for other versions of SDK
32682        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32683      else
32684        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32685$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32686        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32687$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32688      fi
32689    fi
32690  fi
32691
32692    fi
32693
32694  if test "x$VS_ENV_CMD" = x; then
32695    VS_VERSION="${VS_VERSION}"
32696    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32697    METHOD="well-known name"
32698
32699  windows_path="$WIN_SDK_BASE"
32700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32701    unix_path=`$CYGPATH -u "$windows_path"`
32702    WIN_SDK_BASE="$unix_path"
32703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32705    WIN_SDK_BASE="$unix_path"
32706  fi
32707
32708    if test -d "$WIN_SDK_BASE"; then
32709      # There have been cases of partial or broken SDK installations. A missing
32710      # lib dir is not going to work.
32711      if test ! -d "$WIN_SDK_BASE/lib"; then
32712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32713$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32714        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32715$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32716      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32717        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32718$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32719        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32720        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32721          VS_ENV_ARGS="/x86"
32722        else
32723          VS_ENV_ARGS="/x64"
32724        fi
32725        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32726        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32727        # TODO: improve detection for other versions of SDK
32728        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32729      else
32730        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32731$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32732        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32733$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32734      fi
32735    fi
32736  fi
32737
32738
32739  if test "x$VS_ENV_CMD" = x; then
32740    VS_VERSION="${VS_VERSION}"
32741    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32742    METHOD="well-known name"
32743
32744  windows_path="$WIN_SDK_BASE"
32745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32746    unix_path=`$CYGPATH -u "$windows_path"`
32747    WIN_SDK_BASE="$unix_path"
32748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32750    WIN_SDK_BASE="$unix_path"
32751  fi
32752
32753    if test -d "$WIN_SDK_BASE"; then
32754      # There have been cases of partial or broken SDK installations. A missing
32755      # lib dir is not going to work.
32756      if test ! -d "$WIN_SDK_BASE/lib"; then
32757        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32758$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32759        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32760$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32761      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32763$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32764        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32765        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32766          VS_ENV_ARGS="/x86"
32767        else
32768          VS_ENV_ARGS="/x64"
32769        fi
32770        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32771        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32772        # TODO: improve detection for other versions of SDK
32773        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32774      else
32775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32776$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32777        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32778$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32779      fi
32780    fi
32781  fi
32782
32783  fi
32784
32785    if test "x$VS_ENV_CMD" != x; then
32786      TOOLCHAIN_VERSION=$VS_VERSION
32787      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32788      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32789      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32790      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32791      # The rest of the variables are already evaled while probing
32792      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32793$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32794      break
32795    fi
32796  done
32797
32798
32799  # If we have a devkit, skip all of the below.
32800  if test "x$DEVKIT_VS_VERSION" = x; then
32801    if test "x$VS_ENV_CMD" != x; then
32802      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32803
32804  # Only process if variable expands to non-empty
32805
32806  if test "x$VS_ENV_CMD" != x; then
32807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32808
32809  # First separate the path from the arguments. This will split at the first
32810  # space.
32811  complete="$VS_ENV_CMD"
32812  path="${complete%% *}"
32813  tmp="$complete EOL"
32814  arguments="${tmp#* }"
32815
32816  # Input might be given as Windows format, start by converting to
32817  # unix format.
32818  new_path=`$CYGPATH -u "$path"`
32819
32820  # Now try to locate executable using which
32821  new_path=`$WHICH "$new_path" 2> /dev/null`
32822  # bat and cmd files are not always considered executable in cygwin causing which
32823  # to not find them
32824  if test "x$new_path" = x \
32825      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32826      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32827    new_path=`$CYGPATH -u "$path"`
32828  fi
32829  if test "x$new_path" = x; then
32830    # Oops. Which didn't find the executable.
32831    # The splitting of arguments from the executable at a space might have been incorrect,
32832    # since paths with space are more likely in Windows. Give it another try with the whole
32833    # argument.
32834    path="$complete"
32835    arguments="EOL"
32836    new_path=`$CYGPATH -u "$path"`
32837    new_path=`$WHICH "$new_path" 2> /dev/null`
32838    # bat and cmd files are not always considered executable in cygwin causing which
32839    # to not find them
32840    if test "x$new_path" = x \
32841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32843      new_path=`$CYGPATH -u "$path"`
32844    fi
32845    if test "x$new_path" = x; then
32846      # It's still not found. Now this is an unrecoverable error.
32847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32848$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32849      has_space=`$ECHO "$complete" | $GREP " "`
32850      if test "x$has_space" != x; then
32851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32853      fi
32854      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32855    fi
32856  fi
32857
32858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32861  # "foo.exe" is OK but "foo" is an error.
32862  #
32863  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32864  # It is also a way to make sure we got the proper file name for the real test later on.
32865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32866  if test "x$test_shortpath" = x; then
32867    # Short path failed, file does not exist as specified.
32868    # Try adding .exe or .cmd
32869    if test -f "${new_path}.exe"; then
32870      input_to_shortpath="${new_path}.exe"
32871    elif test -f "${new_path}.cmd"; then
32872      input_to_shortpath="${new_path}.cmd"
32873    else
32874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32875$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32876      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32877$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32878      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32879    fi
32880  else
32881    input_to_shortpath="$new_path"
32882  fi
32883
32884  # Call helper function which possibly converts this using DOS-style short mode.
32885  # If so, the updated path is stored in $new_path.
32886  new_path="$input_to_shortpath"
32887
32888  input_path="$input_to_shortpath"
32889  # Check if we need to convert this using DOS-style short mode. If the path
32890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32891  # take no chances and rewrite it.
32892  # Note: m4 eats our [], so we need to use [ and ] instead.
32893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32894  if test "x$has_forbidden_chars" != x; then
32895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32899      # Going to short mode and back again did indeed matter. Since short mode is
32900      # case insensitive, let's make it lowercase to improve readability.
32901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32902      # Now convert it back to Unix-style (cygpath)
32903      input_path=`$CYGPATH -u "$shortmode_path"`
32904      new_path="$input_path"
32905    fi
32906  fi
32907
32908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32909  if test "x$test_cygdrive_prefix" = x; then
32910    # As a simple fix, exclude /usr/bin since it's not a real path.
32911    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32913      # a path prefixed by /cygdrive for fixpath to work.
32914      new_path="$CYGWIN_ROOT_PATH$input_path"
32915    fi
32916  fi
32917
32918  # remove trailing .exe if any
32919  new_path="${new_path/%.exe/}"
32920
32921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32922
32923  # First separate the path from the arguments. This will split at the first
32924  # space.
32925  complete="$VS_ENV_CMD"
32926  path="${complete%% *}"
32927  tmp="$complete EOL"
32928  arguments="${tmp#* }"
32929
32930  # Input might be given as Windows format, start by converting to
32931  # unix format.
32932  new_path="$path"
32933
32934  windows_path="$new_path"
32935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32936    unix_path=`$CYGPATH -u "$windows_path"`
32937    new_path="$unix_path"
32938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32940    new_path="$unix_path"
32941  fi
32942
32943
32944  # Now try to locate executable using which
32945  new_path=`$WHICH "$new_path" 2> /dev/null`
32946
32947  if test "x$new_path" = x; then
32948    # Oops. Which didn't find the executable.
32949    # The splitting of arguments from the executable at a space might have been incorrect,
32950    # since paths with space are more likely in Windows. Give it another try with the whole
32951    # argument.
32952    path="$complete"
32953    arguments="EOL"
32954    new_path="$path"
32955
32956  windows_path="$new_path"
32957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32958    unix_path=`$CYGPATH -u "$windows_path"`
32959    new_path="$unix_path"
32960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32962    new_path="$unix_path"
32963  fi
32964
32965
32966    new_path=`$WHICH "$new_path" 2> /dev/null`
32967    # bat and cmd files are not always considered executable in MSYS causing which
32968    # to not find them
32969    if test "x$new_path" = x \
32970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32972      new_path="$path"
32973
32974  windows_path="$new_path"
32975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32976    unix_path=`$CYGPATH -u "$windows_path"`
32977    new_path="$unix_path"
32978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32980    new_path="$unix_path"
32981  fi
32982
32983    fi
32984
32985    if test "x$new_path" = x; then
32986      # It's still not found. Now this is an unrecoverable error.
32987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32988$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32989      has_space=`$ECHO "$complete" | $GREP " "`
32990      if test "x$has_space" != x; then
32991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32993      fi
32994      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32995    fi
32996  fi
32997
32998  # Now new_path has a complete unix path to the binary
32999  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33000    # Keep paths in /bin as-is, but remove trailing .exe if any
33001    new_path="${new_path/%.exe/}"
33002    # Do not save /bin paths to all_fixpath_prefixes!
33003  else
33004    # Not in mixed or Windows style, start by that.
33005    new_path=`cmd //c echo $new_path`
33006
33007  input_path="$new_path"
33008  # Check if we need to convert this using DOS-style short mode. If the path
33009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33010  # take no chances and rewrite it.
33011  # Note: m4 eats our [], so we need to use [ and ] instead.
33012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33013  if test "x$has_forbidden_chars" != x; then
33014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33016  fi
33017
33018    # Output is in $new_path
33019
33020  windows_path="$new_path"
33021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33022    unix_path=`$CYGPATH -u "$windows_path"`
33023    new_path="$unix_path"
33024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33026    new_path="$unix_path"
33027  fi
33028
33029    # remove trailing .exe if any
33030    new_path="${new_path/%.exe/}"
33031
33032    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33033    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33034  fi
33035
33036    else
33037      # We're on a unix platform. Hooray! :)
33038      # First separate the path from the arguments. This will split at the first
33039      # space.
33040      complete="$VS_ENV_CMD"
33041      path="${complete%% *}"
33042      tmp="$complete EOL"
33043      arguments="${tmp#* }"
33044
33045      # Cannot rely on the command "which" here since it doesn't always work.
33046      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33047      if test -z "$is_absolute_path"; then
33048        # Path to executable is not absolute. Find it.
33049        IFS_save="$IFS"
33050        IFS=:
33051        for p in $PATH; do
33052          if test -f "$p/$path" && test -x "$p/$path"; then
33053            new_path="$p/$path"
33054            break
33055          fi
33056        done
33057        IFS="$IFS_save"
33058      else
33059        # This is an absolute path, we can use it without further modifications.
33060        new_path="$path"
33061      fi
33062
33063      if test "x$new_path" = x; then
33064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33065$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33066        has_space=`$ECHO "$complete" | $GREP " "`
33067        if test "x$has_space" != x; then
33068          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33069$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33070        fi
33071        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33072      fi
33073    fi
33074
33075    # Now join together the path and the arguments once again
33076    if test "x$arguments" != xEOL; then
33077      new_complete="$new_path ${arguments% *}"
33078    else
33079      new_complete="$new_path"
33080    fi
33081
33082    if test "x$complete" != "x$new_complete"; then
33083      VS_ENV_CMD="$new_complete"
33084      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33085$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33086    fi
33087  fi
33088
33089
33090      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33091      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33092$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33093
33094      # We need to create a couple of temporary files.
33095      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33096      $MKDIR -p $VS_ENV_TMP_DIR
33097
33098      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33099      # Instead create a shell script which will set the relevant variables when run.
33100      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33101
33102  unix_path="$WINPATH_VS_ENV_CMD"
33103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33104    windows_path=`$CYGPATH -m "$unix_path"`
33105    WINPATH_VS_ENV_CMD="$windows_path"
33106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33107    windows_path=`cmd //c echo $unix_path`
33108    WINPATH_VS_ENV_CMD="$windows_path"
33109  fi
33110
33111      WINPATH_BASH="$BASH"
33112
33113  unix_path="$WINPATH_BASH"
33114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33115    windows_path=`$CYGPATH -m "$unix_path"`
33116    WINPATH_BASH="$windows_path"
33117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33118    windows_path=`cmd //c echo $unix_path`
33119    WINPATH_BASH="$windows_path"
33120  fi
33121
33122
33123      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33124      # script (executable by bash) that will setup the important variables.
33125      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33126      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33127      # This will end up something like:
33128      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33129      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33130      # These will end up something like:
33131      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33132      # The trailing space for everyone except PATH is no typo, but is needed due
33133      # to trailing \ in the Windows paths. These will be stripped later.
33134      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33135          >> $EXTRACT_VC_ENV_BAT_FILE
33136      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33137          >> $EXTRACT_VC_ENV_BAT_FILE
33138      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33139          >> $EXTRACT_VC_ENV_BAT_FILE
33140      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33141          >> $EXTRACT_VC_ENV_BAT_FILE
33142      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33143          >> $EXTRACT_VC_ENV_BAT_FILE
33144      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33145          >> $EXTRACT_VC_ENV_BAT_FILE
33146
33147      # Now execute the newly created bat file.
33148      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33149      # Change directory so we don't need to mess with Windows paths in redirects.
33150      cd $VS_ENV_TMP_DIR
33151      cmd /c extract-vs-env.bat | $CAT
33152      cd $CURDIR
33153
33154      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33156$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33157        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33158$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33159        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33160$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33161        as_fn_error $? "Cannot continue" "$LINENO" 5
33162      fi
33163
33164      # Now set all paths and other env variables. This will allow the rest of
33165      # the configure script to find and run the compiler in the proper way.
33166      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33167$as_echo "$as_me: Setting extracted environment variables" >&6;}
33168      . $VS_ENV_TMP_DIR/set-vs-env.sh
33169      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33170      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33171    else
33172      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33173      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33174$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33175    fi
33176  fi
33177
33178  # At this point, we should have correct variables in the environment, or we can't continue.
33179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33180$as_echo_n "checking for Visual Studio variables... " >&6; }
33181
33182  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33183      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33184    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33186$as_echo "present but broken" >&6; }
33187      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33188    else
33189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33190$as_echo "ok" >&6; }
33191      # Remove any trailing "\" ";" and " " from the variables.
33192      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33193      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33194      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33195      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33196      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33197      # Remove any paths containing # (typically F#) as that messes up make. This
33198      # is needed if visual studio was installed with F# support.
33199      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33200
33201
33202
33203
33204
33205      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33206      OLDIFS="$IFS"
33207      IFS=";"
33208      for i in $VS_INCLUDE; do
33209        ipath=$i
33210        # Only process non-empty elements
33211        if test "x$ipath" != x; then
33212          IFS="$OLDIFS"
33213          # Check that directory exists before calling fixup_path
33214          testpath=$ipath
33215
33216  windows_path="$testpath"
33217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33218    unix_path=`$CYGPATH -u "$windows_path"`
33219    testpath="$unix_path"
33220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33222    testpath="$unix_path"
33223  fi
33224
33225          if test -d "$testpath"; then
33226
33227  # Only process if variable expands to non-empty
33228
33229  if test "x$ipath" != x; then
33230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33231
33232  # Input might be given as Windows format, start by converting to
33233  # unix format.
33234  path="$ipath"
33235  new_path=`$CYGPATH -u "$path"`
33236
33237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33240  # "foo.exe" is OK but "foo" is an error.
33241  #
33242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33243  # It is also a way to make sure we got the proper file name for the real test later on.
33244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33245  if test "x$test_shortpath" = x; then
33246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33247$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33248    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33249  fi
33250
33251  # Call helper function which possibly converts this using DOS-style short mode.
33252  # If so, the updated path is stored in $new_path.
33253
33254  input_path="$new_path"
33255  # Check if we need to convert this using DOS-style short mode. If the path
33256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33257  # take no chances and rewrite it.
33258  # Note: m4 eats our [], so we need to use [ and ] instead.
33259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33260  if test "x$has_forbidden_chars" != x; then
33261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33265      # Going to short mode and back again did indeed matter. Since short mode is
33266      # case insensitive, let's make it lowercase to improve readability.
33267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33268      # Now convert it back to Unix-style (cygpath)
33269      input_path=`$CYGPATH -u "$shortmode_path"`
33270      new_path="$input_path"
33271    fi
33272  fi
33273
33274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33275  if test "x$test_cygdrive_prefix" = x; then
33276    # As a simple fix, exclude /usr/bin since it's not a real path.
33277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33279      # a path prefixed by /cygdrive for fixpath to work.
33280      new_path="$CYGWIN_ROOT_PATH$input_path"
33281    fi
33282  fi
33283
33284
33285  if test "x$path" != "x$new_path"; then
33286    ipath="$new_path"
33287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33288$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33289  fi
33290
33291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33292
33293  path="$ipath"
33294  has_colon=`$ECHO $path | $GREP ^.:`
33295  new_path="$path"
33296  if test "x$has_colon" = x; then
33297    # Not in mixed or Windows style, start by that.
33298    new_path=`cmd //c echo $path`
33299  fi
33300
33301
33302  input_path="$new_path"
33303  # Check if we need to convert this using DOS-style short mode. If the path
33304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33305  # take no chances and rewrite it.
33306  # Note: m4 eats our [], so we need to use [ and ] instead.
33307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33308  if test "x$has_forbidden_chars" != x; then
33309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33311  fi
33312
33313
33314  windows_path="$new_path"
33315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33316    unix_path=`$CYGPATH -u "$windows_path"`
33317    new_path="$unix_path"
33318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33320    new_path="$unix_path"
33321  fi
33322
33323  if test "x$path" != "x$new_path"; then
33324    ipath="$new_path"
33325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33326$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33327  fi
33328
33329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33331
33332    else
33333      # We're on a unix platform. Hooray! :)
33334      path="$ipath"
33335      has_space=`$ECHO "$path" | $GREP " "`
33336      if test "x$has_space" != x; then
33337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33338$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33340      fi
33341
33342      # Use eval to expand a potential ~
33343      eval path="$path"
33344      if test ! -f "$path" && test ! -d "$path"; then
33345        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33346      fi
33347
33348      if test -d "$path"; then
33349        ipath="`cd "$path"; $THEPWDCMD -L`"
33350      else
33351        dir="`$DIRNAME "$path"`"
33352        base="`$BASENAME "$path"`"
33353        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33354      fi
33355    fi
33356  fi
33357
33358            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33359          fi
33360          IFS=";"
33361        fi
33362      done
33363      # Convert VS_LIB into SYSROOT_LDFLAGS
33364      for i in $VS_LIB; do
33365        libpath=$i
33366        # Only process non-empty elements
33367        if test "x$libpath" != x; then
33368          IFS="$OLDIFS"
33369          # Check that directory exists before calling fixup_path
33370          testpath=$libpath
33371
33372  windows_path="$testpath"
33373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33374    unix_path=`$CYGPATH -u "$windows_path"`
33375    testpath="$unix_path"
33376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33378    testpath="$unix_path"
33379  fi
33380
33381          if test -d "$testpath"; then
33382
33383  # Only process if variable expands to non-empty
33384
33385  if test "x$libpath" != x; then
33386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33387
33388  # Input might be given as Windows format, start by converting to
33389  # unix format.
33390  path="$libpath"
33391  new_path=`$CYGPATH -u "$path"`
33392
33393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33396  # "foo.exe" is OK but "foo" is an error.
33397  #
33398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33399  # It is also a way to make sure we got the proper file name for the real test later on.
33400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33401  if test "x$test_shortpath" = x; then
33402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33403$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33404    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33405  fi
33406
33407  # Call helper function which possibly converts this using DOS-style short mode.
33408  # If so, the updated path is stored in $new_path.
33409
33410  input_path="$new_path"
33411  # Check if we need to convert this using DOS-style short mode. If the path
33412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33413  # take no chances and rewrite it.
33414  # Note: m4 eats our [], so we need to use [ and ] instead.
33415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33416  if test "x$has_forbidden_chars" != x; then
33417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33421      # Going to short mode and back again did indeed matter. Since short mode is
33422      # case insensitive, let's make it lowercase to improve readability.
33423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33424      # Now convert it back to Unix-style (cygpath)
33425      input_path=`$CYGPATH -u "$shortmode_path"`
33426      new_path="$input_path"
33427    fi
33428  fi
33429
33430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33431  if test "x$test_cygdrive_prefix" = x; then
33432    # As a simple fix, exclude /usr/bin since it's not a real path.
33433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33435      # a path prefixed by /cygdrive for fixpath to work.
33436      new_path="$CYGWIN_ROOT_PATH$input_path"
33437    fi
33438  fi
33439
33440
33441  if test "x$path" != "x$new_path"; then
33442    libpath="$new_path"
33443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33444$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33445  fi
33446
33447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33448
33449  path="$libpath"
33450  has_colon=`$ECHO $path | $GREP ^.:`
33451  new_path="$path"
33452  if test "x$has_colon" = x; then
33453    # Not in mixed or Windows style, start by that.
33454    new_path=`cmd //c echo $path`
33455  fi
33456
33457
33458  input_path="$new_path"
33459  # Check if we need to convert this using DOS-style short mode. If the path
33460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33461  # take no chances and rewrite it.
33462  # Note: m4 eats our [], so we need to use [ and ] instead.
33463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33464  if test "x$has_forbidden_chars" != x; then
33465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33467  fi
33468
33469
33470  windows_path="$new_path"
33471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33472    unix_path=`$CYGPATH -u "$windows_path"`
33473    new_path="$unix_path"
33474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33476    new_path="$unix_path"
33477  fi
33478
33479  if test "x$path" != "x$new_path"; then
33480    libpath="$new_path"
33481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33482$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33483  fi
33484
33485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33487
33488    else
33489      # We're on a unix platform. Hooray! :)
33490      path="$libpath"
33491      has_space=`$ECHO "$path" | $GREP " "`
33492      if test "x$has_space" != x; then
33493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33494$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33496      fi
33497
33498      # Use eval to expand a potential ~
33499      eval path="$path"
33500      if test ! -f "$path" && test ! -d "$path"; then
33501        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33502      fi
33503
33504      if test -d "$path"; then
33505        libpath="`cd "$path"; $THEPWDCMD -L`"
33506      else
33507        dir="`$DIRNAME "$path"`"
33508        base="`$BASENAME "$path"`"
33509        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33510      fi
33511    fi
33512  fi
33513
33514            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33515          fi
33516          IFS=";"
33517        fi
33518      done
33519      IFS="$OLDIFS"
33520    fi
33521  else
33522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33523$as_echo "not found" >&6; }
33524
33525    if test "x$VS_ENV_CMD" = x; then
33526      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33527$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33528      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33529$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33530    else
33531      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33532$as_echo "$as_me: Running the extraction script failed." >&6;}
33533    fi
33534    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33535$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33536    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33537$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33538    as_fn_error $? "Cannot continue" "$LINENO" 5
33539  fi
33540
33541    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33542    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33543    PATH="$VS_PATH"
33544    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33545    export INCLUDE="$VS_INCLUDE"
33546    export LIB="$VS_LIB"
33547  else
33548    if test "x$XCODE_VERSION_OUTPUT" != x; then
33549      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33550      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33551      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33552    else
33553      # Currently we do not define this for other toolchains. This might change as the need arise.
33554      TOOLCHAIN_VERSION=
33555    fi
33556  fi
33557
33558
33559  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33560  # override all other locations.
33561  if test "x$TOOLCHAIN_PATH" != x; then
33562    PATH=$TOOLCHAIN_PATH:$PATH
33563  fi
33564
33565
33566  #
33567  # Setup the compilers (CC and CXX)
33568  #
33569
33570  COMPILER_NAME=C
33571  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33572
33573  if test "x$CC" != x; then
33574    # User has supplied compiler name already, always let that override.
33575    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33576$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33577    if test "x`basename $CC`" = "x$CC"; then
33578      # A command without a complete path is provided, search $PATH.
33579
33580      for ac_prog in $CC
33581do
33582  # Extract the first word of "$ac_prog", so it can be a program name with args.
33583set dummy $ac_prog; ac_word=$2
33584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33585$as_echo_n "checking for $ac_word... " >&6; }
33586if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33587  $as_echo_n "(cached) " >&6
33588else
33589  case $POTENTIAL_CC in
33590  [\\/]* | ?:[\\/]*)
33591  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33592  ;;
33593  *)
33594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33595for as_dir in $PATH
33596do
33597  IFS=$as_save_IFS
33598  test -z "$as_dir" && as_dir=.
33599    for ac_exec_ext in '' $ac_executable_extensions; do
33600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33601    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33603    break 2
33604  fi
33605done
33606  done
33607IFS=$as_save_IFS
33608
33609  ;;
33610esac
33611fi
33612POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33613if test -n "$POTENTIAL_CC"; then
33614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33615$as_echo "$POTENTIAL_CC" >&6; }
33616else
33617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33618$as_echo "no" >&6; }
33619fi
33620
33621
33622  test -n "$POTENTIAL_CC" && break
33623done
33624
33625      if test "x$POTENTIAL_CC" != x; then
33626        CC=$POTENTIAL_CC
33627      else
33628        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33629      fi
33630    else
33631      # Otherwise it might already be a complete path
33632      if test ! -x "$CC"; then
33633        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33634      fi
33635    fi
33636  else
33637    # No user supplied value. Locate compiler ourselves.
33638
33639    # If we are cross compiling, assume cross compilation tools follows the
33640    # cross compilation standard where they are prefixed with the autoconf
33641    # standard name for the target. For example the binary
33642    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33643    # If we are not cross compiling, then the default compiler name will be
33644    # used.
33645
33646    CC=
33647    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33648    # before checking the rest of the PATH.
33649    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33650    # step, this should not be necessary.
33651    if test -n "$TOOLCHAIN_PATH"; then
33652      PATH_save="$PATH"
33653      PATH="$TOOLCHAIN_PATH"
33654      if test -n "$ac_tool_prefix"; then
33655  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33656set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33658$as_echo_n "checking for $ac_word... " >&6; }
33659if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33660  $as_echo_n "(cached) " >&6
33661else
33662  case $TOOLCHAIN_PATH_CC in
33663  [\\/]* | ?:[\\/]*)
33664  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33665  ;;
33666  *)
33667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33668for as_dir in $PATH
33669do
33670  IFS=$as_save_IFS
33671  test -z "$as_dir" && as_dir=.
33672    for ac_exec_ext in '' $ac_executable_extensions; do
33673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33674    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33676    break 2
33677  fi
33678done
33679  done
33680IFS=$as_save_IFS
33681
33682  ;;
33683esac
33684fi
33685TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33686if test -n "$TOOLCHAIN_PATH_CC"; then
33687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33688$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33689else
33690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33691$as_echo "no" >&6; }
33692fi
33693
33694
33695fi
33696if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33697  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33698  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33699set dummy $SEARCH_LIST; ac_word=$2
33700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33701$as_echo_n "checking for $ac_word... " >&6; }
33702if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33703  $as_echo_n "(cached) " >&6
33704else
33705  case $ac_pt_TOOLCHAIN_PATH_CC in
33706  [\\/]* | ?:[\\/]*)
33707  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33708  ;;
33709  *)
33710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33711for as_dir in $PATH
33712do
33713  IFS=$as_save_IFS
33714  test -z "$as_dir" && as_dir=.
33715    for ac_exec_ext in '' $ac_executable_extensions; do
33716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33717    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33719    break 2
33720  fi
33721done
33722  done
33723IFS=$as_save_IFS
33724
33725  ;;
33726esac
33727fi
33728ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33729if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33731$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33732else
33733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33734$as_echo "no" >&6; }
33735fi
33736
33737  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33738    TOOLCHAIN_PATH_CC=""
33739  else
33740    case $cross_compiling:$ac_tool_warned in
33741yes:)
33742{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33743$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33744ac_tool_warned=yes ;;
33745esac
33746    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33747  fi
33748else
33749  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33750fi
33751
33752      CC=$TOOLCHAIN_PATH_CC
33753      PATH="$PATH_save"
33754    fi
33755
33756    # AC_PATH_TOOL can't be run multiple times with the same variable,
33757    # so create a new name for this run.
33758    if test "x$CC" = x; then
33759      if test -n "$ac_tool_prefix"; then
33760  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33761set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33763$as_echo_n "checking for $ac_word... " >&6; }
33764if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33765  $as_echo_n "(cached) " >&6
33766else
33767  case $POTENTIAL_CC in
33768  [\\/]* | ?:[\\/]*)
33769  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33770  ;;
33771  *)
33772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33773for as_dir in $PATH
33774do
33775  IFS=$as_save_IFS
33776  test -z "$as_dir" && as_dir=.
33777    for ac_exec_ext in '' $ac_executable_extensions; do
33778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33779    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33781    break 2
33782  fi
33783done
33784  done
33785IFS=$as_save_IFS
33786
33787  ;;
33788esac
33789fi
33790POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33791if test -n "$POTENTIAL_CC"; then
33792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33793$as_echo "$POTENTIAL_CC" >&6; }
33794else
33795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33796$as_echo "no" >&6; }
33797fi
33798
33799
33800fi
33801if test -z "$ac_cv_path_POTENTIAL_CC"; then
33802  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33803  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33804set dummy $SEARCH_LIST; ac_word=$2
33805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33806$as_echo_n "checking for $ac_word... " >&6; }
33807if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33808  $as_echo_n "(cached) " >&6
33809else
33810  case $ac_pt_POTENTIAL_CC in
33811  [\\/]* | ?:[\\/]*)
33812  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33813  ;;
33814  *)
33815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33816for as_dir in $PATH
33817do
33818  IFS=$as_save_IFS
33819  test -z "$as_dir" && as_dir=.
33820    for ac_exec_ext in '' $ac_executable_extensions; do
33821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33822    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33824    break 2
33825  fi
33826done
33827  done
33828IFS=$as_save_IFS
33829
33830  ;;
33831esac
33832fi
33833ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33834if test -n "$ac_pt_POTENTIAL_CC"; then
33835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33836$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33837else
33838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33839$as_echo "no" >&6; }
33840fi
33841
33842  if test "x$ac_pt_POTENTIAL_CC" = x; then
33843    POTENTIAL_CC=""
33844  else
33845    case $cross_compiling:$ac_tool_warned in
33846yes:)
33847{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33848$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33849ac_tool_warned=yes ;;
33850esac
33851    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33852  fi
33853else
33854  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33855fi
33856
33857      CC=$POTENTIAL_CC
33858    fi
33859
33860    if test "x$CC" = x; then
33861
33862  # Print a helpful message on how to acquire the necessary build dependency.
33863  # devkit is the help tag: freetype, cups, alsa etc
33864  MISSING_DEPENDENCY=devkit
33865
33866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33867    cygwin_help $MISSING_DEPENDENCY
33868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33869    msys_help $MISSING_DEPENDENCY
33870  else
33871    PKGHANDLER_COMMAND=
33872
33873    case $PKGHANDLER in
33874      apt-get)
33875        apt_help     $MISSING_DEPENDENCY ;;
33876      yum)
33877        yum_help     $MISSING_DEPENDENCY ;;
33878      brew)
33879        brew_help    $MISSING_DEPENDENCY ;;
33880      port)
33881        port_help    $MISSING_DEPENDENCY ;;
33882      pkgutil)
33883        pkgutil_help $MISSING_DEPENDENCY ;;
33884      pkgadd)
33885        pkgadd_help  $MISSING_DEPENDENCY ;;
33886    esac
33887
33888    if test "x$PKGHANDLER_COMMAND" != x; then
33889      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33890    fi
33891  fi
33892
33893      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33894    fi
33895  fi
33896
33897  # Now we have a compiler binary in CC. Make sure it's okay.
33898
33899  # Only process if variable expands to non-empty
33900
33901  if test "x$CC" != x; then
33902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33903
33904  # First separate the path from the arguments. This will split at the first
33905  # space.
33906  complete="$CC"
33907  path="${complete%% *}"
33908  tmp="$complete EOL"
33909  arguments="${tmp#* }"
33910
33911  # Input might be given as Windows format, start by converting to
33912  # unix format.
33913  new_path=`$CYGPATH -u "$path"`
33914
33915  # Now try to locate executable using which
33916  new_path=`$WHICH "$new_path" 2> /dev/null`
33917  # bat and cmd files are not always considered executable in cygwin causing which
33918  # to not find them
33919  if test "x$new_path" = x \
33920      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33921      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33922    new_path=`$CYGPATH -u "$path"`
33923  fi
33924  if test "x$new_path" = x; then
33925    # Oops. Which didn't find the executable.
33926    # The splitting of arguments from the executable at a space might have been incorrect,
33927    # since paths with space are more likely in Windows. Give it another try with the whole
33928    # argument.
33929    path="$complete"
33930    arguments="EOL"
33931    new_path=`$CYGPATH -u "$path"`
33932    new_path=`$WHICH "$new_path" 2> /dev/null`
33933    # bat and cmd files are not always considered executable in cygwin causing which
33934    # to not find them
33935    if test "x$new_path" = x \
33936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33938      new_path=`$CYGPATH -u "$path"`
33939    fi
33940    if test "x$new_path" = x; then
33941      # It's still not found. Now this is an unrecoverable error.
33942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33943$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33944      has_space=`$ECHO "$complete" | $GREP " "`
33945      if test "x$has_space" != x; then
33946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33948      fi
33949      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33950    fi
33951  fi
33952
33953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33956  # "foo.exe" is OK but "foo" is an error.
33957  #
33958  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33959  # It is also a way to make sure we got the proper file name for the real test later on.
33960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33961  if test "x$test_shortpath" = x; then
33962    # Short path failed, file does not exist as specified.
33963    # Try adding .exe or .cmd
33964    if test -f "${new_path}.exe"; then
33965      input_to_shortpath="${new_path}.exe"
33966    elif test -f "${new_path}.cmd"; then
33967      input_to_shortpath="${new_path}.cmd"
33968    else
33969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33970$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33971      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33973      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33974    fi
33975  else
33976    input_to_shortpath="$new_path"
33977  fi
33978
33979  # Call helper function which possibly converts this using DOS-style short mode.
33980  # If so, the updated path is stored in $new_path.
33981  new_path="$input_to_shortpath"
33982
33983  input_path="$input_to_shortpath"
33984  # Check if we need to convert this using DOS-style short mode. If the path
33985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33986  # take no chances and rewrite it.
33987  # Note: m4 eats our [], so we need to use [ and ] instead.
33988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33989  if test "x$has_forbidden_chars" != x; then
33990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33994      # Going to short mode and back again did indeed matter. Since short mode is
33995      # case insensitive, let's make it lowercase to improve readability.
33996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33997      # Now convert it back to Unix-style (cygpath)
33998      input_path=`$CYGPATH -u "$shortmode_path"`
33999      new_path="$input_path"
34000    fi
34001  fi
34002
34003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34004  if test "x$test_cygdrive_prefix" = x; then
34005    # As a simple fix, exclude /usr/bin since it's not a real path.
34006    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34008      # a path prefixed by /cygdrive for fixpath to work.
34009      new_path="$CYGWIN_ROOT_PATH$input_path"
34010    fi
34011  fi
34012
34013  # remove trailing .exe if any
34014  new_path="${new_path/%.exe/}"
34015
34016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34017
34018  # First separate the path from the arguments. This will split at the first
34019  # space.
34020  complete="$CC"
34021  path="${complete%% *}"
34022  tmp="$complete EOL"
34023  arguments="${tmp#* }"
34024
34025  # Input might be given as Windows format, start by converting to
34026  # unix format.
34027  new_path="$path"
34028
34029  windows_path="$new_path"
34030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34031    unix_path=`$CYGPATH -u "$windows_path"`
34032    new_path="$unix_path"
34033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34035    new_path="$unix_path"
34036  fi
34037
34038
34039  # Now try to locate executable using which
34040  new_path=`$WHICH "$new_path" 2> /dev/null`
34041
34042  if test "x$new_path" = x; then
34043    # Oops. Which didn't find the executable.
34044    # The splitting of arguments from the executable at a space might have been incorrect,
34045    # since paths with space are more likely in Windows. Give it another try with the whole
34046    # argument.
34047    path="$complete"
34048    arguments="EOL"
34049    new_path="$path"
34050
34051  windows_path="$new_path"
34052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34053    unix_path=`$CYGPATH -u "$windows_path"`
34054    new_path="$unix_path"
34055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34057    new_path="$unix_path"
34058  fi
34059
34060
34061    new_path=`$WHICH "$new_path" 2> /dev/null`
34062    # bat and cmd files are not always considered executable in MSYS causing which
34063    # to not find them
34064    if test "x$new_path" = x \
34065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34067      new_path="$path"
34068
34069  windows_path="$new_path"
34070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34071    unix_path=`$CYGPATH -u "$windows_path"`
34072    new_path="$unix_path"
34073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34075    new_path="$unix_path"
34076  fi
34077
34078    fi
34079
34080    if test "x$new_path" = x; then
34081      # It's still not found. Now this is an unrecoverable error.
34082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34083$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34084      has_space=`$ECHO "$complete" | $GREP " "`
34085      if test "x$has_space" != x; then
34086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34088      fi
34089      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34090    fi
34091  fi
34092
34093  # Now new_path has a complete unix path to the binary
34094  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34095    # Keep paths in /bin as-is, but remove trailing .exe if any
34096    new_path="${new_path/%.exe/}"
34097    # Do not save /bin paths to all_fixpath_prefixes!
34098  else
34099    # Not in mixed or Windows style, start by that.
34100    new_path=`cmd //c echo $new_path`
34101
34102  input_path="$new_path"
34103  # Check if we need to convert this using DOS-style short mode. If the path
34104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34105  # take no chances and rewrite it.
34106  # Note: m4 eats our [], so we need to use [ and ] instead.
34107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34108  if test "x$has_forbidden_chars" != x; then
34109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34111  fi
34112
34113    # Output is in $new_path
34114
34115  windows_path="$new_path"
34116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34117    unix_path=`$CYGPATH -u "$windows_path"`
34118    new_path="$unix_path"
34119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34121    new_path="$unix_path"
34122  fi
34123
34124    # remove trailing .exe if any
34125    new_path="${new_path/%.exe/}"
34126
34127    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34128    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34129  fi
34130
34131    else
34132      # We're on a unix platform. Hooray! :)
34133      # First separate the path from the arguments. This will split at the first
34134      # space.
34135      complete="$CC"
34136      path="${complete%% *}"
34137      tmp="$complete EOL"
34138      arguments="${tmp#* }"
34139
34140      # Cannot rely on the command "which" here since it doesn't always work.
34141      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34142      if test -z "$is_absolute_path"; then
34143        # Path to executable is not absolute. Find it.
34144        IFS_save="$IFS"
34145        IFS=:
34146        for p in $PATH; do
34147          if test -f "$p/$path" && test -x "$p/$path"; then
34148            new_path="$p/$path"
34149            break
34150          fi
34151        done
34152        IFS="$IFS_save"
34153      else
34154        # This is an absolute path, we can use it without further modifications.
34155        new_path="$path"
34156      fi
34157
34158      if test "x$new_path" = x; then
34159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34160$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34161        has_space=`$ECHO "$complete" | $GREP " "`
34162        if test "x$has_space" != x; then
34163          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34164$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34165        fi
34166        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34167      fi
34168    fi
34169
34170    # Now join together the path and the arguments once again
34171    if test "x$arguments" != xEOL; then
34172      new_complete="$new_path ${arguments% *}"
34173    else
34174      new_complete="$new_path"
34175    fi
34176
34177    if test "x$complete" != "x$new_complete"; then
34178      CC="$new_complete"
34179      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34180$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34181    fi
34182  fi
34183
34184  TEST_COMPILER="$CC"
34185
34186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34187$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34188  SYMLINK_ORIGINAL="$TEST_COMPILER"
34189
34190  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34191    # Follow a chain of symbolic links. Use readlink
34192    # where it exists, else fall back to horribly
34193    # complicated shell code.
34194    if test "x$READLINK_TESTED" != yes; then
34195      # On MacOSX there is a readlink tool with a different
34196      # purpose than the GNU readlink tool. Check the found readlink.
34197      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34198      if test "x$ISGNU" = x; then
34199        # A readlink that we do not know how to use.
34200        # Are there other non-GNU readlinks out there?
34201        READLINK_TESTED=yes
34202        READLINK=
34203      fi
34204    fi
34205
34206    if test "x$READLINK" != x; then
34207      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34208    else
34209      # Save the current directory for restoring afterwards
34210      STARTDIR=$PWD
34211      COUNTER=0
34212      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34213      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34214      cd $sym_link_dir
34215      # Use -P flag to resolve symlinks in directories.
34216      cd `$THEPWDCMD -P`
34217      sym_link_dir=`$THEPWDCMD -P`
34218      # Resolve file symlinks
34219      while test $COUNTER -lt 20; do
34220        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34221        if test "x$ISLINK" == x; then
34222          # This is not a symbolic link! We are done!
34223          break
34224        fi
34225        # Again resolve directory symlinks since the target of the just found
34226        # link could be in a different directory
34227        cd `$DIRNAME $ISLINK`
34228        sym_link_dir=`$THEPWDCMD -P`
34229        sym_link_file=`$BASENAME $ISLINK`
34230        let COUNTER=COUNTER+1
34231      done
34232      cd $STARTDIR
34233      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34234    fi
34235  fi
34236
34237  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34239$as_echo "no symlink" >&6; }
34240  else
34241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34242$as_echo "$SYMLINK_ORIGINAL" >&6; }
34243
34244    # We can't handle ccache by gcc wrappers, since we need to know if we're
34245    # using ccache. Instead ccache usage must be controlled by a configure option.
34246    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34247    if test "x$COMPILER_BASENAME" = "xccache"; then
34248      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34249$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34250      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34251    fi
34252  fi
34253
34254
34255  COMPILER=$CC
34256  COMPILER_NAME=$COMPILER_NAME
34257
34258  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34259    # cc -V output typically looks like
34260    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34261    # or
34262    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34263    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34264    # Check that this is likely to be the Solaris Studio cc.
34265    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34266    if test $? -ne 0; then
34267      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34268      { $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
34269$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34270      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34271$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34272      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34273$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34274      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34275    fi
34276    # Remove usage instructions (if present), and
34277    # collapse compiler output into a single line
34278    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34279        $SED -e 's/ *[Uu]sage:.*//'`
34280    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34281        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34282  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34283    # xlc -qversion output typically looks like
34284    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34285    #     Version: 11.01.0000.0015
34286    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34287    # Check that this is likely to be the IBM XL C compiler.
34288    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34289    if test $? -ne 0; then
34290      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34291      { $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
34292$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34293      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34294$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34295      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34296$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34297      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34298    fi
34299    # Collapse compiler output into a single line
34300    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34301    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34302        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34303  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34304    # There is no specific version flag, but all output starts with a version string.
34305    # First line typically looks something like:
34306    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34307    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34308    # Check that this is likely to be Microsoft CL.EXE.
34309    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34310    if test $? -ne 0; then
34311      { $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
34312$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34313      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34314$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34315      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34316    fi
34317    # Collapse compiler output into a single line
34318    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34319    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34320        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34321  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34322    # gcc --version output typically looks like
34323    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34324    #     Copyright (C) 2013 Free Software Foundation, Inc.
34325    #     This is free software; see the source for copying conditions.  There is NO
34326    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34327    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34328    # Check that this is likely to be GCC.
34329    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34330    if test $? -ne 0; then
34331      { $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
34332$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34333      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34334$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34335      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34336    fi
34337    # Remove Copyright and legalese from version string, and
34338    # collapse into a single line
34339    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34340        $SED -e 's/ *Copyright .*//'`
34341    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34342        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34343  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34344    # clang --version output typically looks like
34345    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34346    #    clang version 3.3 (tags/RELEASE_33/final)
34347    # or
34348    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34349    #    Target: x86_64-pc-linux-gnu
34350    #    Thread model: posix
34351    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34352    # Check that this is likely to be clang
34353    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34354    if test $? -ne 0; then
34355      { $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
34356$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34357      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34358$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34359      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34360    fi
34361    # Collapse compiler output into a single line
34362    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34363    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34364        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34365  else
34366      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34367  fi
34368  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34369  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34370  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34371  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34372
34373  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34374$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34375
34376
34377  # Now that we have resolved CC ourself, let autoconf have its go at it
34378  ac_ext=c
34379ac_cpp='$CPP $CPPFLAGS'
34380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34382ac_compiler_gnu=$ac_cv_c_compiler_gnu
34383if test -n "$ac_tool_prefix"; then
34384  for ac_prog in $CC
34385  do
34386    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34389$as_echo_n "checking for $ac_word... " >&6; }
34390if ${ac_cv_prog_CC+:} false; then :
34391  $as_echo_n "(cached) " >&6
34392else
34393  if test -n "$CC"; then
34394  ac_cv_prog_CC="$CC" # Let the user override the test.
34395else
34396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34397for as_dir in $PATH
34398do
34399  IFS=$as_save_IFS
34400  test -z "$as_dir" && as_dir=.
34401    for ac_exec_ext in '' $ac_executable_extensions; do
34402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34403    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34405    break 2
34406  fi
34407done
34408  done
34409IFS=$as_save_IFS
34410
34411fi
34412fi
34413CC=$ac_cv_prog_CC
34414if test -n "$CC"; then
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34416$as_echo "$CC" >&6; }
34417else
34418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34419$as_echo "no" >&6; }
34420fi
34421
34422
34423    test -n "$CC" && break
34424  done
34425fi
34426if test -z "$CC"; then
34427  ac_ct_CC=$CC
34428  for ac_prog in $CC
34429do
34430  # Extract the first word of "$ac_prog", so it can be a program name with args.
34431set dummy $ac_prog; ac_word=$2
34432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34433$as_echo_n "checking for $ac_word... " >&6; }
34434if ${ac_cv_prog_ac_ct_CC+:} false; then :
34435  $as_echo_n "(cached) " >&6
34436else
34437  if test -n "$ac_ct_CC"; then
34438  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34439else
34440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34441for as_dir in $PATH
34442do
34443  IFS=$as_save_IFS
34444  test -z "$as_dir" && as_dir=.
34445    for ac_exec_ext in '' $ac_executable_extensions; do
34446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34447    ac_cv_prog_ac_ct_CC="$ac_prog"
34448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34449    break 2
34450  fi
34451done
34452  done
34453IFS=$as_save_IFS
34454
34455fi
34456fi
34457ac_ct_CC=$ac_cv_prog_ac_ct_CC
34458if test -n "$ac_ct_CC"; then
34459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34460$as_echo "$ac_ct_CC" >&6; }
34461else
34462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34463$as_echo "no" >&6; }
34464fi
34465
34466
34467  test -n "$ac_ct_CC" && break
34468done
34469
34470  if test "x$ac_ct_CC" = x; then
34471    CC=""
34472  else
34473    case $cross_compiling:$ac_tool_warned in
34474yes:)
34475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34477ac_tool_warned=yes ;;
34478esac
34479    CC=$ac_ct_CC
34480  fi
34481fi
34482
34483
34484test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34486as_fn_error $? "no acceptable C compiler found in \$PATH
34487See \`config.log' for more details" "$LINENO" 5; }
34488
34489# Provide some information about the compiler.
34490$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34491set X $ac_compile
34492ac_compiler=$2
34493for ac_option in --version -v -V -qversion; do
34494  { { ac_try="$ac_compiler $ac_option >&5"
34495case "(($ac_try" in
34496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34497  *) ac_try_echo=$ac_try;;
34498esac
34499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34500$as_echo "$ac_try_echo"; } >&5
34501  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34502  ac_status=$?
34503  if test -s conftest.err; then
34504    sed '10a\
34505... rest of stderr output deleted ...
34506         10q' conftest.err >conftest.er1
34507    cat conftest.er1 >&5
34508  fi
34509  rm -f conftest.er1 conftest.err
34510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34511  test $ac_status = 0; }
34512done
34513
34514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34515/* end confdefs.h.  */
34516
34517int
34518main ()
34519{
34520
34521  ;
34522  return 0;
34523}
34524_ACEOF
34525ac_clean_files_save=$ac_clean_files
34526ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34527# Try to create an executable without -o first, disregard a.out.
34528# It will help us diagnose broken compilers, and finding out an intuition
34529# of exeext.
34530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34531$as_echo_n "checking whether the C compiler works... " >&6; }
34532ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34533
34534# The possible output files:
34535ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34536
34537ac_rmfiles=
34538for ac_file in $ac_files
34539do
34540  case $ac_file in
34541    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34542    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34543  esac
34544done
34545rm -f $ac_rmfiles
34546
34547if { { ac_try="$ac_link_default"
34548case "(($ac_try" in
34549  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34550  *) ac_try_echo=$ac_try;;
34551esac
34552eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34553$as_echo "$ac_try_echo"; } >&5
34554  (eval "$ac_link_default") 2>&5
34555  ac_status=$?
34556  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34557  test $ac_status = 0; }; then :
34558  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34559# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34560# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34561# so that the user can short-circuit this test for compilers unknown to
34562# Autoconf.
34563for ac_file in $ac_files ''
34564do
34565  test -f "$ac_file" || continue
34566  case $ac_file in
34567    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34568	;;
34569    [ab].out )
34570	# We found the default executable, but exeext='' is most
34571	# certainly right.
34572	break;;
34573    *.* )
34574	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34575	then :; else
34576	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34577	fi
34578	# We set ac_cv_exeext here because the later test for it is not
34579	# safe: cross compilers may not add the suffix if given an `-o'
34580	# argument, so we may need to know it at that point already.
34581	# Even if this section looks crufty: it has the advantage of
34582	# actually working.
34583	break;;
34584    * )
34585	break;;
34586  esac
34587done
34588test "$ac_cv_exeext" = no && ac_cv_exeext=
34589
34590else
34591  ac_file=''
34592fi
34593if test -z "$ac_file"; then :
34594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34595$as_echo "no" >&6; }
34596$as_echo "$as_me: failed program was:" >&5
34597sed 's/^/| /' conftest.$ac_ext >&5
34598
34599{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34601as_fn_error 77 "C compiler cannot create executables
34602See \`config.log' for more details" "$LINENO" 5; }
34603else
34604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34605$as_echo "yes" >&6; }
34606fi
34607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34608$as_echo_n "checking for C compiler default output file name... " >&6; }
34609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34610$as_echo "$ac_file" >&6; }
34611ac_exeext=$ac_cv_exeext
34612
34613rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34614ac_clean_files=$ac_clean_files_save
34615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34616$as_echo_n "checking for suffix of executables... " >&6; }
34617if { { ac_try="$ac_link"
34618case "(($ac_try" in
34619  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34620  *) ac_try_echo=$ac_try;;
34621esac
34622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34623$as_echo "$ac_try_echo"; } >&5
34624  (eval "$ac_link") 2>&5
34625  ac_status=$?
34626  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34627  test $ac_status = 0; }; then :
34628  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34629# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34630# work properly (i.e., refer to `conftest.exe'), while it won't with
34631# `rm'.
34632for ac_file in conftest.exe conftest conftest.*; do
34633  test -f "$ac_file" || continue
34634  case $ac_file in
34635    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34636    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34637	  break;;
34638    * ) break;;
34639  esac
34640done
34641else
34642  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34644as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34645See \`config.log' for more details" "$LINENO" 5; }
34646fi
34647rm -f conftest conftest$ac_cv_exeext
34648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34649$as_echo "$ac_cv_exeext" >&6; }
34650
34651rm -f conftest.$ac_ext
34652EXEEXT=$ac_cv_exeext
34653ac_exeext=$EXEEXT
34654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34655/* end confdefs.h.  */
34656#include <stdio.h>
34657int
34658main ()
34659{
34660FILE *f = fopen ("conftest.out", "w");
34661 return ferror (f) || fclose (f) != 0;
34662
34663  ;
34664  return 0;
34665}
34666_ACEOF
34667ac_clean_files="$ac_clean_files conftest.out"
34668# Check that the compiler produces executables we can run.  If not, either
34669# the compiler is broken, or we cross compile.
34670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34671$as_echo_n "checking whether we are cross compiling... " >&6; }
34672if test "$cross_compiling" != yes; then
34673  { { ac_try="$ac_link"
34674case "(($ac_try" in
34675  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34676  *) ac_try_echo=$ac_try;;
34677esac
34678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34679$as_echo "$ac_try_echo"; } >&5
34680  (eval "$ac_link") 2>&5
34681  ac_status=$?
34682  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34683  test $ac_status = 0; }
34684  if { ac_try='./conftest$ac_cv_exeext'
34685  { { case "(($ac_try" in
34686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34687  *) ac_try_echo=$ac_try;;
34688esac
34689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34690$as_echo "$ac_try_echo"; } >&5
34691  (eval "$ac_try") 2>&5
34692  ac_status=$?
34693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34694  test $ac_status = 0; }; }; then
34695    cross_compiling=no
34696  else
34697    if test "$cross_compiling" = maybe; then
34698	cross_compiling=yes
34699    else
34700	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34702as_fn_error $? "cannot run C compiled programs.
34703If you meant to cross compile, use \`--host'.
34704See \`config.log' for more details" "$LINENO" 5; }
34705    fi
34706  fi
34707fi
34708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34709$as_echo "$cross_compiling" >&6; }
34710
34711rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34712ac_clean_files=$ac_clean_files_save
34713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34714$as_echo_n "checking for suffix of object files... " >&6; }
34715if ${ac_cv_objext+:} false; then :
34716  $as_echo_n "(cached) " >&6
34717else
34718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34719/* end confdefs.h.  */
34720
34721int
34722main ()
34723{
34724
34725  ;
34726  return 0;
34727}
34728_ACEOF
34729rm -f conftest.o conftest.obj
34730if { { ac_try="$ac_compile"
34731case "(($ac_try" in
34732  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34733  *) ac_try_echo=$ac_try;;
34734esac
34735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34736$as_echo "$ac_try_echo"; } >&5
34737  (eval "$ac_compile") 2>&5
34738  ac_status=$?
34739  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34740  test $ac_status = 0; }; then :
34741  for ac_file in conftest.o conftest.obj conftest.*; do
34742  test -f "$ac_file" || continue;
34743  case $ac_file in
34744    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34745    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34746       break;;
34747  esac
34748done
34749else
34750  $as_echo "$as_me: failed program was:" >&5
34751sed 's/^/| /' conftest.$ac_ext >&5
34752
34753{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34755as_fn_error $? "cannot compute suffix of object files: cannot compile
34756See \`config.log' for more details" "$LINENO" 5; }
34757fi
34758rm -f conftest.$ac_cv_objext conftest.$ac_ext
34759fi
34760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34761$as_echo "$ac_cv_objext" >&6; }
34762OBJEXT=$ac_cv_objext
34763ac_objext=$OBJEXT
34764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34765$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34766if ${ac_cv_c_compiler_gnu+:} false; then :
34767  $as_echo_n "(cached) " >&6
34768else
34769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34770/* end confdefs.h.  */
34771
34772int
34773main ()
34774{
34775#ifndef __GNUC__
34776       choke me
34777#endif
34778
34779  ;
34780  return 0;
34781}
34782_ACEOF
34783if ac_fn_c_try_compile "$LINENO"; then :
34784  ac_compiler_gnu=yes
34785else
34786  ac_compiler_gnu=no
34787fi
34788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34789ac_cv_c_compiler_gnu=$ac_compiler_gnu
34790
34791fi
34792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34793$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34794if test $ac_compiler_gnu = yes; then
34795  GCC=yes
34796else
34797  GCC=
34798fi
34799ac_test_CFLAGS=${CFLAGS+set}
34800ac_save_CFLAGS=$CFLAGS
34801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34802$as_echo_n "checking whether $CC accepts -g... " >&6; }
34803if ${ac_cv_prog_cc_g+:} false; then :
34804  $as_echo_n "(cached) " >&6
34805else
34806  ac_save_c_werror_flag=$ac_c_werror_flag
34807   ac_c_werror_flag=yes
34808   ac_cv_prog_cc_g=no
34809   CFLAGS="-g"
34810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34811/* end confdefs.h.  */
34812
34813int
34814main ()
34815{
34816
34817  ;
34818  return 0;
34819}
34820_ACEOF
34821if ac_fn_c_try_compile "$LINENO"; then :
34822  ac_cv_prog_cc_g=yes
34823else
34824  CFLAGS=""
34825      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34826/* end confdefs.h.  */
34827
34828int
34829main ()
34830{
34831
34832  ;
34833  return 0;
34834}
34835_ACEOF
34836if ac_fn_c_try_compile "$LINENO"; then :
34837
34838else
34839  ac_c_werror_flag=$ac_save_c_werror_flag
34840	 CFLAGS="-g"
34841	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34842/* end confdefs.h.  */
34843
34844int
34845main ()
34846{
34847
34848  ;
34849  return 0;
34850}
34851_ACEOF
34852if ac_fn_c_try_compile "$LINENO"; then :
34853  ac_cv_prog_cc_g=yes
34854fi
34855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34856fi
34857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34858fi
34859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34860   ac_c_werror_flag=$ac_save_c_werror_flag
34861fi
34862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34863$as_echo "$ac_cv_prog_cc_g" >&6; }
34864if test "$ac_test_CFLAGS" = set; then
34865  CFLAGS=$ac_save_CFLAGS
34866elif test $ac_cv_prog_cc_g = yes; then
34867  if test "$GCC" = yes; then
34868    CFLAGS="-g -O2"
34869  else
34870    CFLAGS="-g"
34871  fi
34872else
34873  if test "$GCC" = yes; then
34874    CFLAGS="-O2"
34875  else
34876    CFLAGS=
34877  fi
34878fi
34879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34880$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34881if ${ac_cv_prog_cc_c89+:} false; then :
34882  $as_echo_n "(cached) " >&6
34883else
34884  ac_cv_prog_cc_c89=no
34885ac_save_CC=$CC
34886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34887/* end confdefs.h.  */
34888#include <stdarg.h>
34889#include <stdio.h>
34890struct stat;
34891/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34892struct buf { int x; };
34893FILE * (*rcsopen) (struct buf *, struct stat *, int);
34894static char *e (p, i)
34895     char **p;
34896     int i;
34897{
34898  return p[i];
34899}
34900static char *f (char * (*g) (char **, int), char **p, ...)
34901{
34902  char *s;
34903  va_list v;
34904  va_start (v,p);
34905  s = g (p, va_arg (v,int));
34906  va_end (v);
34907  return s;
34908}
34909
34910/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34911   function prototypes and stuff, but not '\xHH' hex character constants.
34912   These don't provoke an error unfortunately, instead are silently treated
34913   as 'x'.  The following induces an error, until -std is added to get
34914   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34915   array size at least.  It's necessary to write '\x00'==0 to get something
34916   that's true only with -std.  */
34917int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34918
34919/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34920   inside strings and character constants.  */
34921#define FOO(x) 'x'
34922int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34923
34924int test (int i, double x);
34925struct s1 {int (*f) (int a);};
34926struct s2 {int (*f) (double a);};
34927int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34928int argc;
34929char **argv;
34930int
34931main ()
34932{
34933return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34934  ;
34935  return 0;
34936}
34937_ACEOF
34938for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34939	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34940do
34941  CC="$ac_save_CC $ac_arg"
34942  if ac_fn_c_try_compile "$LINENO"; then :
34943  ac_cv_prog_cc_c89=$ac_arg
34944fi
34945rm -f core conftest.err conftest.$ac_objext
34946  test "x$ac_cv_prog_cc_c89" != "xno" && break
34947done
34948rm -f conftest.$ac_ext
34949CC=$ac_save_CC
34950
34951fi
34952# AC_CACHE_VAL
34953case "x$ac_cv_prog_cc_c89" in
34954  x)
34955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34956$as_echo "none needed" >&6; } ;;
34957  xno)
34958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34959$as_echo "unsupported" >&6; } ;;
34960  *)
34961    CC="$CC $ac_cv_prog_cc_c89"
34962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34963$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34964esac
34965if test "x$ac_cv_prog_cc_c89" != xno; then :
34966
34967fi
34968
34969ac_ext=cpp
34970ac_cpp='$CXXCPP $CPPFLAGS'
34971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34974
34975
34976
34977  COMPILER_NAME=C++
34978  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34979
34980  if test "x$CXX" != x; then
34981    # User has supplied compiler name already, always let that override.
34982    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34983$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34984    if test "x`basename $CXX`" = "x$CXX"; then
34985      # A command without a complete path is provided, search $PATH.
34986
34987      for ac_prog in $CXX
34988do
34989  # Extract the first word of "$ac_prog", so it can be a program name with args.
34990set dummy $ac_prog; ac_word=$2
34991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34992$as_echo_n "checking for $ac_word... " >&6; }
34993if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34994  $as_echo_n "(cached) " >&6
34995else
34996  case $POTENTIAL_CXX in
34997  [\\/]* | ?:[\\/]*)
34998  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34999  ;;
35000  *)
35001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35002for as_dir in $PATH
35003do
35004  IFS=$as_save_IFS
35005  test -z "$as_dir" && as_dir=.
35006    for ac_exec_ext in '' $ac_executable_extensions; do
35007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35008    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35010    break 2
35011  fi
35012done
35013  done
35014IFS=$as_save_IFS
35015
35016  ;;
35017esac
35018fi
35019POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35020if test -n "$POTENTIAL_CXX"; then
35021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35022$as_echo "$POTENTIAL_CXX" >&6; }
35023else
35024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35025$as_echo "no" >&6; }
35026fi
35027
35028
35029  test -n "$POTENTIAL_CXX" && break
35030done
35031
35032      if test "x$POTENTIAL_CXX" != x; then
35033        CXX=$POTENTIAL_CXX
35034      else
35035        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35036      fi
35037    else
35038      # Otherwise it might already be a complete path
35039      if test ! -x "$CXX"; then
35040        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35041      fi
35042    fi
35043  else
35044    # No user supplied value. Locate compiler ourselves.
35045
35046    # If we are cross compiling, assume cross compilation tools follows the
35047    # cross compilation standard where they are prefixed with the autoconf
35048    # standard name for the target. For example the binary
35049    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35050    # If we are not cross compiling, then the default compiler name will be
35051    # used.
35052
35053    CXX=
35054    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35055    # before checking the rest of the PATH.
35056    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35057    # step, this should not be necessary.
35058    if test -n "$TOOLCHAIN_PATH"; then
35059      PATH_save="$PATH"
35060      PATH="$TOOLCHAIN_PATH"
35061      if test -n "$ac_tool_prefix"; then
35062  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35063set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35065$as_echo_n "checking for $ac_word... " >&6; }
35066if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35067  $as_echo_n "(cached) " >&6
35068else
35069  case $TOOLCHAIN_PATH_CXX in
35070  [\\/]* | ?:[\\/]*)
35071  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35072  ;;
35073  *)
35074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35075for as_dir in $PATH
35076do
35077  IFS=$as_save_IFS
35078  test -z "$as_dir" && as_dir=.
35079    for ac_exec_ext in '' $ac_executable_extensions; do
35080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35081    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35083    break 2
35084  fi
35085done
35086  done
35087IFS=$as_save_IFS
35088
35089  ;;
35090esac
35091fi
35092TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35093if test -n "$TOOLCHAIN_PATH_CXX"; then
35094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35095$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35096else
35097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35098$as_echo "no" >&6; }
35099fi
35100
35101
35102fi
35103if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35104  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35105  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35106set dummy $SEARCH_LIST; ac_word=$2
35107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35108$as_echo_n "checking for $ac_word... " >&6; }
35109if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35110  $as_echo_n "(cached) " >&6
35111else
35112  case $ac_pt_TOOLCHAIN_PATH_CXX in
35113  [\\/]* | ?:[\\/]*)
35114  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35115  ;;
35116  *)
35117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35118for as_dir in $PATH
35119do
35120  IFS=$as_save_IFS
35121  test -z "$as_dir" && as_dir=.
35122    for ac_exec_ext in '' $ac_executable_extensions; do
35123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35124    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35126    break 2
35127  fi
35128done
35129  done
35130IFS=$as_save_IFS
35131
35132  ;;
35133esac
35134fi
35135ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35136if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35138$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35139else
35140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35141$as_echo "no" >&6; }
35142fi
35143
35144  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35145    TOOLCHAIN_PATH_CXX=""
35146  else
35147    case $cross_compiling:$ac_tool_warned in
35148yes:)
35149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35151ac_tool_warned=yes ;;
35152esac
35153    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35154  fi
35155else
35156  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35157fi
35158
35159      CXX=$TOOLCHAIN_PATH_CXX
35160      PATH="$PATH_save"
35161    fi
35162
35163    # AC_PATH_TOOL can't be run multiple times with the same variable,
35164    # so create a new name for this run.
35165    if test "x$CXX" = x; then
35166      if test -n "$ac_tool_prefix"; then
35167  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35168set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35170$as_echo_n "checking for $ac_word... " >&6; }
35171if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35172  $as_echo_n "(cached) " >&6
35173else
35174  case $POTENTIAL_CXX in
35175  [\\/]* | ?:[\\/]*)
35176  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35177  ;;
35178  *)
35179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35180for as_dir in $PATH
35181do
35182  IFS=$as_save_IFS
35183  test -z "$as_dir" && as_dir=.
35184    for ac_exec_ext in '' $ac_executable_extensions; do
35185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35186    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35188    break 2
35189  fi
35190done
35191  done
35192IFS=$as_save_IFS
35193
35194  ;;
35195esac
35196fi
35197POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35198if test -n "$POTENTIAL_CXX"; then
35199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35200$as_echo "$POTENTIAL_CXX" >&6; }
35201else
35202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35203$as_echo "no" >&6; }
35204fi
35205
35206
35207fi
35208if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35209  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35210  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35211set dummy $SEARCH_LIST; ac_word=$2
35212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35213$as_echo_n "checking for $ac_word... " >&6; }
35214if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35215  $as_echo_n "(cached) " >&6
35216else
35217  case $ac_pt_POTENTIAL_CXX in
35218  [\\/]* | ?:[\\/]*)
35219  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35220  ;;
35221  *)
35222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35223for as_dir in $PATH
35224do
35225  IFS=$as_save_IFS
35226  test -z "$as_dir" && as_dir=.
35227    for ac_exec_ext in '' $ac_executable_extensions; do
35228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35229    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35231    break 2
35232  fi
35233done
35234  done
35235IFS=$as_save_IFS
35236
35237  ;;
35238esac
35239fi
35240ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35241if test -n "$ac_pt_POTENTIAL_CXX"; then
35242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35243$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35244else
35245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35246$as_echo "no" >&6; }
35247fi
35248
35249  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35250    POTENTIAL_CXX=""
35251  else
35252    case $cross_compiling:$ac_tool_warned in
35253yes:)
35254{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35255$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35256ac_tool_warned=yes ;;
35257esac
35258    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35259  fi
35260else
35261  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35262fi
35263
35264      CXX=$POTENTIAL_CXX
35265    fi
35266
35267    if test "x$CXX" = x; then
35268
35269  # Print a helpful message on how to acquire the necessary build dependency.
35270  # devkit is the help tag: freetype, cups, alsa etc
35271  MISSING_DEPENDENCY=devkit
35272
35273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35274    cygwin_help $MISSING_DEPENDENCY
35275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35276    msys_help $MISSING_DEPENDENCY
35277  else
35278    PKGHANDLER_COMMAND=
35279
35280    case $PKGHANDLER in
35281      apt-get)
35282        apt_help     $MISSING_DEPENDENCY ;;
35283      yum)
35284        yum_help     $MISSING_DEPENDENCY ;;
35285      brew)
35286        brew_help    $MISSING_DEPENDENCY ;;
35287      port)
35288        port_help    $MISSING_DEPENDENCY ;;
35289      pkgutil)
35290        pkgutil_help $MISSING_DEPENDENCY ;;
35291      pkgadd)
35292        pkgadd_help  $MISSING_DEPENDENCY ;;
35293    esac
35294
35295    if test "x$PKGHANDLER_COMMAND" != x; then
35296      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35297    fi
35298  fi
35299
35300      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35301    fi
35302  fi
35303
35304  # Now we have a compiler binary in CXX. Make sure it's okay.
35305
35306  # Only process if variable expands to non-empty
35307
35308  if test "x$CXX" != x; then
35309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35310
35311  # First separate the path from the arguments. This will split at the first
35312  # space.
35313  complete="$CXX"
35314  path="${complete%% *}"
35315  tmp="$complete EOL"
35316  arguments="${tmp#* }"
35317
35318  # Input might be given as Windows format, start by converting to
35319  # unix format.
35320  new_path=`$CYGPATH -u "$path"`
35321
35322  # Now try to locate executable using which
35323  new_path=`$WHICH "$new_path" 2> /dev/null`
35324  # bat and cmd files are not always considered executable in cygwin causing which
35325  # to not find them
35326  if test "x$new_path" = x \
35327      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35328      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35329    new_path=`$CYGPATH -u "$path"`
35330  fi
35331  if test "x$new_path" = x; then
35332    # Oops. Which didn't find the executable.
35333    # The splitting of arguments from the executable at a space might have been incorrect,
35334    # since paths with space are more likely in Windows. Give it another try with the whole
35335    # argument.
35336    path="$complete"
35337    arguments="EOL"
35338    new_path=`$CYGPATH -u "$path"`
35339    new_path=`$WHICH "$new_path" 2> /dev/null`
35340    # bat and cmd files are not always considered executable in cygwin causing which
35341    # to not find them
35342    if test "x$new_path" = x \
35343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35345      new_path=`$CYGPATH -u "$path"`
35346    fi
35347    if test "x$new_path" = x; then
35348      # It's still not found. Now this is an unrecoverable error.
35349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35350$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35351      has_space=`$ECHO "$complete" | $GREP " "`
35352      if test "x$has_space" != x; then
35353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35355      fi
35356      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35357    fi
35358  fi
35359
35360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35363  # "foo.exe" is OK but "foo" is an error.
35364  #
35365  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35366  # It is also a way to make sure we got the proper file name for the real test later on.
35367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35368  if test "x$test_shortpath" = x; then
35369    # Short path failed, file does not exist as specified.
35370    # Try adding .exe or .cmd
35371    if test -f "${new_path}.exe"; then
35372      input_to_shortpath="${new_path}.exe"
35373    elif test -f "${new_path}.cmd"; then
35374      input_to_shortpath="${new_path}.cmd"
35375    else
35376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35377$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35380      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35381    fi
35382  else
35383    input_to_shortpath="$new_path"
35384  fi
35385
35386  # Call helper function which possibly converts this using DOS-style short mode.
35387  # If so, the updated path is stored in $new_path.
35388  new_path="$input_to_shortpath"
35389
35390  input_path="$input_to_shortpath"
35391  # Check if we need to convert this using DOS-style short mode. If the path
35392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35393  # take no chances and rewrite it.
35394  # Note: m4 eats our [], so we need to use [ and ] instead.
35395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35396  if test "x$has_forbidden_chars" != x; then
35397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35401      # Going to short mode and back again did indeed matter. Since short mode is
35402      # case insensitive, let's make it lowercase to improve readability.
35403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35404      # Now convert it back to Unix-style (cygpath)
35405      input_path=`$CYGPATH -u "$shortmode_path"`
35406      new_path="$input_path"
35407    fi
35408  fi
35409
35410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35411  if test "x$test_cygdrive_prefix" = x; then
35412    # As a simple fix, exclude /usr/bin since it's not a real path.
35413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35415      # a path prefixed by /cygdrive for fixpath to work.
35416      new_path="$CYGWIN_ROOT_PATH$input_path"
35417    fi
35418  fi
35419
35420  # remove trailing .exe if any
35421  new_path="${new_path/%.exe/}"
35422
35423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35424
35425  # First separate the path from the arguments. This will split at the first
35426  # space.
35427  complete="$CXX"
35428  path="${complete%% *}"
35429  tmp="$complete EOL"
35430  arguments="${tmp#* }"
35431
35432  # Input might be given as Windows format, start by converting to
35433  # unix format.
35434  new_path="$path"
35435
35436  windows_path="$new_path"
35437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35438    unix_path=`$CYGPATH -u "$windows_path"`
35439    new_path="$unix_path"
35440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35442    new_path="$unix_path"
35443  fi
35444
35445
35446  # Now try to locate executable using which
35447  new_path=`$WHICH "$new_path" 2> /dev/null`
35448
35449  if test "x$new_path" = x; then
35450    # Oops. Which didn't find the executable.
35451    # The splitting of arguments from the executable at a space might have been incorrect,
35452    # since paths with space are more likely in Windows. Give it another try with the whole
35453    # argument.
35454    path="$complete"
35455    arguments="EOL"
35456    new_path="$path"
35457
35458  windows_path="$new_path"
35459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35460    unix_path=`$CYGPATH -u "$windows_path"`
35461    new_path="$unix_path"
35462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35464    new_path="$unix_path"
35465  fi
35466
35467
35468    new_path=`$WHICH "$new_path" 2> /dev/null`
35469    # bat and cmd files are not always considered executable in MSYS causing which
35470    # to not find them
35471    if test "x$new_path" = x \
35472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35474      new_path="$path"
35475
35476  windows_path="$new_path"
35477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35478    unix_path=`$CYGPATH -u "$windows_path"`
35479    new_path="$unix_path"
35480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35482    new_path="$unix_path"
35483  fi
35484
35485    fi
35486
35487    if test "x$new_path" = x; then
35488      # It's still not found. Now this is an unrecoverable error.
35489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35490$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35491      has_space=`$ECHO "$complete" | $GREP " "`
35492      if test "x$has_space" != x; then
35493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35495      fi
35496      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35497    fi
35498  fi
35499
35500  # Now new_path has a complete unix path to the binary
35501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35502    # Keep paths in /bin as-is, but remove trailing .exe if any
35503    new_path="${new_path/%.exe/}"
35504    # Do not save /bin paths to all_fixpath_prefixes!
35505  else
35506    # Not in mixed or Windows style, start by that.
35507    new_path=`cmd //c echo $new_path`
35508
35509  input_path="$new_path"
35510  # Check if we need to convert this using DOS-style short mode. If the path
35511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35512  # take no chances and rewrite it.
35513  # Note: m4 eats our [], so we need to use [ and ] instead.
35514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35515  if test "x$has_forbidden_chars" != x; then
35516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35518  fi
35519
35520    # Output is in $new_path
35521
35522  windows_path="$new_path"
35523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35524    unix_path=`$CYGPATH -u "$windows_path"`
35525    new_path="$unix_path"
35526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35528    new_path="$unix_path"
35529  fi
35530
35531    # remove trailing .exe if any
35532    new_path="${new_path/%.exe/}"
35533
35534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35536  fi
35537
35538    else
35539      # We're on a unix platform. Hooray! :)
35540      # First separate the path from the arguments. This will split at the first
35541      # space.
35542      complete="$CXX"
35543      path="${complete%% *}"
35544      tmp="$complete EOL"
35545      arguments="${tmp#* }"
35546
35547      # Cannot rely on the command "which" here since it doesn't always work.
35548      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35549      if test -z "$is_absolute_path"; then
35550        # Path to executable is not absolute. Find it.
35551        IFS_save="$IFS"
35552        IFS=:
35553        for p in $PATH; do
35554          if test -f "$p/$path" && test -x "$p/$path"; then
35555            new_path="$p/$path"
35556            break
35557          fi
35558        done
35559        IFS="$IFS_save"
35560      else
35561        # This is an absolute path, we can use it without further modifications.
35562        new_path="$path"
35563      fi
35564
35565      if test "x$new_path" = x; then
35566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35567$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35568        has_space=`$ECHO "$complete" | $GREP " "`
35569        if test "x$has_space" != x; then
35570          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35571$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35572        fi
35573        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35574      fi
35575    fi
35576
35577    # Now join together the path and the arguments once again
35578    if test "x$arguments" != xEOL; then
35579      new_complete="$new_path ${arguments% *}"
35580    else
35581      new_complete="$new_path"
35582    fi
35583
35584    if test "x$complete" != "x$new_complete"; then
35585      CXX="$new_complete"
35586      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35587$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35588    fi
35589  fi
35590
35591  TEST_COMPILER="$CXX"
35592
35593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35594$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35595  SYMLINK_ORIGINAL="$TEST_COMPILER"
35596
35597  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35598    # Follow a chain of symbolic links. Use readlink
35599    # where it exists, else fall back to horribly
35600    # complicated shell code.
35601    if test "x$READLINK_TESTED" != yes; then
35602      # On MacOSX there is a readlink tool with a different
35603      # purpose than the GNU readlink tool. Check the found readlink.
35604      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35605      if test "x$ISGNU" = x; then
35606        # A readlink that we do not know how to use.
35607        # Are there other non-GNU readlinks out there?
35608        READLINK_TESTED=yes
35609        READLINK=
35610      fi
35611    fi
35612
35613    if test "x$READLINK" != x; then
35614      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35615    else
35616      # Save the current directory for restoring afterwards
35617      STARTDIR=$PWD
35618      COUNTER=0
35619      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35620      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35621      cd $sym_link_dir
35622      # Use -P flag to resolve symlinks in directories.
35623      cd `$THEPWDCMD -P`
35624      sym_link_dir=`$THEPWDCMD -P`
35625      # Resolve file symlinks
35626      while test $COUNTER -lt 20; do
35627        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35628        if test "x$ISLINK" == x; then
35629          # This is not a symbolic link! We are done!
35630          break
35631        fi
35632        # Again resolve directory symlinks since the target of the just found
35633        # link could be in a different directory
35634        cd `$DIRNAME $ISLINK`
35635        sym_link_dir=`$THEPWDCMD -P`
35636        sym_link_file=`$BASENAME $ISLINK`
35637        let COUNTER=COUNTER+1
35638      done
35639      cd $STARTDIR
35640      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35641    fi
35642  fi
35643
35644  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35646$as_echo "no symlink" >&6; }
35647  else
35648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35649$as_echo "$SYMLINK_ORIGINAL" >&6; }
35650
35651    # We can't handle ccache by gcc wrappers, since we need to know if we're
35652    # using ccache. Instead ccache usage must be controlled by a configure option.
35653    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35654    if test "x$COMPILER_BASENAME" = "xccache"; then
35655      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35656$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35657      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35658    fi
35659  fi
35660
35661
35662  COMPILER=$CXX
35663  COMPILER_NAME=$COMPILER_NAME
35664
35665  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35666    # cc -V output typically looks like
35667    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35668    # or
35669    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35670    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35671    # Check that this is likely to be the Solaris Studio cc.
35672    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35673    if test $? -ne 0; then
35674      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35675      { $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
35676$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35677      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35678$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35679      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35680$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35681      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35682    fi
35683    # Remove usage instructions (if present), and
35684    # collapse compiler output into a single line
35685    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35686        $SED -e 's/ *[Uu]sage:.*//'`
35687    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35688        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35689  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35690    # xlc -qversion output typically looks like
35691    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35692    #     Version: 11.01.0000.0015
35693    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35694    # Check that this is likely to be the IBM XL C compiler.
35695    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35696    if test $? -ne 0; then
35697      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35698      { $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
35699$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35700      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35701$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35702      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35703$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35704      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35705    fi
35706    # Collapse compiler output into a single line
35707    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35708    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35709        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35710  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35711    # There is no specific version flag, but all output starts with a version string.
35712    # First line typically looks something like:
35713    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35714    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35715    # Check that this is likely to be Microsoft CL.EXE.
35716    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35717    if test $? -ne 0; then
35718      { $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
35719$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35720      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35721$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35722      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35723    fi
35724    # Collapse compiler output into a single line
35725    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35726    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35727        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35728  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35729    # gcc --version output typically looks like
35730    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35731    #     Copyright (C) 2013 Free Software Foundation, Inc.
35732    #     This is free software; see the source for copying conditions.  There is NO
35733    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35734    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35735    # Check that this is likely to be GCC.
35736    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35737    if test $? -ne 0; then
35738      { $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
35739$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35740      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35741$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35742      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35743    fi
35744    # Remove Copyright and legalese from version string, and
35745    # collapse into a single line
35746    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35747        $SED -e 's/ *Copyright .*//'`
35748    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35749        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35750  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35751    # clang --version output typically looks like
35752    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35753    #    clang version 3.3 (tags/RELEASE_33/final)
35754    # or
35755    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35756    #    Target: x86_64-pc-linux-gnu
35757    #    Thread model: posix
35758    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35759    # Check that this is likely to be clang
35760    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35761    if test $? -ne 0; then
35762      { $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
35763$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35764      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35765$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35766      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35767    fi
35768    # Collapse compiler output into a single line
35769    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35770    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35771        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35772  else
35773      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35774  fi
35775  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35776  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35777  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35778  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35779
35780  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35781$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35782
35783
35784  # Now that we have resolved CXX ourself, let autoconf have its go at it
35785  ac_ext=cpp
35786ac_cpp='$CXXCPP $CPPFLAGS'
35787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35790if test -z "$CXX"; then
35791  if test -n "$CCC"; then
35792    CXX=$CCC
35793  else
35794    if test -n "$ac_tool_prefix"; then
35795  for ac_prog in $CXX
35796  do
35797    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35798set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35800$as_echo_n "checking for $ac_word... " >&6; }
35801if ${ac_cv_prog_CXX+:} false; then :
35802  $as_echo_n "(cached) " >&6
35803else
35804  if test -n "$CXX"; then
35805  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35806else
35807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35808for as_dir in $PATH
35809do
35810  IFS=$as_save_IFS
35811  test -z "$as_dir" && as_dir=.
35812    for ac_exec_ext in '' $ac_executable_extensions; do
35813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35814    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35816    break 2
35817  fi
35818done
35819  done
35820IFS=$as_save_IFS
35821
35822fi
35823fi
35824CXX=$ac_cv_prog_CXX
35825if test -n "$CXX"; then
35826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35827$as_echo "$CXX" >&6; }
35828else
35829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35830$as_echo "no" >&6; }
35831fi
35832
35833
35834    test -n "$CXX" && break
35835  done
35836fi
35837if test -z "$CXX"; then
35838  ac_ct_CXX=$CXX
35839  for ac_prog in $CXX
35840do
35841  # Extract the first word of "$ac_prog", so it can be a program name with args.
35842set dummy $ac_prog; ac_word=$2
35843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35844$as_echo_n "checking for $ac_word... " >&6; }
35845if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35846  $as_echo_n "(cached) " >&6
35847else
35848  if test -n "$ac_ct_CXX"; then
35849  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35850else
35851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35852for as_dir in $PATH
35853do
35854  IFS=$as_save_IFS
35855  test -z "$as_dir" && as_dir=.
35856    for ac_exec_ext in '' $ac_executable_extensions; do
35857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35858    ac_cv_prog_ac_ct_CXX="$ac_prog"
35859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35860    break 2
35861  fi
35862done
35863  done
35864IFS=$as_save_IFS
35865
35866fi
35867fi
35868ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35869if test -n "$ac_ct_CXX"; then
35870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35871$as_echo "$ac_ct_CXX" >&6; }
35872else
35873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35874$as_echo "no" >&6; }
35875fi
35876
35877
35878  test -n "$ac_ct_CXX" && break
35879done
35880
35881  if test "x$ac_ct_CXX" = x; then
35882    CXX="g++"
35883  else
35884    case $cross_compiling:$ac_tool_warned in
35885yes:)
35886{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35887$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35888ac_tool_warned=yes ;;
35889esac
35890    CXX=$ac_ct_CXX
35891  fi
35892fi
35893
35894  fi
35895fi
35896# Provide some information about the compiler.
35897$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35898set X $ac_compile
35899ac_compiler=$2
35900for ac_option in --version -v -V -qversion; do
35901  { { ac_try="$ac_compiler $ac_option >&5"
35902case "(($ac_try" in
35903  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35904  *) ac_try_echo=$ac_try;;
35905esac
35906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35907$as_echo "$ac_try_echo"; } >&5
35908  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35909  ac_status=$?
35910  if test -s conftest.err; then
35911    sed '10a\
35912... rest of stderr output deleted ...
35913         10q' conftest.err >conftest.er1
35914    cat conftest.er1 >&5
35915  fi
35916  rm -f conftest.er1 conftest.err
35917  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35918  test $ac_status = 0; }
35919done
35920
35921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35922$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35923if ${ac_cv_cxx_compiler_gnu+:} false; then :
35924  $as_echo_n "(cached) " >&6
35925else
35926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35927/* end confdefs.h.  */
35928
35929int
35930main ()
35931{
35932#ifndef __GNUC__
35933       choke me
35934#endif
35935
35936  ;
35937  return 0;
35938}
35939_ACEOF
35940if ac_fn_cxx_try_compile "$LINENO"; then :
35941  ac_compiler_gnu=yes
35942else
35943  ac_compiler_gnu=no
35944fi
35945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35946ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35947
35948fi
35949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35950$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35951if test $ac_compiler_gnu = yes; then
35952  GXX=yes
35953else
35954  GXX=
35955fi
35956ac_test_CXXFLAGS=${CXXFLAGS+set}
35957ac_save_CXXFLAGS=$CXXFLAGS
35958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35959$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35960if ${ac_cv_prog_cxx_g+:} false; then :
35961  $as_echo_n "(cached) " >&6
35962else
35963  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35964   ac_cxx_werror_flag=yes
35965   ac_cv_prog_cxx_g=no
35966   CXXFLAGS="-g"
35967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35968/* end confdefs.h.  */
35969
35970int
35971main ()
35972{
35973
35974  ;
35975  return 0;
35976}
35977_ACEOF
35978if ac_fn_cxx_try_compile "$LINENO"; then :
35979  ac_cv_prog_cxx_g=yes
35980else
35981  CXXFLAGS=""
35982      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35983/* end confdefs.h.  */
35984
35985int
35986main ()
35987{
35988
35989  ;
35990  return 0;
35991}
35992_ACEOF
35993if ac_fn_cxx_try_compile "$LINENO"; then :
35994
35995else
35996  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35997	 CXXFLAGS="-g"
35998	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35999/* end confdefs.h.  */
36000
36001int
36002main ()
36003{
36004
36005  ;
36006  return 0;
36007}
36008_ACEOF
36009if ac_fn_cxx_try_compile "$LINENO"; then :
36010  ac_cv_prog_cxx_g=yes
36011fi
36012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36013fi
36014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36015fi
36016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36017   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36018fi
36019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36020$as_echo "$ac_cv_prog_cxx_g" >&6; }
36021if test "$ac_test_CXXFLAGS" = set; then
36022  CXXFLAGS=$ac_save_CXXFLAGS
36023elif test $ac_cv_prog_cxx_g = yes; then
36024  if test "$GXX" = yes; then
36025    CXXFLAGS="-g -O2"
36026  else
36027    CXXFLAGS="-g"
36028  fi
36029else
36030  if test "$GXX" = yes; then
36031    CXXFLAGS="-O2"
36032  else
36033    CXXFLAGS=
36034  fi
36035fi
36036ac_ext=cpp
36037ac_cpp='$CXXCPP $CPPFLAGS'
36038ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36039ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36040ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36041
36042
36043  # This is the compiler version number on the form X.Y[.Z]
36044
36045
36046
36047
36048  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36049    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36050$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36051    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36052$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36053  fi
36054
36055  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36056  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36057    { $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
36058$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;}
36059  fi
36060
36061  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36062    { $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
36063$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36064  fi
36065
36066  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36067
36068
36069  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
36117
36118
36119    # Execute function body
36120
36121  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36122  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36123
36124  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36125    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36126  fi
36127
36128  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36129    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36130  fi
36131
36132  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36133  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36134
36135  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36136    :
36137
36138  else
36139    :
36140
36141          { $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
36142$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36143
36144
36145  fi
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157
36158
36159
36160  fi
36161
36162  #
36163  # Setup the preprocessor (CPP and CXXCPP)
36164  #
36165  ac_ext=c
36166ac_cpp='$CPP $CPPFLAGS'
36167ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36168ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36169ac_compiler_gnu=$ac_cv_c_compiler_gnu
36170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36171$as_echo_n "checking how to run the C preprocessor... " >&6; }
36172# On Suns, sometimes $CPP names a directory.
36173if test -n "$CPP" && test -d "$CPP"; then
36174  CPP=
36175fi
36176if test -z "$CPP"; then
36177  if ${ac_cv_prog_CPP+:} false; then :
36178  $as_echo_n "(cached) " >&6
36179else
36180      # Double quotes because CPP needs to be expanded
36181    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36182    do
36183      ac_preproc_ok=false
36184for ac_c_preproc_warn_flag in '' yes
36185do
36186  # Use a header file that comes with gcc, so configuring glibc
36187  # with a fresh cross-compiler works.
36188  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36189  # <limits.h> exists even on freestanding compilers.
36190  # On the NeXT, cc -E runs the code through the compiler's parser,
36191  # not just through cpp. "Syntax error" is here to catch this case.
36192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36193/* end confdefs.h.  */
36194#ifdef __STDC__
36195# include <limits.h>
36196#else
36197# include <assert.h>
36198#endif
36199		     Syntax error
36200_ACEOF
36201if ac_fn_c_try_cpp "$LINENO"; then :
36202
36203else
36204  # Broken: fails on valid input.
36205continue
36206fi
36207rm -f conftest.err conftest.i conftest.$ac_ext
36208
36209  # OK, works on sane cases.  Now check whether nonexistent headers
36210  # can be detected and how.
36211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36212/* end confdefs.h.  */
36213#include <ac_nonexistent.h>
36214_ACEOF
36215if ac_fn_c_try_cpp "$LINENO"; then :
36216  # Broken: success on invalid input.
36217continue
36218else
36219  # Passes both tests.
36220ac_preproc_ok=:
36221break
36222fi
36223rm -f conftest.err conftest.i conftest.$ac_ext
36224
36225done
36226# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36227rm -f conftest.i conftest.err conftest.$ac_ext
36228if $ac_preproc_ok; then :
36229  break
36230fi
36231
36232    done
36233    ac_cv_prog_CPP=$CPP
36234
36235fi
36236  CPP=$ac_cv_prog_CPP
36237else
36238  ac_cv_prog_CPP=$CPP
36239fi
36240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36241$as_echo "$CPP" >&6; }
36242ac_preproc_ok=false
36243for ac_c_preproc_warn_flag in '' yes
36244do
36245  # Use a header file that comes with gcc, so configuring glibc
36246  # with a fresh cross-compiler works.
36247  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36248  # <limits.h> exists even on freestanding compilers.
36249  # On the NeXT, cc -E runs the code through the compiler's parser,
36250  # not just through cpp. "Syntax error" is here to catch this case.
36251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36252/* end confdefs.h.  */
36253#ifdef __STDC__
36254# include <limits.h>
36255#else
36256# include <assert.h>
36257#endif
36258		     Syntax error
36259_ACEOF
36260if ac_fn_c_try_cpp "$LINENO"; then :
36261
36262else
36263  # Broken: fails on valid input.
36264continue
36265fi
36266rm -f conftest.err conftest.i conftest.$ac_ext
36267
36268  # OK, works on sane cases.  Now check whether nonexistent headers
36269  # can be detected and how.
36270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36271/* end confdefs.h.  */
36272#include <ac_nonexistent.h>
36273_ACEOF
36274if ac_fn_c_try_cpp "$LINENO"; then :
36275  # Broken: success on invalid input.
36276continue
36277else
36278  # Passes both tests.
36279ac_preproc_ok=:
36280break
36281fi
36282rm -f conftest.err conftest.i conftest.$ac_ext
36283
36284done
36285# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36286rm -f conftest.i conftest.err conftest.$ac_ext
36287if $ac_preproc_ok; then :
36288
36289else
36290  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36292as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36293See \`config.log' for more details" "$LINENO" 5; }
36294fi
36295
36296ac_ext=cpp
36297ac_cpp='$CXXCPP $CPPFLAGS'
36298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36301
36302
36303  # Only process if variable expands to non-empty
36304
36305  if test "x$CPP" != x; then
36306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36307
36308  # First separate the path from the arguments. This will split at the first
36309  # space.
36310  complete="$CPP"
36311  path="${complete%% *}"
36312  tmp="$complete EOL"
36313  arguments="${tmp#* }"
36314
36315  # Input might be given as Windows format, start by converting to
36316  # unix format.
36317  new_path=`$CYGPATH -u "$path"`
36318
36319  # Now try to locate executable using which
36320  new_path=`$WHICH "$new_path" 2> /dev/null`
36321  # bat and cmd files are not always considered executable in cygwin causing which
36322  # to not find them
36323  if test "x$new_path" = x \
36324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36326    new_path=`$CYGPATH -u "$path"`
36327  fi
36328  if test "x$new_path" = x; then
36329    # Oops. Which didn't find the executable.
36330    # The splitting of arguments from the executable at a space might have been incorrect,
36331    # since paths with space are more likely in Windows. Give it another try with the whole
36332    # argument.
36333    path="$complete"
36334    arguments="EOL"
36335    new_path=`$CYGPATH -u "$path"`
36336    new_path=`$WHICH "$new_path" 2> /dev/null`
36337    # bat and cmd files are not always considered executable in cygwin causing which
36338    # to not find them
36339    if test "x$new_path" = x \
36340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36342      new_path=`$CYGPATH -u "$path"`
36343    fi
36344    if test "x$new_path" = x; then
36345      # It's still not found. Now this is an unrecoverable error.
36346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36347$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36348      has_space=`$ECHO "$complete" | $GREP " "`
36349      if test "x$has_space" != x; then
36350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36352      fi
36353      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36354    fi
36355  fi
36356
36357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36360  # "foo.exe" is OK but "foo" is an error.
36361  #
36362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36363  # It is also a way to make sure we got the proper file name for the real test later on.
36364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36365  if test "x$test_shortpath" = x; then
36366    # Short path failed, file does not exist as specified.
36367    # Try adding .exe or .cmd
36368    if test -f "${new_path}.exe"; then
36369      input_to_shortpath="${new_path}.exe"
36370    elif test -f "${new_path}.cmd"; then
36371      input_to_shortpath="${new_path}.cmd"
36372    else
36373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36374$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36377      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36378    fi
36379  else
36380    input_to_shortpath="$new_path"
36381  fi
36382
36383  # Call helper function which possibly converts this using DOS-style short mode.
36384  # If so, the updated path is stored in $new_path.
36385  new_path="$input_to_shortpath"
36386
36387  input_path="$input_to_shortpath"
36388  # Check if we need to convert this using DOS-style short mode. If the path
36389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36390  # take no chances and rewrite it.
36391  # Note: m4 eats our [], so we need to use [ and ] instead.
36392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36393  if test "x$has_forbidden_chars" != x; then
36394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36398      # Going to short mode and back again did indeed matter. Since short mode is
36399      # case insensitive, let's make it lowercase to improve readability.
36400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36401      # Now convert it back to Unix-style (cygpath)
36402      input_path=`$CYGPATH -u "$shortmode_path"`
36403      new_path="$input_path"
36404    fi
36405  fi
36406
36407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36408  if test "x$test_cygdrive_prefix" = x; then
36409    # As a simple fix, exclude /usr/bin since it's not a real path.
36410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36412      # a path prefixed by /cygdrive for fixpath to work.
36413      new_path="$CYGWIN_ROOT_PATH$input_path"
36414    fi
36415  fi
36416
36417  # remove trailing .exe if any
36418  new_path="${new_path/%.exe/}"
36419
36420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36421
36422  # First separate the path from the arguments. This will split at the first
36423  # space.
36424  complete="$CPP"
36425  path="${complete%% *}"
36426  tmp="$complete EOL"
36427  arguments="${tmp#* }"
36428
36429  # Input might be given as Windows format, start by converting to
36430  # unix format.
36431  new_path="$path"
36432
36433  windows_path="$new_path"
36434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36435    unix_path=`$CYGPATH -u "$windows_path"`
36436    new_path="$unix_path"
36437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36439    new_path="$unix_path"
36440  fi
36441
36442
36443  # Now try to locate executable using which
36444  new_path=`$WHICH "$new_path" 2> /dev/null`
36445
36446  if test "x$new_path" = x; then
36447    # Oops. Which didn't find the executable.
36448    # The splitting of arguments from the executable at a space might have been incorrect,
36449    # since paths with space are more likely in Windows. Give it another try with the whole
36450    # argument.
36451    path="$complete"
36452    arguments="EOL"
36453    new_path="$path"
36454
36455  windows_path="$new_path"
36456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36457    unix_path=`$CYGPATH -u "$windows_path"`
36458    new_path="$unix_path"
36459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36461    new_path="$unix_path"
36462  fi
36463
36464
36465    new_path=`$WHICH "$new_path" 2> /dev/null`
36466    # bat and cmd files are not always considered executable in MSYS causing which
36467    # to not find them
36468    if test "x$new_path" = x \
36469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36471      new_path="$path"
36472
36473  windows_path="$new_path"
36474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36475    unix_path=`$CYGPATH -u "$windows_path"`
36476    new_path="$unix_path"
36477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36479    new_path="$unix_path"
36480  fi
36481
36482    fi
36483
36484    if test "x$new_path" = x; then
36485      # It's still not found. Now this is an unrecoverable error.
36486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36487$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36488      has_space=`$ECHO "$complete" | $GREP " "`
36489      if test "x$has_space" != x; then
36490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36492      fi
36493      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36494    fi
36495  fi
36496
36497  # Now new_path has a complete unix path to the binary
36498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36499    # Keep paths in /bin as-is, but remove trailing .exe if any
36500    new_path="${new_path/%.exe/}"
36501    # Do not save /bin paths to all_fixpath_prefixes!
36502  else
36503    # Not in mixed or Windows style, start by that.
36504    new_path=`cmd //c echo $new_path`
36505
36506  input_path="$new_path"
36507  # Check if we need to convert this using DOS-style short mode. If the path
36508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36509  # take no chances and rewrite it.
36510  # Note: m4 eats our [], so we need to use [ and ] instead.
36511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36512  if test "x$has_forbidden_chars" != x; then
36513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36515  fi
36516
36517    # Output is in $new_path
36518
36519  windows_path="$new_path"
36520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36521    unix_path=`$CYGPATH -u "$windows_path"`
36522    new_path="$unix_path"
36523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36525    new_path="$unix_path"
36526  fi
36527
36528    # remove trailing .exe if any
36529    new_path="${new_path/%.exe/}"
36530
36531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36533  fi
36534
36535    else
36536      # We're on a unix platform. Hooray! :)
36537      # First separate the path from the arguments. This will split at the first
36538      # space.
36539      complete="$CPP"
36540      path="${complete%% *}"
36541      tmp="$complete EOL"
36542      arguments="${tmp#* }"
36543
36544      # Cannot rely on the command "which" here since it doesn't always work.
36545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36546      if test -z "$is_absolute_path"; then
36547        # Path to executable is not absolute. Find it.
36548        IFS_save="$IFS"
36549        IFS=:
36550        for p in $PATH; do
36551          if test -f "$p/$path" && test -x "$p/$path"; then
36552            new_path="$p/$path"
36553            break
36554          fi
36555        done
36556        IFS="$IFS_save"
36557      else
36558        # This is an absolute path, we can use it without further modifications.
36559        new_path="$path"
36560      fi
36561
36562      if test "x$new_path" = x; then
36563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36564$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36565        has_space=`$ECHO "$complete" | $GREP " "`
36566        if test "x$has_space" != x; then
36567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36569        fi
36570        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36571      fi
36572    fi
36573
36574    # Now join together the path and the arguments once again
36575    if test "x$arguments" != xEOL; then
36576      new_complete="$new_path ${arguments% *}"
36577    else
36578      new_complete="$new_path"
36579    fi
36580
36581    if test "x$complete" != "x$new_complete"; then
36582      CPP="$new_complete"
36583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36584$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36585    fi
36586  fi
36587
36588  ac_ext=cpp
36589ac_cpp='$CXXCPP $CPPFLAGS'
36590ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36591ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36592ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36594$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36595if test -z "$CXXCPP"; then
36596  if ${ac_cv_prog_CXXCPP+:} false; then :
36597  $as_echo_n "(cached) " >&6
36598else
36599      # Double quotes because CXXCPP needs to be expanded
36600    for CXXCPP in "$CXX -E" "/lib/cpp"
36601    do
36602      ac_preproc_ok=false
36603for ac_cxx_preproc_warn_flag in '' yes
36604do
36605  # Use a header file that comes with gcc, so configuring glibc
36606  # with a fresh cross-compiler works.
36607  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36608  # <limits.h> exists even on freestanding compilers.
36609  # On the NeXT, cc -E runs the code through the compiler's parser,
36610  # not just through cpp. "Syntax error" is here to catch this case.
36611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36612/* end confdefs.h.  */
36613#ifdef __STDC__
36614# include <limits.h>
36615#else
36616# include <assert.h>
36617#endif
36618		     Syntax error
36619_ACEOF
36620if ac_fn_cxx_try_cpp "$LINENO"; then :
36621
36622else
36623  # Broken: fails on valid input.
36624continue
36625fi
36626rm -f conftest.err conftest.i conftest.$ac_ext
36627
36628  # OK, works on sane cases.  Now check whether nonexistent headers
36629  # can be detected and how.
36630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36631/* end confdefs.h.  */
36632#include <ac_nonexistent.h>
36633_ACEOF
36634if ac_fn_cxx_try_cpp "$LINENO"; then :
36635  # Broken: success on invalid input.
36636continue
36637else
36638  # Passes both tests.
36639ac_preproc_ok=:
36640break
36641fi
36642rm -f conftest.err conftest.i conftest.$ac_ext
36643
36644done
36645# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36646rm -f conftest.i conftest.err conftest.$ac_ext
36647if $ac_preproc_ok; then :
36648  break
36649fi
36650
36651    done
36652    ac_cv_prog_CXXCPP=$CXXCPP
36653
36654fi
36655  CXXCPP=$ac_cv_prog_CXXCPP
36656else
36657  ac_cv_prog_CXXCPP=$CXXCPP
36658fi
36659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36660$as_echo "$CXXCPP" >&6; }
36661ac_preproc_ok=false
36662for ac_cxx_preproc_warn_flag in '' yes
36663do
36664  # Use a header file that comes with gcc, so configuring glibc
36665  # with a fresh cross-compiler works.
36666  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36667  # <limits.h> exists even on freestanding compilers.
36668  # On the NeXT, cc -E runs the code through the compiler's parser,
36669  # not just through cpp. "Syntax error" is here to catch this case.
36670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36671/* end confdefs.h.  */
36672#ifdef __STDC__
36673# include <limits.h>
36674#else
36675# include <assert.h>
36676#endif
36677		     Syntax error
36678_ACEOF
36679if ac_fn_cxx_try_cpp "$LINENO"; then :
36680
36681else
36682  # Broken: fails on valid input.
36683continue
36684fi
36685rm -f conftest.err conftest.i conftest.$ac_ext
36686
36687  # OK, works on sane cases.  Now check whether nonexistent headers
36688  # can be detected and how.
36689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36690/* end confdefs.h.  */
36691#include <ac_nonexistent.h>
36692_ACEOF
36693if ac_fn_cxx_try_cpp "$LINENO"; then :
36694  # Broken: success on invalid input.
36695continue
36696else
36697  # Passes both tests.
36698ac_preproc_ok=:
36699break
36700fi
36701rm -f conftest.err conftest.i conftest.$ac_ext
36702
36703done
36704# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36705rm -f conftest.i conftest.err conftest.$ac_ext
36706if $ac_preproc_ok; then :
36707
36708else
36709  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36711as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36712See \`config.log' for more details" "$LINENO" 5; }
36713fi
36714
36715ac_ext=cpp
36716ac_cpp='$CXXCPP $CPPFLAGS'
36717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36720
36721
36722  # Only process if variable expands to non-empty
36723
36724  if test "x$CXXCPP" != x; then
36725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36726
36727  # First separate the path from the arguments. This will split at the first
36728  # space.
36729  complete="$CXXCPP"
36730  path="${complete%% *}"
36731  tmp="$complete EOL"
36732  arguments="${tmp#* }"
36733
36734  # Input might be given as Windows format, start by converting to
36735  # unix format.
36736  new_path=`$CYGPATH -u "$path"`
36737
36738  # Now try to locate executable using which
36739  new_path=`$WHICH "$new_path" 2> /dev/null`
36740  # bat and cmd files are not always considered executable in cygwin causing which
36741  # to not find them
36742  if test "x$new_path" = x \
36743      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36744      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36745    new_path=`$CYGPATH -u "$path"`
36746  fi
36747  if test "x$new_path" = x; then
36748    # Oops. Which didn't find the executable.
36749    # The splitting of arguments from the executable at a space might have been incorrect,
36750    # since paths with space are more likely in Windows. Give it another try with the whole
36751    # argument.
36752    path="$complete"
36753    arguments="EOL"
36754    new_path=`$CYGPATH -u "$path"`
36755    new_path=`$WHICH "$new_path" 2> /dev/null`
36756    # bat and cmd files are not always considered executable in cygwin causing which
36757    # to not find them
36758    if test "x$new_path" = x \
36759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36761      new_path=`$CYGPATH -u "$path"`
36762    fi
36763    if test "x$new_path" = x; then
36764      # It's still not found. Now this is an unrecoverable error.
36765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36766$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36767      has_space=`$ECHO "$complete" | $GREP " "`
36768      if test "x$has_space" != x; then
36769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36771      fi
36772      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36773    fi
36774  fi
36775
36776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36779  # "foo.exe" is OK but "foo" is an error.
36780  #
36781  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36782  # It is also a way to make sure we got the proper file name for the real test later on.
36783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36784  if test "x$test_shortpath" = x; then
36785    # Short path failed, file does not exist as specified.
36786    # Try adding .exe or .cmd
36787    if test -f "${new_path}.exe"; then
36788      input_to_shortpath="${new_path}.exe"
36789    elif test -f "${new_path}.cmd"; then
36790      input_to_shortpath="${new_path}.cmd"
36791    else
36792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36793$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36796      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36797    fi
36798  else
36799    input_to_shortpath="$new_path"
36800  fi
36801
36802  # Call helper function which possibly converts this using DOS-style short mode.
36803  # If so, the updated path is stored in $new_path.
36804  new_path="$input_to_shortpath"
36805
36806  input_path="$input_to_shortpath"
36807  # Check if we need to convert this using DOS-style short mode. If the path
36808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36809  # take no chances and rewrite it.
36810  # Note: m4 eats our [], so we need to use [ and ] instead.
36811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36812  if test "x$has_forbidden_chars" != x; then
36813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36817      # Going to short mode and back again did indeed matter. Since short mode is
36818      # case insensitive, let's make it lowercase to improve readability.
36819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36820      # Now convert it back to Unix-style (cygpath)
36821      input_path=`$CYGPATH -u "$shortmode_path"`
36822      new_path="$input_path"
36823    fi
36824  fi
36825
36826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36827  if test "x$test_cygdrive_prefix" = x; then
36828    # As a simple fix, exclude /usr/bin since it's not a real path.
36829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36831      # a path prefixed by /cygdrive for fixpath to work.
36832      new_path="$CYGWIN_ROOT_PATH$input_path"
36833    fi
36834  fi
36835
36836  # remove trailing .exe if any
36837  new_path="${new_path/%.exe/}"
36838
36839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36840
36841  # First separate the path from the arguments. This will split at the first
36842  # space.
36843  complete="$CXXCPP"
36844  path="${complete%% *}"
36845  tmp="$complete EOL"
36846  arguments="${tmp#* }"
36847
36848  # Input might be given as Windows format, start by converting to
36849  # unix format.
36850  new_path="$path"
36851
36852  windows_path="$new_path"
36853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36854    unix_path=`$CYGPATH -u "$windows_path"`
36855    new_path="$unix_path"
36856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36858    new_path="$unix_path"
36859  fi
36860
36861
36862  # Now try to locate executable using which
36863  new_path=`$WHICH "$new_path" 2> /dev/null`
36864
36865  if test "x$new_path" = x; then
36866    # Oops. Which didn't find the executable.
36867    # The splitting of arguments from the executable at a space might have been incorrect,
36868    # since paths with space are more likely in Windows. Give it another try with the whole
36869    # argument.
36870    path="$complete"
36871    arguments="EOL"
36872    new_path="$path"
36873
36874  windows_path="$new_path"
36875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36876    unix_path=`$CYGPATH -u "$windows_path"`
36877    new_path="$unix_path"
36878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36880    new_path="$unix_path"
36881  fi
36882
36883
36884    new_path=`$WHICH "$new_path" 2> /dev/null`
36885    # bat and cmd files are not always considered executable in MSYS causing which
36886    # to not find them
36887    if test "x$new_path" = x \
36888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36890      new_path="$path"
36891
36892  windows_path="$new_path"
36893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36894    unix_path=`$CYGPATH -u "$windows_path"`
36895    new_path="$unix_path"
36896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36898    new_path="$unix_path"
36899  fi
36900
36901    fi
36902
36903    if test "x$new_path" = x; then
36904      # It's still not found. Now this is an unrecoverable error.
36905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36906$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36907      has_space=`$ECHO "$complete" | $GREP " "`
36908      if test "x$has_space" != x; then
36909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36911      fi
36912      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36913    fi
36914  fi
36915
36916  # Now new_path has a complete unix path to the binary
36917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36918    # Keep paths in /bin as-is, but remove trailing .exe if any
36919    new_path="${new_path/%.exe/}"
36920    # Do not save /bin paths to all_fixpath_prefixes!
36921  else
36922    # Not in mixed or Windows style, start by that.
36923    new_path=`cmd //c echo $new_path`
36924
36925  input_path="$new_path"
36926  # Check if we need to convert this using DOS-style short mode. If the path
36927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36928  # take no chances and rewrite it.
36929  # Note: m4 eats our [], so we need to use [ and ] instead.
36930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36931  if test "x$has_forbidden_chars" != x; then
36932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36934  fi
36935
36936    # Output is in $new_path
36937
36938  windows_path="$new_path"
36939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36940    unix_path=`$CYGPATH -u "$windows_path"`
36941    new_path="$unix_path"
36942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36944    new_path="$unix_path"
36945  fi
36946
36947    # remove trailing .exe if any
36948    new_path="${new_path/%.exe/}"
36949
36950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36952  fi
36953
36954    else
36955      # We're on a unix platform. Hooray! :)
36956      # First separate the path from the arguments. This will split at the first
36957      # space.
36958      complete="$CXXCPP"
36959      path="${complete%% *}"
36960      tmp="$complete EOL"
36961      arguments="${tmp#* }"
36962
36963      # Cannot rely on the command "which" here since it doesn't always work.
36964      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36965      if test -z "$is_absolute_path"; then
36966        # Path to executable is not absolute. Find it.
36967        IFS_save="$IFS"
36968        IFS=:
36969        for p in $PATH; do
36970          if test -f "$p/$path" && test -x "$p/$path"; then
36971            new_path="$p/$path"
36972            break
36973          fi
36974        done
36975        IFS="$IFS_save"
36976      else
36977        # This is an absolute path, we can use it without further modifications.
36978        new_path="$path"
36979      fi
36980
36981      if test "x$new_path" = x; then
36982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36983$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36984        has_space=`$ECHO "$complete" | $GREP " "`
36985        if test "x$has_space" != x; then
36986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36988        fi
36989        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36990      fi
36991    fi
36992
36993    # Now join together the path and the arguments once again
36994    if test "x$arguments" != xEOL; then
36995      new_complete="$new_path ${arguments% *}"
36996    else
36997      new_complete="$new_path"
36998    fi
36999
37000    if test "x$complete" != "x$new_complete"; then
37001      CXXCPP="$new_complete"
37002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37003$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37004    fi
37005  fi
37006
37007
37008  #
37009  # Setup the linker (LD)
37010  #
37011  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37012    # In the Microsoft toolchain we have a separate LD command "link".
37013    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37014    # a cygwin program for something completely different.
37015    # Extract the first word of "link", so it can be a program name with args.
37016set dummy link; ac_word=$2
37017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37018$as_echo_n "checking for $ac_word... " >&6; }
37019if ${ac_cv_prog_LD+:} false; then :
37020  $as_echo_n "(cached) " >&6
37021else
37022  if test -n "$LD"; then
37023  ac_cv_prog_LD="$LD" # Let the user override the test.
37024else
37025  ac_prog_rejected=no
37026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37027for as_dir in $PATH
37028do
37029  IFS=$as_save_IFS
37030  test -z "$as_dir" && as_dir=.
37031    for ac_exec_ext in '' $ac_executable_extensions; do
37032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37033    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37034       ac_prog_rejected=yes
37035       continue
37036     fi
37037    ac_cv_prog_LD="link"
37038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37039    break 2
37040  fi
37041done
37042  done
37043IFS=$as_save_IFS
37044
37045if test $ac_prog_rejected = yes; then
37046  # We found a bogon in the path, so make sure we never use it.
37047  set dummy $ac_cv_prog_LD
37048  shift
37049  if test $# != 0; then
37050    # We chose a different compiler from the bogus one.
37051    # However, it has the same basename, so the bogon will be chosen
37052    # first if we set LD to just the basename; use the full file name.
37053    shift
37054    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37055  fi
37056fi
37057fi
37058fi
37059LD=$ac_cv_prog_LD
37060if test -n "$LD"; then
37061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37062$as_echo "$LD" >&6; }
37063else
37064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37065$as_echo "no" >&6; }
37066fi
37067
37068
37069
37070  # Only process if variable expands to non-empty
37071
37072  if test "x$LD" != x; then
37073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37074
37075  # First separate the path from the arguments. This will split at the first
37076  # space.
37077  complete="$LD"
37078  path="${complete%% *}"
37079  tmp="$complete EOL"
37080  arguments="${tmp#* }"
37081
37082  # Input might be given as Windows format, start by converting to
37083  # unix format.
37084  new_path=`$CYGPATH -u "$path"`
37085
37086  # Now try to locate executable using which
37087  new_path=`$WHICH "$new_path" 2> /dev/null`
37088  # bat and cmd files are not always considered executable in cygwin causing which
37089  # to not find them
37090  if test "x$new_path" = x \
37091      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37092      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37093    new_path=`$CYGPATH -u "$path"`
37094  fi
37095  if test "x$new_path" = x; then
37096    # Oops. Which didn't find the executable.
37097    # The splitting of arguments from the executable at a space might have been incorrect,
37098    # since paths with space are more likely in Windows. Give it another try with the whole
37099    # argument.
37100    path="$complete"
37101    arguments="EOL"
37102    new_path=`$CYGPATH -u "$path"`
37103    new_path=`$WHICH "$new_path" 2> /dev/null`
37104    # bat and cmd files are not always considered executable in cygwin causing which
37105    # to not find them
37106    if test "x$new_path" = x \
37107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37109      new_path=`$CYGPATH -u "$path"`
37110    fi
37111    if test "x$new_path" = x; then
37112      # It's still not found. Now this is an unrecoverable error.
37113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37114$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37115      has_space=`$ECHO "$complete" | $GREP " "`
37116      if test "x$has_space" != x; then
37117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37119      fi
37120      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37121    fi
37122  fi
37123
37124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37127  # "foo.exe" is OK but "foo" is an error.
37128  #
37129  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37130  # It is also a way to make sure we got the proper file name for the real test later on.
37131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37132  if test "x$test_shortpath" = x; then
37133    # Short path failed, file does not exist as specified.
37134    # Try adding .exe or .cmd
37135    if test -f "${new_path}.exe"; then
37136      input_to_shortpath="${new_path}.exe"
37137    elif test -f "${new_path}.cmd"; then
37138      input_to_shortpath="${new_path}.cmd"
37139    else
37140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37141$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37142      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37143$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37144      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37145    fi
37146  else
37147    input_to_shortpath="$new_path"
37148  fi
37149
37150  # Call helper function which possibly converts this using DOS-style short mode.
37151  # If so, the updated path is stored in $new_path.
37152  new_path="$input_to_shortpath"
37153
37154  input_path="$input_to_shortpath"
37155  # Check if we need to convert this using DOS-style short mode. If the path
37156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37157  # take no chances and rewrite it.
37158  # Note: m4 eats our [], so we need to use [ and ] instead.
37159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37160  if test "x$has_forbidden_chars" != x; then
37161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37165      # Going to short mode and back again did indeed matter. Since short mode is
37166      # case insensitive, let's make it lowercase to improve readability.
37167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37168      # Now convert it back to Unix-style (cygpath)
37169      input_path=`$CYGPATH -u "$shortmode_path"`
37170      new_path="$input_path"
37171    fi
37172  fi
37173
37174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37175  if test "x$test_cygdrive_prefix" = x; then
37176    # As a simple fix, exclude /usr/bin since it's not a real path.
37177    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37179      # a path prefixed by /cygdrive for fixpath to work.
37180      new_path="$CYGWIN_ROOT_PATH$input_path"
37181    fi
37182  fi
37183
37184  # remove trailing .exe if any
37185  new_path="${new_path/%.exe/}"
37186
37187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37188
37189  # First separate the path from the arguments. This will split at the first
37190  # space.
37191  complete="$LD"
37192  path="${complete%% *}"
37193  tmp="$complete EOL"
37194  arguments="${tmp#* }"
37195
37196  # Input might be given as Windows format, start by converting to
37197  # unix format.
37198  new_path="$path"
37199
37200  windows_path="$new_path"
37201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37202    unix_path=`$CYGPATH -u "$windows_path"`
37203    new_path="$unix_path"
37204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37206    new_path="$unix_path"
37207  fi
37208
37209
37210  # Now try to locate executable using which
37211  new_path=`$WHICH "$new_path" 2> /dev/null`
37212
37213  if test "x$new_path" = x; then
37214    # Oops. Which didn't find the executable.
37215    # The splitting of arguments from the executable at a space might have been incorrect,
37216    # since paths with space are more likely in Windows. Give it another try with the whole
37217    # argument.
37218    path="$complete"
37219    arguments="EOL"
37220    new_path="$path"
37221
37222  windows_path="$new_path"
37223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37224    unix_path=`$CYGPATH -u "$windows_path"`
37225    new_path="$unix_path"
37226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37228    new_path="$unix_path"
37229  fi
37230
37231
37232    new_path=`$WHICH "$new_path" 2> /dev/null`
37233    # bat and cmd files are not always considered executable in MSYS causing which
37234    # to not find them
37235    if test "x$new_path" = x \
37236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37238      new_path="$path"
37239
37240  windows_path="$new_path"
37241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37242    unix_path=`$CYGPATH -u "$windows_path"`
37243    new_path="$unix_path"
37244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37246    new_path="$unix_path"
37247  fi
37248
37249    fi
37250
37251    if test "x$new_path" = x; then
37252      # It's still not found. Now this is an unrecoverable error.
37253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37254$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37255      has_space=`$ECHO "$complete" | $GREP " "`
37256      if test "x$has_space" != x; then
37257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37259      fi
37260      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37261    fi
37262  fi
37263
37264  # Now new_path has a complete unix path to the binary
37265  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37266    # Keep paths in /bin as-is, but remove trailing .exe if any
37267    new_path="${new_path/%.exe/}"
37268    # Do not save /bin paths to all_fixpath_prefixes!
37269  else
37270    # Not in mixed or Windows style, start by that.
37271    new_path=`cmd //c echo $new_path`
37272
37273  input_path="$new_path"
37274  # Check if we need to convert this using DOS-style short mode. If the path
37275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37276  # take no chances and rewrite it.
37277  # Note: m4 eats our [], so we need to use [ and ] instead.
37278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37279  if test "x$has_forbidden_chars" != x; then
37280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37282  fi
37283
37284    # Output is in $new_path
37285
37286  windows_path="$new_path"
37287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37288    unix_path=`$CYGPATH -u "$windows_path"`
37289    new_path="$unix_path"
37290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37292    new_path="$unix_path"
37293  fi
37294
37295    # remove trailing .exe if any
37296    new_path="${new_path/%.exe/}"
37297
37298    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37299    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37300  fi
37301
37302    else
37303      # We're on a unix platform. Hooray! :)
37304      # First separate the path from the arguments. This will split at the first
37305      # space.
37306      complete="$LD"
37307      path="${complete%% *}"
37308      tmp="$complete EOL"
37309      arguments="${tmp#* }"
37310
37311      # Cannot rely on the command "which" here since it doesn't always work.
37312      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37313      if test -z "$is_absolute_path"; then
37314        # Path to executable is not absolute. Find it.
37315        IFS_save="$IFS"
37316        IFS=:
37317        for p in $PATH; do
37318          if test -f "$p/$path" && test -x "$p/$path"; then
37319            new_path="$p/$path"
37320            break
37321          fi
37322        done
37323        IFS="$IFS_save"
37324      else
37325        # This is an absolute path, we can use it without further modifications.
37326        new_path="$path"
37327      fi
37328
37329      if test "x$new_path" = x; then
37330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37331$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37332        has_space=`$ECHO "$complete" | $GREP " "`
37333        if test "x$has_space" != x; then
37334          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37335$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37336        fi
37337        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37338      fi
37339    fi
37340
37341    # Now join together the path and the arguments once again
37342    if test "x$arguments" != xEOL; then
37343      new_complete="$new_path ${arguments% *}"
37344    else
37345      new_complete="$new_path"
37346    fi
37347
37348    if test "x$complete" != "x$new_complete"; then
37349      LD="$new_complete"
37350      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37351$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37352    fi
37353  fi
37354
37355    # Verify that we indeed succeeded with this trick.
37356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37357$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37358    "$LD" --version > /dev/null
37359    if test $? -eq 0 ; then
37360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37361$as_echo "no" >&6; }
37362      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37363    else
37364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37365$as_echo "yes" >&6; }
37366    fi
37367    LDCXX="$LD"
37368  else
37369    # All other toolchains use the compiler to link.
37370    LD="$CC"
37371    LDCXX="$CXX"
37372  fi
37373
37374  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37375
37376
37377  #
37378  # Setup the assembler (AS)
37379  #
37380  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37381
37382
37383  # Publish this variable in the help.
37384
37385
37386  if [ -z "${AS+x}" ]; then
37387    # The variable is not set by user, try to locate tool using the code snippet
37388    for ac_prog in as
37389do
37390  # Extract the first word of "$ac_prog", so it can be a program name with args.
37391set dummy $ac_prog; ac_word=$2
37392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37393$as_echo_n "checking for $ac_word... " >&6; }
37394if ${ac_cv_path_AS+:} false; then :
37395  $as_echo_n "(cached) " >&6
37396else
37397  case $AS in
37398  [\\/]* | ?:[\\/]*)
37399  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37400  ;;
37401  *)
37402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37403for as_dir in $PATH
37404do
37405  IFS=$as_save_IFS
37406  test -z "$as_dir" && as_dir=.
37407    for ac_exec_ext in '' $ac_executable_extensions; do
37408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37409    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37411    break 2
37412  fi
37413done
37414  done
37415IFS=$as_save_IFS
37416
37417  ;;
37418esac
37419fi
37420AS=$ac_cv_path_AS
37421if test -n "$AS"; then
37422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37423$as_echo "$AS" >&6; }
37424else
37425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37426$as_echo "no" >&6; }
37427fi
37428
37429
37430  test -n "$AS" && break
37431done
37432
37433  else
37434    # The variable is set, but is it from the command line or the environment?
37435
37436    # Try to remove the string !AS! from our list.
37437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37439      # If it failed, the variable was not from the command line. Ignore it,
37440      # but warn the user (except for BASH, which is always set by the calling BASH).
37441      if test "xAS" != xBASH; then
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37443$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37444      fi
37445      # Try to locate tool using the code snippet
37446      for ac_prog in as
37447do
37448  # Extract the first word of "$ac_prog", so it can be a program name with args.
37449set dummy $ac_prog; ac_word=$2
37450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37451$as_echo_n "checking for $ac_word... " >&6; }
37452if ${ac_cv_path_AS+:} false; then :
37453  $as_echo_n "(cached) " >&6
37454else
37455  case $AS in
37456  [\\/]* | ?:[\\/]*)
37457  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37458  ;;
37459  *)
37460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37461for as_dir in $PATH
37462do
37463  IFS=$as_save_IFS
37464  test -z "$as_dir" && as_dir=.
37465    for ac_exec_ext in '' $ac_executable_extensions; do
37466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37467    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37469    break 2
37470  fi
37471done
37472  done
37473IFS=$as_save_IFS
37474
37475  ;;
37476esac
37477fi
37478AS=$ac_cv_path_AS
37479if test -n "$AS"; then
37480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37481$as_echo "$AS" >&6; }
37482else
37483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37484$as_echo "no" >&6; }
37485fi
37486
37487
37488  test -n "$AS" && break
37489done
37490
37491    else
37492      # If it succeeded, then it was overridden by the user. We will use it
37493      # for the tool.
37494
37495      # First remove it from the list of overridden variables, so we can test
37496      # for unknown variables in the end.
37497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37498
37499      # Check if we try to supply an empty value
37500      if test "x$AS" = x; then
37501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37502$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37504$as_echo_n "checking for AS... " >&6; }
37505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37506$as_echo "disabled" >&6; }
37507      else
37508        # Check if the provided tool contains a complete path.
37509        tool_specified="$AS"
37510        tool_basename="${tool_specified##*/}"
37511        if test "x$tool_basename" = "x$tool_specified"; then
37512          # A command without a complete path is provided, search $PATH.
37513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37514$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37515          # Extract the first word of "$tool_basename", so it can be a program name with args.
37516set dummy $tool_basename; ac_word=$2
37517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37518$as_echo_n "checking for $ac_word... " >&6; }
37519if ${ac_cv_path_AS+:} false; then :
37520  $as_echo_n "(cached) " >&6
37521else
37522  case $AS in
37523  [\\/]* | ?:[\\/]*)
37524  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37525  ;;
37526  *)
37527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37528for as_dir in $PATH
37529do
37530  IFS=$as_save_IFS
37531  test -z "$as_dir" && as_dir=.
37532    for ac_exec_ext in '' $ac_executable_extensions; do
37533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37534    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37536    break 2
37537  fi
37538done
37539  done
37540IFS=$as_save_IFS
37541
37542  ;;
37543esac
37544fi
37545AS=$ac_cv_path_AS
37546if test -n "$AS"; then
37547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37548$as_echo "$AS" >&6; }
37549else
37550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37551$as_echo "no" >&6; }
37552fi
37553
37554
37555          if test "x$AS" = x; then
37556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37557          fi
37558        else
37559          # Otherwise we believe it is a complete path. Use it as it is.
37560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37561$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37563$as_echo_n "checking for AS... " >&6; }
37564          if test ! -x "$tool_specified"; then
37565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37566$as_echo "not found" >&6; }
37567            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37568          fi
37569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37570$as_echo "$tool_specified" >&6; }
37571        fi
37572      fi
37573    fi
37574
37575  fi
37576
37577
37578
37579  # Only process if variable expands to non-empty
37580
37581  if test "x$AS" != x; then
37582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37583
37584  # First separate the path from the arguments. This will split at the first
37585  # space.
37586  complete="$AS"
37587  path="${complete%% *}"
37588  tmp="$complete EOL"
37589  arguments="${tmp#* }"
37590
37591  # Input might be given as Windows format, start by converting to
37592  # unix format.
37593  new_path=`$CYGPATH -u "$path"`
37594
37595  # Now try to locate executable using which
37596  new_path=`$WHICH "$new_path" 2> /dev/null`
37597  # bat and cmd files are not always considered executable in cygwin causing which
37598  # to not find them
37599  if test "x$new_path" = x \
37600      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37601      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37602    new_path=`$CYGPATH -u "$path"`
37603  fi
37604  if test "x$new_path" = x; then
37605    # Oops. Which didn't find the executable.
37606    # The splitting of arguments from the executable at a space might have been incorrect,
37607    # since paths with space are more likely in Windows. Give it another try with the whole
37608    # argument.
37609    path="$complete"
37610    arguments="EOL"
37611    new_path=`$CYGPATH -u "$path"`
37612    new_path=`$WHICH "$new_path" 2> /dev/null`
37613    # bat and cmd files are not always considered executable in cygwin causing which
37614    # to not find them
37615    if test "x$new_path" = x \
37616        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37617        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37618      new_path=`$CYGPATH -u "$path"`
37619    fi
37620    if test "x$new_path" = x; then
37621      # It's still not found. Now this is an unrecoverable error.
37622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37623$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37624      has_space=`$ECHO "$complete" | $GREP " "`
37625      if test "x$has_space" != x; then
37626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37628      fi
37629      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37630    fi
37631  fi
37632
37633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37636  # "foo.exe" is OK but "foo" is an error.
37637  #
37638  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37639  # It is also a way to make sure we got the proper file name for the real test later on.
37640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37641  if test "x$test_shortpath" = x; then
37642    # Short path failed, file does not exist as specified.
37643    # Try adding .exe or .cmd
37644    if test -f "${new_path}.exe"; then
37645      input_to_shortpath="${new_path}.exe"
37646    elif test -f "${new_path}.cmd"; then
37647      input_to_shortpath="${new_path}.cmd"
37648    else
37649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37650$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37651      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37652$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37653      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37654    fi
37655  else
37656    input_to_shortpath="$new_path"
37657  fi
37658
37659  # Call helper function which possibly converts this using DOS-style short mode.
37660  # If so, the updated path is stored in $new_path.
37661  new_path="$input_to_shortpath"
37662
37663  input_path="$input_to_shortpath"
37664  # Check if we need to convert this using DOS-style short mode. If the path
37665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37666  # take no chances and rewrite it.
37667  # Note: m4 eats our [], so we need to use [ and ] instead.
37668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37669  if test "x$has_forbidden_chars" != x; then
37670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37674      # Going to short mode and back again did indeed matter. Since short mode is
37675      # case insensitive, let's make it lowercase to improve readability.
37676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37677      # Now convert it back to Unix-style (cygpath)
37678      input_path=`$CYGPATH -u "$shortmode_path"`
37679      new_path="$input_path"
37680    fi
37681  fi
37682
37683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37684  if test "x$test_cygdrive_prefix" = x; then
37685    # As a simple fix, exclude /usr/bin since it's not a real path.
37686    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37688      # a path prefixed by /cygdrive for fixpath to work.
37689      new_path="$CYGWIN_ROOT_PATH$input_path"
37690    fi
37691  fi
37692
37693  # remove trailing .exe if any
37694  new_path="${new_path/%.exe/}"
37695
37696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37697
37698  # First separate the path from the arguments. This will split at the first
37699  # space.
37700  complete="$AS"
37701  path="${complete%% *}"
37702  tmp="$complete EOL"
37703  arguments="${tmp#* }"
37704
37705  # Input might be given as Windows format, start by converting to
37706  # unix format.
37707  new_path="$path"
37708
37709  windows_path="$new_path"
37710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37711    unix_path=`$CYGPATH -u "$windows_path"`
37712    new_path="$unix_path"
37713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37715    new_path="$unix_path"
37716  fi
37717
37718
37719  # Now try to locate executable using which
37720  new_path=`$WHICH "$new_path" 2> /dev/null`
37721
37722  if test "x$new_path" = x; then
37723    # Oops. Which didn't find the executable.
37724    # The splitting of arguments from the executable at a space might have been incorrect,
37725    # since paths with space are more likely in Windows. Give it another try with the whole
37726    # argument.
37727    path="$complete"
37728    arguments="EOL"
37729    new_path="$path"
37730
37731  windows_path="$new_path"
37732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37733    unix_path=`$CYGPATH -u "$windows_path"`
37734    new_path="$unix_path"
37735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37737    new_path="$unix_path"
37738  fi
37739
37740
37741    new_path=`$WHICH "$new_path" 2> /dev/null`
37742    # bat and cmd files are not always considered executable in MSYS causing which
37743    # to not find them
37744    if test "x$new_path" = x \
37745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37747      new_path="$path"
37748
37749  windows_path="$new_path"
37750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37751    unix_path=`$CYGPATH -u "$windows_path"`
37752    new_path="$unix_path"
37753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37755    new_path="$unix_path"
37756  fi
37757
37758    fi
37759
37760    if test "x$new_path" = x; then
37761      # It's still not found. Now this is an unrecoverable error.
37762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37763$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37764      has_space=`$ECHO "$complete" | $GREP " "`
37765      if test "x$has_space" != x; then
37766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37768      fi
37769      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37770    fi
37771  fi
37772
37773  # Now new_path has a complete unix path to the binary
37774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37775    # Keep paths in /bin as-is, but remove trailing .exe if any
37776    new_path="${new_path/%.exe/}"
37777    # Do not save /bin paths to all_fixpath_prefixes!
37778  else
37779    # Not in mixed or Windows style, start by that.
37780    new_path=`cmd //c echo $new_path`
37781
37782  input_path="$new_path"
37783  # Check if we need to convert this using DOS-style short mode. If the path
37784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37785  # take no chances and rewrite it.
37786  # Note: m4 eats our [], so we need to use [ and ] instead.
37787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37788  if test "x$has_forbidden_chars" != x; then
37789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37791  fi
37792
37793    # Output is in $new_path
37794
37795  windows_path="$new_path"
37796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37797    unix_path=`$CYGPATH -u "$windows_path"`
37798    new_path="$unix_path"
37799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37801    new_path="$unix_path"
37802  fi
37803
37804    # remove trailing .exe if any
37805    new_path="${new_path/%.exe/}"
37806
37807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37809  fi
37810
37811    else
37812      # We're on a unix platform. Hooray! :)
37813      # First separate the path from the arguments. This will split at the first
37814      # space.
37815      complete="$AS"
37816      path="${complete%% *}"
37817      tmp="$complete EOL"
37818      arguments="${tmp#* }"
37819
37820      # Cannot rely on the command "which" here since it doesn't always work.
37821      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37822      if test -z "$is_absolute_path"; then
37823        # Path to executable is not absolute. Find it.
37824        IFS_save="$IFS"
37825        IFS=:
37826        for p in $PATH; do
37827          if test -f "$p/$path" && test -x "$p/$path"; then
37828            new_path="$p/$path"
37829            break
37830          fi
37831        done
37832        IFS="$IFS_save"
37833      else
37834        # This is an absolute path, we can use it without further modifications.
37835        new_path="$path"
37836      fi
37837
37838      if test "x$new_path" = x; then
37839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37840$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37841        has_space=`$ECHO "$complete" | $GREP " "`
37842        if test "x$has_space" != x; then
37843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37845        fi
37846        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37847      fi
37848    fi
37849
37850    # Now join together the path and the arguments once again
37851    if test "x$arguments" != xEOL; then
37852      new_complete="$new_path ${arguments% *}"
37853    else
37854      new_complete="$new_path"
37855    fi
37856
37857    if test "x$complete" != "x$new_complete"; then
37858      AS="$new_complete"
37859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37860$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37861    fi
37862  fi
37863
37864    if test "x$AS" = x; then
37865      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37866    fi
37867  else
37868    # FIXME: is this correct for microsoft?
37869    AS="$CC -c"
37870  fi
37871
37872
37873  #
37874  # Setup the archiver (AR)
37875  #
37876  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37877    # The corresponding ar tool is lib.exe (used to create static libraries)
37878    # Extract the first word of "lib", so it can be a program name with args.
37879set dummy lib; ac_word=$2
37880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37881$as_echo_n "checking for $ac_word... " >&6; }
37882if ${ac_cv_prog_AR+:} false; then :
37883  $as_echo_n "(cached) " >&6
37884else
37885  if test -n "$AR"; then
37886  ac_cv_prog_AR="$AR" # Let the user override the test.
37887else
37888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37889for as_dir in $PATH
37890do
37891  IFS=$as_save_IFS
37892  test -z "$as_dir" && as_dir=.
37893    for ac_exec_ext in '' $ac_executable_extensions; do
37894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37895    ac_cv_prog_AR="lib"
37896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37897    break 2
37898  fi
37899done
37900  done
37901IFS=$as_save_IFS
37902
37903fi
37904fi
37905AR=$ac_cv_prog_AR
37906if test -n "$AR"; then
37907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37908$as_echo "$AR" >&6; }
37909else
37910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37911$as_echo "no" >&6; }
37912fi
37913
37914
37915  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37916
37917
37918  # Publish this variable in the help.
37919
37920
37921  if [ -z "${AR+x}" ]; then
37922    # The variable is not set by user, try to locate tool using the code snippet
37923    if test -n "$ac_tool_prefix"; then
37924  for ac_prog in ar gcc-ar
37925  do
37926    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37927set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37929$as_echo_n "checking for $ac_word... " >&6; }
37930if ${ac_cv_prog_AR+:} false; then :
37931  $as_echo_n "(cached) " >&6
37932else
37933  if test -n "$AR"; then
37934  ac_cv_prog_AR="$AR" # Let the user override the test.
37935else
37936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37937for as_dir in $PATH
37938do
37939  IFS=$as_save_IFS
37940  test -z "$as_dir" && as_dir=.
37941    for ac_exec_ext in '' $ac_executable_extensions; do
37942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37943    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37945    break 2
37946  fi
37947done
37948  done
37949IFS=$as_save_IFS
37950
37951fi
37952fi
37953AR=$ac_cv_prog_AR
37954if test -n "$AR"; then
37955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37956$as_echo "$AR" >&6; }
37957else
37958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37959$as_echo "no" >&6; }
37960fi
37961
37962
37963    test -n "$AR" && break
37964  done
37965fi
37966if test -z "$AR"; then
37967  ac_ct_AR=$AR
37968  for ac_prog in ar gcc-ar
37969do
37970  # Extract the first word of "$ac_prog", so it can be a program name with args.
37971set dummy $ac_prog; ac_word=$2
37972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37973$as_echo_n "checking for $ac_word... " >&6; }
37974if ${ac_cv_prog_ac_ct_AR+:} false; then :
37975  $as_echo_n "(cached) " >&6
37976else
37977  if test -n "$ac_ct_AR"; then
37978  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37979else
37980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37981for as_dir in $PATH
37982do
37983  IFS=$as_save_IFS
37984  test -z "$as_dir" && as_dir=.
37985    for ac_exec_ext in '' $ac_executable_extensions; do
37986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37987    ac_cv_prog_ac_ct_AR="$ac_prog"
37988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37989    break 2
37990  fi
37991done
37992  done
37993IFS=$as_save_IFS
37994
37995fi
37996fi
37997ac_ct_AR=$ac_cv_prog_ac_ct_AR
37998if test -n "$ac_ct_AR"; then
37999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38000$as_echo "$ac_ct_AR" >&6; }
38001else
38002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38003$as_echo "no" >&6; }
38004fi
38005
38006
38007  test -n "$ac_ct_AR" && break
38008done
38009
38010  if test "x$ac_ct_AR" = x; then
38011    AR=""
38012  else
38013    case $cross_compiling:$ac_tool_warned in
38014yes:)
38015{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38016$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38017ac_tool_warned=yes ;;
38018esac
38019    AR=$ac_ct_AR
38020  fi
38021fi
38022
38023  else
38024    # The variable is set, but is it from the command line or the environment?
38025
38026    # Try to remove the string !AR! from our list.
38027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38029      # If it failed, the variable was not from the command line. Ignore it,
38030      # but warn the user (except for BASH, which is always set by the calling BASH).
38031      if test "xAR" != xBASH; then
38032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38033$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38034      fi
38035      # Try to locate tool using the code snippet
38036      if test -n "$ac_tool_prefix"; then
38037  for ac_prog in ar gcc-ar
38038  do
38039    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38040set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38042$as_echo_n "checking for $ac_word... " >&6; }
38043if ${ac_cv_prog_AR+:} false; then :
38044  $as_echo_n "(cached) " >&6
38045else
38046  if test -n "$AR"; then
38047  ac_cv_prog_AR="$AR" # Let the user override the test.
38048else
38049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38050for as_dir in $PATH
38051do
38052  IFS=$as_save_IFS
38053  test -z "$as_dir" && as_dir=.
38054    for ac_exec_ext in '' $ac_executable_extensions; do
38055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38056    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38058    break 2
38059  fi
38060done
38061  done
38062IFS=$as_save_IFS
38063
38064fi
38065fi
38066AR=$ac_cv_prog_AR
38067if test -n "$AR"; then
38068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38069$as_echo "$AR" >&6; }
38070else
38071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38072$as_echo "no" >&6; }
38073fi
38074
38075
38076    test -n "$AR" && break
38077  done
38078fi
38079if test -z "$AR"; then
38080  ac_ct_AR=$AR
38081  for ac_prog in ar gcc-ar
38082do
38083  # Extract the first word of "$ac_prog", so it can be a program name with args.
38084set dummy $ac_prog; ac_word=$2
38085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38086$as_echo_n "checking for $ac_word... " >&6; }
38087if ${ac_cv_prog_ac_ct_AR+:} false; then :
38088  $as_echo_n "(cached) " >&6
38089else
38090  if test -n "$ac_ct_AR"; then
38091  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38092else
38093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38094for as_dir in $PATH
38095do
38096  IFS=$as_save_IFS
38097  test -z "$as_dir" && as_dir=.
38098    for ac_exec_ext in '' $ac_executable_extensions; do
38099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38100    ac_cv_prog_ac_ct_AR="$ac_prog"
38101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38102    break 2
38103  fi
38104done
38105  done
38106IFS=$as_save_IFS
38107
38108fi
38109fi
38110ac_ct_AR=$ac_cv_prog_ac_ct_AR
38111if test -n "$ac_ct_AR"; then
38112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38113$as_echo "$ac_ct_AR" >&6; }
38114else
38115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38116$as_echo "no" >&6; }
38117fi
38118
38119
38120  test -n "$ac_ct_AR" && break
38121done
38122
38123  if test "x$ac_ct_AR" = x; then
38124    AR=""
38125  else
38126    case $cross_compiling:$ac_tool_warned in
38127yes:)
38128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38130ac_tool_warned=yes ;;
38131esac
38132    AR=$ac_ct_AR
38133  fi
38134fi
38135
38136    else
38137      # If it succeeded, then it was overridden by the user. We will use it
38138      # for the tool.
38139
38140      # First remove it from the list of overridden variables, so we can test
38141      # for unknown variables in the end.
38142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38143
38144      # Check if we try to supply an empty value
38145      if test "x$AR" = x; then
38146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38147$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38149$as_echo_n "checking for AR... " >&6; }
38150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38151$as_echo "disabled" >&6; }
38152      else
38153        # Check if the provided tool contains a complete path.
38154        tool_specified="$AR"
38155        tool_basename="${tool_specified##*/}"
38156        if test "x$tool_basename" = "x$tool_specified"; then
38157          # A command without a complete path is provided, search $PATH.
38158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38159$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38160          # Extract the first word of "$tool_basename", so it can be a program name with args.
38161set dummy $tool_basename; ac_word=$2
38162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38163$as_echo_n "checking for $ac_word... " >&6; }
38164if ${ac_cv_path_AR+:} false; then :
38165  $as_echo_n "(cached) " >&6
38166else
38167  case $AR in
38168  [\\/]* | ?:[\\/]*)
38169  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38170  ;;
38171  *)
38172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38173for as_dir in $PATH
38174do
38175  IFS=$as_save_IFS
38176  test -z "$as_dir" && as_dir=.
38177    for ac_exec_ext in '' $ac_executable_extensions; do
38178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38179    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38181    break 2
38182  fi
38183done
38184  done
38185IFS=$as_save_IFS
38186
38187  ;;
38188esac
38189fi
38190AR=$ac_cv_path_AR
38191if test -n "$AR"; then
38192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38193$as_echo "$AR" >&6; }
38194else
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38196$as_echo "no" >&6; }
38197fi
38198
38199
38200          if test "x$AR" = x; then
38201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38202          fi
38203        else
38204          # Otherwise we believe it is a complete path. Use it as it is.
38205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38206$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38208$as_echo_n "checking for AR... " >&6; }
38209          if test ! -x "$tool_specified"; then
38210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38211$as_echo "not found" >&6; }
38212            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38213          fi
38214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38215$as_echo "$tool_specified" >&6; }
38216        fi
38217      fi
38218    fi
38219
38220  fi
38221
38222
38223  else
38224
38225
38226  # Publish this variable in the help.
38227
38228
38229  if [ -z "${AR+x}" ]; then
38230    # The variable is not set by user, try to locate tool using the code snippet
38231    if test -n "$ac_tool_prefix"; then
38232  for ac_prog in ar
38233  do
38234    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38235set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38237$as_echo_n "checking for $ac_word... " >&6; }
38238if ${ac_cv_prog_AR+:} false; then :
38239  $as_echo_n "(cached) " >&6
38240else
38241  if test -n "$AR"; then
38242  ac_cv_prog_AR="$AR" # Let the user override the test.
38243else
38244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38245for as_dir in $PATH
38246do
38247  IFS=$as_save_IFS
38248  test -z "$as_dir" && as_dir=.
38249    for ac_exec_ext in '' $ac_executable_extensions; do
38250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38251    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38253    break 2
38254  fi
38255done
38256  done
38257IFS=$as_save_IFS
38258
38259fi
38260fi
38261AR=$ac_cv_prog_AR
38262if test -n "$AR"; then
38263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38264$as_echo "$AR" >&6; }
38265else
38266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38267$as_echo "no" >&6; }
38268fi
38269
38270
38271    test -n "$AR" && break
38272  done
38273fi
38274if test -z "$AR"; then
38275  ac_ct_AR=$AR
38276  for ac_prog in ar
38277do
38278  # Extract the first word of "$ac_prog", so it can be a program name with args.
38279set dummy $ac_prog; ac_word=$2
38280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38281$as_echo_n "checking for $ac_word... " >&6; }
38282if ${ac_cv_prog_ac_ct_AR+:} false; then :
38283  $as_echo_n "(cached) " >&6
38284else
38285  if test -n "$ac_ct_AR"; then
38286  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38287else
38288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38289for as_dir in $PATH
38290do
38291  IFS=$as_save_IFS
38292  test -z "$as_dir" && as_dir=.
38293    for ac_exec_ext in '' $ac_executable_extensions; do
38294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38295    ac_cv_prog_ac_ct_AR="$ac_prog"
38296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38297    break 2
38298  fi
38299done
38300  done
38301IFS=$as_save_IFS
38302
38303fi
38304fi
38305ac_ct_AR=$ac_cv_prog_ac_ct_AR
38306if test -n "$ac_ct_AR"; then
38307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38308$as_echo "$ac_ct_AR" >&6; }
38309else
38310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38311$as_echo "no" >&6; }
38312fi
38313
38314
38315  test -n "$ac_ct_AR" && break
38316done
38317
38318  if test "x$ac_ct_AR" = x; then
38319    AR=""
38320  else
38321    case $cross_compiling:$ac_tool_warned in
38322yes:)
38323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38325ac_tool_warned=yes ;;
38326esac
38327    AR=$ac_ct_AR
38328  fi
38329fi
38330
38331  else
38332    # The variable is set, but is it from the command line or the environment?
38333
38334    # Try to remove the string !AR! from our list.
38335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38337      # If it failed, the variable was not from the command line. Ignore it,
38338      # but warn the user (except for BASH, which is always set by the calling BASH).
38339      if test "xAR" != xBASH; then
38340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38341$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38342      fi
38343      # Try to locate tool using the code snippet
38344      if test -n "$ac_tool_prefix"; then
38345  for ac_prog in ar
38346  do
38347    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38348set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38350$as_echo_n "checking for $ac_word... " >&6; }
38351if ${ac_cv_prog_AR+:} false; then :
38352  $as_echo_n "(cached) " >&6
38353else
38354  if test -n "$AR"; then
38355  ac_cv_prog_AR="$AR" # Let the user override the test.
38356else
38357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38358for as_dir in $PATH
38359do
38360  IFS=$as_save_IFS
38361  test -z "$as_dir" && as_dir=.
38362    for ac_exec_ext in '' $ac_executable_extensions; do
38363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38364    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38366    break 2
38367  fi
38368done
38369  done
38370IFS=$as_save_IFS
38371
38372fi
38373fi
38374AR=$ac_cv_prog_AR
38375if test -n "$AR"; then
38376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38377$as_echo "$AR" >&6; }
38378else
38379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38380$as_echo "no" >&6; }
38381fi
38382
38383
38384    test -n "$AR" && break
38385  done
38386fi
38387if test -z "$AR"; then
38388  ac_ct_AR=$AR
38389  for ac_prog in ar
38390do
38391  # Extract the first word of "$ac_prog", so it can be a program name with args.
38392set dummy $ac_prog; ac_word=$2
38393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38394$as_echo_n "checking for $ac_word... " >&6; }
38395if ${ac_cv_prog_ac_ct_AR+:} false; then :
38396  $as_echo_n "(cached) " >&6
38397else
38398  if test -n "$ac_ct_AR"; then
38399  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38400else
38401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38402for as_dir in $PATH
38403do
38404  IFS=$as_save_IFS
38405  test -z "$as_dir" && as_dir=.
38406    for ac_exec_ext in '' $ac_executable_extensions; do
38407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38408    ac_cv_prog_ac_ct_AR="$ac_prog"
38409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38410    break 2
38411  fi
38412done
38413  done
38414IFS=$as_save_IFS
38415
38416fi
38417fi
38418ac_ct_AR=$ac_cv_prog_ac_ct_AR
38419if test -n "$ac_ct_AR"; then
38420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38421$as_echo "$ac_ct_AR" >&6; }
38422else
38423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38424$as_echo "no" >&6; }
38425fi
38426
38427
38428  test -n "$ac_ct_AR" && break
38429done
38430
38431  if test "x$ac_ct_AR" = x; then
38432    AR=""
38433  else
38434    case $cross_compiling:$ac_tool_warned in
38435yes:)
38436{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38437$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38438ac_tool_warned=yes ;;
38439esac
38440    AR=$ac_ct_AR
38441  fi
38442fi
38443
38444    else
38445      # If it succeeded, then it was overridden by the user. We will use it
38446      # for the tool.
38447
38448      # First remove it from the list of overridden variables, so we can test
38449      # for unknown variables in the end.
38450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38451
38452      # Check if we try to supply an empty value
38453      if test "x$AR" = x; then
38454        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38455$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38457$as_echo_n "checking for AR... " >&6; }
38458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38459$as_echo "disabled" >&6; }
38460      else
38461        # Check if the provided tool contains a complete path.
38462        tool_specified="$AR"
38463        tool_basename="${tool_specified##*/}"
38464        if test "x$tool_basename" = "x$tool_specified"; then
38465          # A command without a complete path is provided, search $PATH.
38466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38467$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38468          # Extract the first word of "$tool_basename", so it can be a program name with args.
38469set dummy $tool_basename; ac_word=$2
38470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38471$as_echo_n "checking for $ac_word... " >&6; }
38472if ${ac_cv_path_AR+:} false; then :
38473  $as_echo_n "(cached) " >&6
38474else
38475  case $AR in
38476  [\\/]* | ?:[\\/]*)
38477  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38478  ;;
38479  *)
38480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38481for as_dir in $PATH
38482do
38483  IFS=$as_save_IFS
38484  test -z "$as_dir" && as_dir=.
38485    for ac_exec_ext in '' $ac_executable_extensions; do
38486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38487    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38489    break 2
38490  fi
38491done
38492  done
38493IFS=$as_save_IFS
38494
38495  ;;
38496esac
38497fi
38498AR=$ac_cv_path_AR
38499if test -n "$AR"; then
38500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38501$as_echo "$AR" >&6; }
38502else
38503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38504$as_echo "no" >&6; }
38505fi
38506
38507
38508          if test "x$AR" = x; then
38509            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38510          fi
38511        else
38512          # Otherwise we believe it is a complete path. Use it as it is.
38513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38514$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38515          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38516$as_echo_n "checking for AR... " >&6; }
38517          if test ! -x "$tool_specified"; then
38518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38519$as_echo "not found" >&6; }
38520            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38521          fi
38522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38523$as_echo "$tool_specified" >&6; }
38524        fi
38525      fi
38526    fi
38527
38528  fi
38529
38530
38531  fi
38532
38533  # Only process if variable expands to non-empty
38534
38535  if test "x$AR" != x; then
38536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38537
38538  # First separate the path from the arguments. This will split at the first
38539  # space.
38540  complete="$AR"
38541  path="${complete%% *}"
38542  tmp="$complete EOL"
38543  arguments="${tmp#* }"
38544
38545  # Input might be given as Windows format, start by converting to
38546  # unix format.
38547  new_path=`$CYGPATH -u "$path"`
38548
38549  # Now try to locate executable using which
38550  new_path=`$WHICH "$new_path" 2> /dev/null`
38551  # bat and cmd files are not always considered executable in cygwin causing which
38552  # to not find them
38553  if test "x$new_path" = x \
38554      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38555      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38556    new_path=`$CYGPATH -u "$path"`
38557  fi
38558  if test "x$new_path" = x; then
38559    # Oops. Which didn't find the executable.
38560    # The splitting of arguments from the executable at a space might have been incorrect,
38561    # since paths with space are more likely in Windows. Give it another try with the whole
38562    # argument.
38563    path="$complete"
38564    arguments="EOL"
38565    new_path=`$CYGPATH -u "$path"`
38566    new_path=`$WHICH "$new_path" 2> /dev/null`
38567    # bat and cmd files are not always considered executable in cygwin causing which
38568    # to not find them
38569    if test "x$new_path" = x \
38570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38572      new_path=`$CYGPATH -u "$path"`
38573    fi
38574    if test "x$new_path" = x; then
38575      # It's still not found. Now this is an unrecoverable error.
38576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38577$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38578      has_space=`$ECHO "$complete" | $GREP " "`
38579      if test "x$has_space" != x; then
38580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38582      fi
38583      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38584    fi
38585  fi
38586
38587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38590  # "foo.exe" is OK but "foo" is an error.
38591  #
38592  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38593  # It is also a way to make sure we got the proper file name for the real test later on.
38594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38595  if test "x$test_shortpath" = x; then
38596    # Short path failed, file does not exist as specified.
38597    # Try adding .exe or .cmd
38598    if test -f "${new_path}.exe"; then
38599      input_to_shortpath="${new_path}.exe"
38600    elif test -f "${new_path}.cmd"; then
38601      input_to_shortpath="${new_path}.cmd"
38602    else
38603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38604$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38605      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38606$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38607      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38608    fi
38609  else
38610    input_to_shortpath="$new_path"
38611  fi
38612
38613  # Call helper function which possibly converts this using DOS-style short mode.
38614  # If so, the updated path is stored in $new_path.
38615  new_path="$input_to_shortpath"
38616
38617  input_path="$input_to_shortpath"
38618  # Check if we need to convert this using DOS-style short mode. If the path
38619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38620  # take no chances and rewrite it.
38621  # Note: m4 eats our [], so we need to use [ and ] instead.
38622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38623  if test "x$has_forbidden_chars" != x; then
38624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38628      # Going to short mode and back again did indeed matter. Since short mode is
38629      # case insensitive, let's make it lowercase to improve readability.
38630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38631      # Now convert it back to Unix-style (cygpath)
38632      input_path=`$CYGPATH -u "$shortmode_path"`
38633      new_path="$input_path"
38634    fi
38635  fi
38636
38637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38638  if test "x$test_cygdrive_prefix" = x; then
38639    # As a simple fix, exclude /usr/bin since it's not a real path.
38640    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38642      # a path prefixed by /cygdrive for fixpath to work.
38643      new_path="$CYGWIN_ROOT_PATH$input_path"
38644    fi
38645  fi
38646
38647  # remove trailing .exe if any
38648  new_path="${new_path/%.exe/}"
38649
38650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38651
38652  # First separate the path from the arguments. This will split at the first
38653  # space.
38654  complete="$AR"
38655  path="${complete%% *}"
38656  tmp="$complete EOL"
38657  arguments="${tmp#* }"
38658
38659  # Input might be given as Windows format, start by converting to
38660  # unix format.
38661  new_path="$path"
38662
38663  windows_path="$new_path"
38664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38665    unix_path=`$CYGPATH -u "$windows_path"`
38666    new_path="$unix_path"
38667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38669    new_path="$unix_path"
38670  fi
38671
38672
38673  # Now try to locate executable using which
38674  new_path=`$WHICH "$new_path" 2> /dev/null`
38675
38676  if test "x$new_path" = x; then
38677    # Oops. Which didn't find the executable.
38678    # The splitting of arguments from the executable at a space might have been incorrect,
38679    # since paths with space are more likely in Windows. Give it another try with the whole
38680    # argument.
38681    path="$complete"
38682    arguments="EOL"
38683    new_path="$path"
38684
38685  windows_path="$new_path"
38686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38687    unix_path=`$CYGPATH -u "$windows_path"`
38688    new_path="$unix_path"
38689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38691    new_path="$unix_path"
38692  fi
38693
38694
38695    new_path=`$WHICH "$new_path" 2> /dev/null`
38696    # bat and cmd files are not always considered executable in MSYS causing which
38697    # to not find them
38698    if test "x$new_path" = x \
38699        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38700        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38701      new_path="$path"
38702
38703  windows_path="$new_path"
38704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38705    unix_path=`$CYGPATH -u "$windows_path"`
38706    new_path="$unix_path"
38707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38709    new_path="$unix_path"
38710  fi
38711
38712    fi
38713
38714    if test "x$new_path" = x; then
38715      # It's still not found. Now this is an unrecoverable error.
38716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38717$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38718      has_space=`$ECHO "$complete" | $GREP " "`
38719      if test "x$has_space" != x; then
38720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38722      fi
38723      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38724    fi
38725  fi
38726
38727  # Now new_path has a complete unix path to the binary
38728  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38729    # Keep paths in /bin as-is, but remove trailing .exe if any
38730    new_path="${new_path/%.exe/}"
38731    # Do not save /bin paths to all_fixpath_prefixes!
38732  else
38733    # Not in mixed or Windows style, start by that.
38734    new_path=`cmd //c echo $new_path`
38735
38736  input_path="$new_path"
38737  # Check if we need to convert this using DOS-style short mode. If the path
38738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38739  # take no chances and rewrite it.
38740  # Note: m4 eats our [], so we need to use [ and ] instead.
38741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38742  if test "x$has_forbidden_chars" != x; then
38743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38745  fi
38746
38747    # Output is in $new_path
38748
38749  windows_path="$new_path"
38750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38751    unix_path=`$CYGPATH -u "$windows_path"`
38752    new_path="$unix_path"
38753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38755    new_path="$unix_path"
38756  fi
38757
38758    # remove trailing .exe if any
38759    new_path="${new_path/%.exe/}"
38760
38761    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38762    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38763  fi
38764
38765    else
38766      # We're on a unix platform. Hooray! :)
38767      # First separate the path from the arguments. This will split at the first
38768      # space.
38769      complete="$AR"
38770      path="${complete%% *}"
38771      tmp="$complete EOL"
38772      arguments="${tmp#* }"
38773
38774      # Cannot rely on the command "which" here since it doesn't always work.
38775      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38776      if test -z "$is_absolute_path"; then
38777        # Path to executable is not absolute. Find it.
38778        IFS_save="$IFS"
38779        IFS=:
38780        for p in $PATH; do
38781          if test -f "$p/$path" && test -x "$p/$path"; then
38782            new_path="$p/$path"
38783            break
38784          fi
38785        done
38786        IFS="$IFS_save"
38787      else
38788        # This is an absolute path, we can use it without further modifications.
38789        new_path="$path"
38790      fi
38791
38792      if test "x$new_path" = x; then
38793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38794$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38795        has_space=`$ECHO "$complete" | $GREP " "`
38796        if test "x$has_space" != x; then
38797          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38798$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38799        fi
38800        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38801      fi
38802    fi
38803
38804    # Now join together the path and the arguments once again
38805    if test "x$arguments" != xEOL; then
38806      new_complete="$new_path ${arguments% *}"
38807    else
38808      new_complete="$new_path"
38809    fi
38810
38811    if test "x$complete" != "x$new_complete"; then
38812      AR="$new_complete"
38813      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38814$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38815    fi
38816  fi
38817
38818
38819
38820  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38821
38822
38823  # Publish this variable in the help.
38824
38825
38826  if [ -z "${LIPO+x}" ]; then
38827    # The variable is not set by user, try to locate tool using the code snippet
38828    for ac_prog in lipo
38829do
38830  # Extract the first word of "$ac_prog", so it can be a program name with args.
38831set dummy $ac_prog; ac_word=$2
38832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38833$as_echo_n "checking for $ac_word... " >&6; }
38834if ${ac_cv_path_LIPO+:} false; then :
38835  $as_echo_n "(cached) " >&6
38836else
38837  case $LIPO in
38838  [\\/]* | ?:[\\/]*)
38839  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38840  ;;
38841  *)
38842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38843for as_dir in $PATH
38844do
38845  IFS=$as_save_IFS
38846  test -z "$as_dir" && as_dir=.
38847    for ac_exec_ext in '' $ac_executable_extensions; do
38848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38849    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38851    break 2
38852  fi
38853done
38854  done
38855IFS=$as_save_IFS
38856
38857  ;;
38858esac
38859fi
38860LIPO=$ac_cv_path_LIPO
38861if test -n "$LIPO"; then
38862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38863$as_echo "$LIPO" >&6; }
38864else
38865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38866$as_echo "no" >&6; }
38867fi
38868
38869
38870  test -n "$LIPO" && break
38871done
38872
38873  else
38874    # The variable is set, but is it from the command line or the environment?
38875
38876    # Try to remove the string !LIPO! from our list.
38877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38879      # If it failed, the variable was not from the command line. Ignore it,
38880      # but warn the user (except for BASH, which is always set by the calling BASH).
38881      if test "xLIPO" != xBASH; then
38882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38883$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38884      fi
38885      # Try to locate tool using the code snippet
38886      for ac_prog in lipo
38887do
38888  # Extract the first word of "$ac_prog", so it can be a program name with args.
38889set dummy $ac_prog; ac_word=$2
38890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38891$as_echo_n "checking for $ac_word... " >&6; }
38892if ${ac_cv_path_LIPO+:} false; then :
38893  $as_echo_n "(cached) " >&6
38894else
38895  case $LIPO in
38896  [\\/]* | ?:[\\/]*)
38897  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38898  ;;
38899  *)
38900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38901for as_dir in $PATH
38902do
38903  IFS=$as_save_IFS
38904  test -z "$as_dir" && as_dir=.
38905    for ac_exec_ext in '' $ac_executable_extensions; do
38906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38907    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38909    break 2
38910  fi
38911done
38912  done
38913IFS=$as_save_IFS
38914
38915  ;;
38916esac
38917fi
38918LIPO=$ac_cv_path_LIPO
38919if test -n "$LIPO"; then
38920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38921$as_echo "$LIPO" >&6; }
38922else
38923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38924$as_echo "no" >&6; }
38925fi
38926
38927
38928  test -n "$LIPO" && break
38929done
38930
38931    else
38932      # If it succeeded, then it was overridden by the user. We will use it
38933      # for the tool.
38934
38935      # First remove it from the list of overridden variables, so we can test
38936      # for unknown variables in the end.
38937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38938
38939      # Check if we try to supply an empty value
38940      if test "x$LIPO" = x; then
38941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38942$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38944$as_echo_n "checking for LIPO... " >&6; }
38945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38946$as_echo "disabled" >&6; }
38947      else
38948        # Check if the provided tool contains a complete path.
38949        tool_specified="$LIPO"
38950        tool_basename="${tool_specified##*/}"
38951        if test "x$tool_basename" = "x$tool_specified"; then
38952          # A command without a complete path is provided, search $PATH.
38953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38954$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38955          # Extract the first word of "$tool_basename", so it can be a program name with args.
38956set dummy $tool_basename; ac_word=$2
38957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38958$as_echo_n "checking for $ac_word... " >&6; }
38959if ${ac_cv_path_LIPO+:} false; then :
38960  $as_echo_n "(cached) " >&6
38961else
38962  case $LIPO in
38963  [\\/]* | ?:[\\/]*)
38964  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38965  ;;
38966  *)
38967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38968for as_dir in $PATH
38969do
38970  IFS=$as_save_IFS
38971  test -z "$as_dir" && as_dir=.
38972    for ac_exec_ext in '' $ac_executable_extensions; do
38973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38974    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38976    break 2
38977  fi
38978done
38979  done
38980IFS=$as_save_IFS
38981
38982  ;;
38983esac
38984fi
38985LIPO=$ac_cv_path_LIPO
38986if test -n "$LIPO"; then
38987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38988$as_echo "$LIPO" >&6; }
38989else
38990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38991$as_echo "no" >&6; }
38992fi
38993
38994
38995          if test "x$LIPO" = x; then
38996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38997          fi
38998        else
38999          # Otherwise we believe it is a complete path. Use it as it is.
39000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39001$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39003$as_echo_n "checking for LIPO... " >&6; }
39004          if test ! -x "$tool_specified"; then
39005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39006$as_echo "not found" >&6; }
39007            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39008          fi
39009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39010$as_echo "$tool_specified" >&6; }
39011        fi
39012      fi
39013    fi
39014
39015  fi
39016
39017
39018
39019  # Only process if variable expands to non-empty
39020
39021  if test "x$LIPO" != x; then
39022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39023
39024  # First separate the path from the arguments. This will split at the first
39025  # space.
39026  complete="$LIPO"
39027  path="${complete%% *}"
39028  tmp="$complete EOL"
39029  arguments="${tmp#* }"
39030
39031  # Input might be given as Windows format, start by converting to
39032  # unix format.
39033  new_path=`$CYGPATH -u "$path"`
39034
39035  # Now try to locate executable using which
39036  new_path=`$WHICH "$new_path" 2> /dev/null`
39037  # bat and cmd files are not always considered executable in cygwin causing which
39038  # to not find them
39039  if test "x$new_path" = x \
39040      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39041      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39042    new_path=`$CYGPATH -u "$path"`
39043  fi
39044  if test "x$new_path" = x; then
39045    # Oops. Which didn't find the executable.
39046    # The splitting of arguments from the executable at a space might have been incorrect,
39047    # since paths with space are more likely in Windows. Give it another try with the whole
39048    # argument.
39049    path="$complete"
39050    arguments="EOL"
39051    new_path=`$CYGPATH -u "$path"`
39052    new_path=`$WHICH "$new_path" 2> /dev/null`
39053    # bat and cmd files are not always considered executable in cygwin causing which
39054    # to not find them
39055    if test "x$new_path" = x \
39056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39058      new_path=`$CYGPATH -u "$path"`
39059    fi
39060    if test "x$new_path" = x; then
39061      # It's still not found. Now this is an unrecoverable error.
39062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39063$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39064      has_space=`$ECHO "$complete" | $GREP " "`
39065      if test "x$has_space" != x; then
39066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39068      fi
39069      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39070    fi
39071  fi
39072
39073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39076  # "foo.exe" is OK but "foo" is an error.
39077  #
39078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39079  # It is also a way to make sure we got the proper file name for the real test later on.
39080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39081  if test "x$test_shortpath" = x; then
39082    # Short path failed, file does not exist as specified.
39083    # Try adding .exe or .cmd
39084    if test -f "${new_path}.exe"; then
39085      input_to_shortpath="${new_path}.exe"
39086    elif test -f "${new_path}.cmd"; then
39087      input_to_shortpath="${new_path}.cmd"
39088    else
39089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39090$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39093      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39094    fi
39095  else
39096    input_to_shortpath="$new_path"
39097  fi
39098
39099  # Call helper function which possibly converts this using DOS-style short mode.
39100  # If so, the updated path is stored in $new_path.
39101  new_path="$input_to_shortpath"
39102
39103  input_path="$input_to_shortpath"
39104  # Check if we need to convert this using DOS-style short mode. If the path
39105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39106  # take no chances and rewrite it.
39107  # Note: m4 eats our [], so we need to use [ and ] instead.
39108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39109  if test "x$has_forbidden_chars" != x; then
39110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39114      # Going to short mode and back again did indeed matter. Since short mode is
39115      # case insensitive, let's make it lowercase to improve readability.
39116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39117      # Now convert it back to Unix-style (cygpath)
39118      input_path=`$CYGPATH -u "$shortmode_path"`
39119      new_path="$input_path"
39120    fi
39121  fi
39122
39123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39124  if test "x$test_cygdrive_prefix" = x; then
39125    # As a simple fix, exclude /usr/bin since it's not a real path.
39126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39128      # a path prefixed by /cygdrive for fixpath to work.
39129      new_path="$CYGWIN_ROOT_PATH$input_path"
39130    fi
39131  fi
39132
39133  # remove trailing .exe if any
39134  new_path="${new_path/%.exe/}"
39135
39136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39137
39138  # First separate the path from the arguments. This will split at the first
39139  # space.
39140  complete="$LIPO"
39141  path="${complete%% *}"
39142  tmp="$complete EOL"
39143  arguments="${tmp#* }"
39144
39145  # Input might be given as Windows format, start by converting to
39146  # unix format.
39147  new_path="$path"
39148
39149  windows_path="$new_path"
39150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39151    unix_path=`$CYGPATH -u "$windows_path"`
39152    new_path="$unix_path"
39153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39155    new_path="$unix_path"
39156  fi
39157
39158
39159  # Now try to locate executable using which
39160  new_path=`$WHICH "$new_path" 2> /dev/null`
39161
39162  if test "x$new_path" = x; then
39163    # Oops. Which didn't find the executable.
39164    # The splitting of arguments from the executable at a space might have been incorrect,
39165    # since paths with space are more likely in Windows. Give it another try with the whole
39166    # argument.
39167    path="$complete"
39168    arguments="EOL"
39169    new_path="$path"
39170
39171  windows_path="$new_path"
39172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39173    unix_path=`$CYGPATH -u "$windows_path"`
39174    new_path="$unix_path"
39175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39177    new_path="$unix_path"
39178  fi
39179
39180
39181    new_path=`$WHICH "$new_path" 2> /dev/null`
39182    # bat and cmd files are not always considered executable in MSYS causing which
39183    # to not find them
39184    if test "x$new_path" = x \
39185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39187      new_path="$path"
39188
39189  windows_path="$new_path"
39190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39191    unix_path=`$CYGPATH -u "$windows_path"`
39192    new_path="$unix_path"
39193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39195    new_path="$unix_path"
39196  fi
39197
39198    fi
39199
39200    if test "x$new_path" = x; then
39201      # It's still not found. Now this is an unrecoverable error.
39202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39203$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39204      has_space=`$ECHO "$complete" | $GREP " "`
39205      if test "x$has_space" != x; then
39206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39208      fi
39209      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39210    fi
39211  fi
39212
39213  # Now new_path has a complete unix path to the binary
39214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39215    # Keep paths in /bin as-is, but remove trailing .exe if any
39216    new_path="${new_path/%.exe/}"
39217    # Do not save /bin paths to all_fixpath_prefixes!
39218  else
39219    # Not in mixed or Windows style, start by that.
39220    new_path=`cmd //c echo $new_path`
39221
39222  input_path="$new_path"
39223  # Check if we need to convert this using DOS-style short mode. If the path
39224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39225  # take no chances and rewrite it.
39226  # Note: m4 eats our [], so we need to use [ and ] instead.
39227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39228  if test "x$has_forbidden_chars" != x; then
39229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39231  fi
39232
39233    # Output is in $new_path
39234
39235  windows_path="$new_path"
39236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39237    unix_path=`$CYGPATH -u "$windows_path"`
39238    new_path="$unix_path"
39239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39241    new_path="$unix_path"
39242  fi
39243
39244    # remove trailing .exe if any
39245    new_path="${new_path/%.exe/}"
39246
39247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39249  fi
39250
39251    else
39252      # We're on a unix platform. Hooray! :)
39253      # First separate the path from the arguments. This will split at the first
39254      # space.
39255      complete="$LIPO"
39256      path="${complete%% *}"
39257      tmp="$complete EOL"
39258      arguments="${tmp#* }"
39259
39260      # Cannot rely on the command "which" here since it doesn't always work.
39261      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39262      if test -z "$is_absolute_path"; then
39263        # Path to executable is not absolute. Find it.
39264        IFS_save="$IFS"
39265        IFS=:
39266        for p in $PATH; do
39267          if test -f "$p/$path" && test -x "$p/$path"; then
39268            new_path="$p/$path"
39269            break
39270          fi
39271        done
39272        IFS="$IFS_save"
39273      else
39274        # This is an absolute path, we can use it without further modifications.
39275        new_path="$path"
39276      fi
39277
39278      if test "x$new_path" = x; then
39279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39280$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39281        has_space=`$ECHO "$complete" | $GREP " "`
39282        if test "x$has_space" != x; then
39283          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39285        fi
39286        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39287      fi
39288    fi
39289
39290    # Now join together the path and the arguments once again
39291    if test "x$arguments" != xEOL; then
39292      new_complete="$new_path ${arguments% *}"
39293    else
39294      new_complete="$new_path"
39295    fi
39296
39297    if test "x$complete" != "x$new_complete"; then
39298      LIPO="$new_complete"
39299      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39300$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39301    fi
39302  fi
39303
39304  fi
39305
39306  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39307    # Extract the first word of "mt", so it can be a program name with args.
39308set dummy mt; ac_word=$2
39309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39310$as_echo_n "checking for $ac_word... " >&6; }
39311if ${ac_cv_prog_MT+:} false; then :
39312  $as_echo_n "(cached) " >&6
39313else
39314  if test -n "$MT"; then
39315  ac_cv_prog_MT="$MT" # Let the user override the test.
39316else
39317  ac_prog_rejected=no
39318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39319for as_dir in $PATH
39320do
39321  IFS=$as_save_IFS
39322  test -z "$as_dir" && as_dir=.
39323    for ac_exec_ext in '' $ac_executable_extensions; do
39324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39325    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39326       ac_prog_rejected=yes
39327       continue
39328     fi
39329    ac_cv_prog_MT="mt"
39330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39331    break 2
39332  fi
39333done
39334  done
39335IFS=$as_save_IFS
39336
39337if test $ac_prog_rejected = yes; then
39338  # We found a bogon in the path, so make sure we never use it.
39339  set dummy $ac_cv_prog_MT
39340  shift
39341  if test $# != 0; then
39342    # We chose a different compiler from the bogus one.
39343    # However, it has the same basename, so the bogon will be chosen
39344    # first if we set MT to just the basename; use the full file name.
39345    shift
39346    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39347  fi
39348fi
39349fi
39350fi
39351MT=$ac_cv_prog_MT
39352if test -n "$MT"; then
39353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39354$as_echo "$MT" >&6; }
39355else
39356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39357$as_echo "no" >&6; }
39358fi
39359
39360
39361
39362  # Only process if variable expands to non-empty
39363
39364  if test "x$MT" != x; then
39365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39366
39367  # First separate the path from the arguments. This will split at the first
39368  # space.
39369  complete="$MT"
39370  path="${complete%% *}"
39371  tmp="$complete EOL"
39372  arguments="${tmp#* }"
39373
39374  # Input might be given as Windows format, start by converting to
39375  # unix format.
39376  new_path=`$CYGPATH -u "$path"`
39377
39378  # Now try to locate executable using which
39379  new_path=`$WHICH "$new_path" 2> /dev/null`
39380  # bat and cmd files are not always considered executable in cygwin causing which
39381  # to not find them
39382  if test "x$new_path" = x \
39383      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39384      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39385    new_path=`$CYGPATH -u "$path"`
39386  fi
39387  if test "x$new_path" = x; then
39388    # Oops. Which didn't find the executable.
39389    # The splitting of arguments from the executable at a space might have been incorrect,
39390    # since paths with space are more likely in Windows. Give it another try with the whole
39391    # argument.
39392    path="$complete"
39393    arguments="EOL"
39394    new_path=`$CYGPATH -u "$path"`
39395    new_path=`$WHICH "$new_path" 2> /dev/null`
39396    # bat and cmd files are not always considered executable in cygwin causing which
39397    # to not find them
39398    if test "x$new_path" = x \
39399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39401      new_path=`$CYGPATH -u "$path"`
39402    fi
39403    if test "x$new_path" = x; then
39404      # It's still not found. Now this is an unrecoverable error.
39405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39406$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39407      has_space=`$ECHO "$complete" | $GREP " "`
39408      if test "x$has_space" != x; then
39409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39411      fi
39412      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39413    fi
39414  fi
39415
39416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39419  # "foo.exe" is OK but "foo" is an error.
39420  #
39421  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39422  # It is also a way to make sure we got the proper file name for the real test later on.
39423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39424  if test "x$test_shortpath" = x; then
39425    # Short path failed, file does not exist as specified.
39426    # Try adding .exe or .cmd
39427    if test -f "${new_path}.exe"; then
39428      input_to_shortpath="${new_path}.exe"
39429    elif test -f "${new_path}.cmd"; then
39430      input_to_shortpath="${new_path}.cmd"
39431    else
39432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39433$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39434      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39435$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39436      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39437    fi
39438  else
39439    input_to_shortpath="$new_path"
39440  fi
39441
39442  # Call helper function which possibly converts this using DOS-style short mode.
39443  # If so, the updated path is stored in $new_path.
39444  new_path="$input_to_shortpath"
39445
39446  input_path="$input_to_shortpath"
39447  # Check if we need to convert this using DOS-style short mode. If the path
39448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39449  # take no chances and rewrite it.
39450  # Note: m4 eats our [], so we need to use [ and ] instead.
39451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39452  if test "x$has_forbidden_chars" != x; then
39453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39457      # Going to short mode and back again did indeed matter. Since short mode is
39458      # case insensitive, let's make it lowercase to improve readability.
39459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39460      # Now convert it back to Unix-style (cygpath)
39461      input_path=`$CYGPATH -u "$shortmode_path"`
39462      new_path="$input_path"
39463    fi
39464  fi
39465
39466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39467  if test "x$test_cygdrive_prefix" = x; then
39468    # As a simple fix, exclude /usr/bin since it's not a real path.
39469    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39471      # a path prefixed by /cygdrive for fixpath to work.
39472      new_path="$CYGWIN_ROOT_PATH$input_path"
39473    fi
39474  fi
39475
39476  # remove trailing .exe if any
39477  new_path="${new_path/%.exe/}"
39478
39479    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39480
39481  # First separate the path from the arguments. This will split at the first
39482  # space.
39483  complete="$MT"
39484  path="${complete%% *}"
39485  tmp="$complete EOL"
39486  arguments="${tmp#* }"
39487
39488  # Input might be given as Windows format, start by converting to
39489  # unix format.
39490  new_path="$path"
39491
39492  windows_path="$new_path"
39493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39494    unix_path=`$CYGPATH -u "$windows_path"`
39495    new_path="$unix_path"
39496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39498    new_path="$unix_path"
39499  fi
39500
39501
39502  # Now try to locate executable using which
39503  new_path=`$WHICH "$new_path" 2> /dev/null`
39504
39505  if test "x$new_path" = x; then
39506    # Oops. Which didn't find the executable.
39507    # The splitting of arguments from the executable at a space might have been incorrect,
39508    # since paths with space are more likely in Windows. Give it another try with the whole
39509    # argument.
39510    path="$complete"
39511    arguments="EOL"
39512    new_path="$path"
39513
39514  windows_path="$new_path"
39515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39516    unix_path=`$CYGPATH -u "$windows_path"`
39517    new_path="$unix_path"
39518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39520    new_path="$unix_path"
39521  fi
39522
39523
39524    new_path=`$WHICH "$new_path" 2> /dev/null`
39525    # bat and cmd files are not always considered executable in MSYS causing which
39526    # to not find them
39527    if test "x$new_path" = x \
39528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39530      new_path="$path"
39531
39532  windows_path="$new_path"
39533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39534    unix_path=`$CYGPATH -u "$windows_path"`
39535    new_path="$unix_path"
39536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39538    new_path="$unix_path"
39539  fi
39540
39541    fi
39542
39543    if test "x$new_path" = x; then
39544      # It's still not found. Now this is an unrecoverable error.
39545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39546$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39547      has_space=`$ECHO "$complete" | $GREP " "`
39548      if test "x$has_space" != x; then
39549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39551      fi
39552      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39553    fi
39554  fi
39555
39556  # Now new_path has a complete unix path to the binary
39557  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39558    # Keep paths in /bin as-is, but remove trailing .exe if any
39559    new_path="${new_path/%.exe/}"
39560    # Do not save /bin paths to all_fixpath_prefixes!
39561  else
39562    # Not in mixed or Windows style, start by that.
39563    new_path=`cmd //c echo $new_path`
39564
39565  input_path="$new_path"
39566  # Check if we need to convert this using DOS-style short mode. If the path
39567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39568  # take no chances and rewrite it.
39569  # Note: m4 eats our [], so we need to use [ and ] instead.
39570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39571  if test "x$has_forbidden_chars" != x; then
39572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39574  fi
39575
39576    # Output is in $new_path
39577
39578  windows_path="$new_path"
39579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39580    unix_path=`$CYGPATH -u "$windows_path"`
39581    new_path="$unix_path"
39582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39584    new_path="$unix_path"
39585  fi
39586
39587    # remove trailing .exe if any
39588    new_path="${new_path/%.exe/}"
39589
39590    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39591    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39592  fi
39593
39594    else
39595      # We're on a unix platform. Hooray! :)
39596      # First separate the path from the arguments. This will split at the first
39597      # space.
39598      complete="$MT"
39599      path="${complete%% *}"
39600      tmp="$complete EOL"
39601      arguments="${tmp#* }"
39602
39603      # Cannot rely on the command "which" here since it doesn't always work.
39604      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39605      if test -z "$is_absolute_path"; then
39606        # Path to executable is not absolute. Find it.
39607        IFS_save="$IFS"
39608        IFS=:
39609        for p in $PATH; do
39610          if test -f "$p/$path" && test -x "$p/$path"; then
39611            new_path="$p/$path"
39612            break
39613          fi
39614        done
39615        IFS="$IFS_save"
39616      else
39617        # This is an absolute path, we can use it without further modifications.
39618        new_path="$path"
39619      fi
39620
39621      if test "x$new_path" = x; then
39622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39623$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39624        has_space=`$ECHO "$complete" | $GREP " "`
39625        if test "x$has_space" != x; then
39626          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39627$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39628        fi
39629        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39630      fi
39631    fi
39632
39633    # Now join together the path and the arguments once again
39634    if test "x$arguments" != xEOL; then
39635      new_complete="$new_path ${arguments% *}"
39636    else
39637      new_complete="$new_path"
39638    fi
39639
39640    if test "x$complete" != "x$new_complete"; then
39641      MT="$new_complete"
39642      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39643$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39644    fi
39645  fi
39646
39647    # Setup the resource compiler (RC)
39648    # Extract the first word of "rc", so it can be a program name with args.
39649set dummy rc; ac_word=$2
39650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39651$as_echo_n "checking for $ac_word... " >&6; }
39652if ${ac_cv_prog_RC+:} false; then :
39653  $as_echo_n "(cached) " >&6
39654else
39655  if test -n "$RC"; then
39656  ac_cv_prog_RC="$RC" # Let the user override the test.
39657else
39658  ac_prog_rejected=no
39659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39660for as_dir in $PATH
39661do
39662  IFS=$as_save_IFS
39663  test -z "$as_dir" && as_dir=.
39664    for ac_exec_ext in '' $ac_executable_extensions; do
39665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39666    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39667       ac_prog_rejected=yes
39668       continue
39669     fi
39670    ac_cv_prog_RC="rc"
39671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39672    break 2
39673  fi
39674done
39675  done
39676IFS=$as_save_IFS
39677
39678if test $ac_prog_rejected = yes; then
39679  # We found a bogon in the path, so make sure we never use it.
39680  set dummy $ac_cv_prog_RC
39681  shift
39682  if test $# != 0; then
39683    # We chose a different compiler from the bogus one.
39684    # However, it has the same basename, so the bogon will be chosen
39685    # first if we set RC to just the basename; use the full file name.
39686    shift
39687    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39688  fi
39689fi
39690fi
39691fi
39692RC=$ac_cv_prog_RC
39693if test -n "$RC"; then
39694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39695$as_echo "$RC" >&6; }
39696else
39697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39698$as_echo "no" >&6; }
39699fi
39700
39701
39702
39703  # Only process if variable expands to non-empty
39704
39705  if test "x$RC" != x; then
39706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39707
39708  # First separate the path from the arguments. This will split at the first
39709  # space.
39710  complete="$RC"
39711  path="${complete%% *}"
39712  tmp="$complete EOL"
39713  arguments="${tmp#* }"
39714
39715  # Input might be given as Windows format, start by converting to
39716  # unix format.
39717  new_path=`$CYGPATH -u "$path"`
39718
39719  # Now try to locate executable using which
39720  new_path=`$WHICH "$new_path" 2> /dev/null`
39721  # bat and cmd files are not always considered executable in cygwin causing which
39722  # to not find them
39723  if test "x$new_path" = x \
39724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39726    new_path=`$CYGPATH -u "$path"`
39727  fi
39728  if test "x$new_path" = x; then
39729    # Oops. Which didn't find the executable.
39730    # The splitting of arguments from the executable at a space might have been incorrect,
39731    # since paths with space are more likely in Windows. Give it another try with the whole
39732    # argument.
39733    path="$complete"
39734    arguments="EOL"
39735    new_path=`$CYGPATH -u "$path"`
39736    new_path=`$WHICH "$new_path" 2> /dev/null`
39737    # bat and cmd files are not always considered executable in cygwin causing which
39738    # to not find them
39739    if test "x$new_path" = x \
39740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39742      new_path=`$CYGPATH -u "$path"`
39743    fi
39744    if test "x$new_path" = x; then
39745      # It's still not found. Now this is an unrecoverable error.
39746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39747$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39748      has_space=`$ECHO "$complete" | $GREP " "`
39749      if test "x$has_space" != x; then
39750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39752      fi
39753      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39754    fi
39755  fi
39756
39757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39760  # "foo.exe" is OK but "foo" is an error.
39761  #
39762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39763  # It is also a way to make sure we got the proper file name for the real test later on.
39764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39765  if test "x$test_shortpath" = x; then
39766    # Short path failed, file does not exist as specified.
39767    # Try adding .exe or .cmd
39768    if test -f "${new_path}.exe"; then
39769      input_to_shortpath="${new_path}.exe"
39770    elif test -f "${new_path}.cmd"; then
39771      input_to_shortpath="${new_path}.cmd"
39772    else
39773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39774$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39777      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39778    fi
39779  else
39780    input_to_shortpath="$new_path"
39781  fi
39782
39783  # Call helper function which possibly converts this using DOS-style short mode.
39784  # If so, the updated path is stored in $new_path.
39785  new_path="$input_to_shortpath"
39786
39787  input_path="$input_to_shortpath"
39788  # Check if we need to convert this using DOS-style short mode. If the path
39789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39790  # take no chances and rewrite it.
39791  # Note: m4 eats our [], so we need to use [ and ] instead.
39792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39793  if test "x$has_forbidden_chars" != x; then
39794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39798      # Going to short mode and back again did indeed matter. Since short mode is
39799      # case insensitive, let's make it lowercase to improve readability.
39800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39801      # Now convert it back to Unix-style (cygpath)
39802      input_path=`$CYGPATH -u "$shortmode_path"`
39803      new_path="$input_path"
39804    fi
39805  fi
39806
39807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39808  if test "x$test_cygdrive_prefix" = x; then
39809    # As a simple fix, exclude /usr/bin since it's not a real path.
39810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39812      # a path prefixed by /cygdrive for fixpath to work.
39813      new_path="$CYGWIN_ROOT_PATH$input_path"
39814    fi
39815  fi
39816
39817  # remove trailing .exe if any
39818  new_path="${new_path/%.exe/}"
39819
39820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39821
39822  # First separate the path from the arguments. This will split at the first
39823  # space.
39824  complete="$RC"
39825  path="${complete%% *}"
39826  tmp="$complete EOL"
39827  arguments="${tmp#* }"
39828
39829  # Input might be given as Windows format, start by converting to
39830  # unix format.
39831  new_path="$path"
39832
39833  windows_path="$new_path"
39834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39835    unix_path=`$CYGPATH -u "$windows_path"`
39836    new_path="$unix_path"
39837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39839    new_path="$unix_path"
39840  fi
39841
39842
39843  # Now try to locate executable using which
39844  new_path=`$WHICH "$new_path" 2> /dev/null`
39845
39846  if test "x$new_path" = x; then
39847    # Oops. Which didn't find the executable.
39848    # The splitting of arguments from the executable at a space might have been incorrect,
39849    # since paths with space are more likely in Windows. Give it another try with the whole
39850    # argument.
39851    path="$complete"
39852    arguments="EOL"
39853    new_path="$path"
39854
39855  windows_path="$new_path"
39856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39857    unix_path=`$CYGPATH -u "$windows_path"`
39858    new_path="$unix_path"
39859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39861    new_path="$unix_path"
39862  fi
39863
39864
39865    new_path=`$WHICH "$new_path" 2> /dev/null`
39866    # bat and cmd files are not always considered executable in MSYS causing which
39867    # to not find them
39868    if test "x$new_path" = x \
39869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39871      new_path="$path"
39872
39873  windows_path="$new_path"
39874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39875    unix_path=`$CYGPATH -u "$windows_path"`
39876    new_path="$unix_path"
39877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39879    new_path="$unix_path"
39880  fi
39881
39882    fi
39883
39884    if test "x$new_path" = x; then
39885      # It's still not found. Now this is an unrecoverable error.
39886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39887$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39888      has_space=`$ECHO "$complete" | $GREP " "`
39889      if test "x$has_space" != x; then
39890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39892      fi
39893      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39894    fi
39895  fi
39896
39897  # Now new_path has a complete unix path to the binary
39898  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39899    # Keep paths in /bin as-is, but remove trailing .exe if any
39900    new_path="${new_path/%.exe/}"
39901    # Do not save /bin paths to all_fixpath_prefixes!
39902  else
39903    # Not in mixed or Windows style, start by that.
39904    new_path=`cmd //c echo $new_path`
39905
39906  input_path="$new_path"
39907  # Check if we need to convert this using DOS-style short mode. If the path
39908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39909  # take no chances and rewrite it.
39910  # Note: m4 eats our [], so we need to use [ and ] instead.
39911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39912  if test "x$has_forbidden_chars" != x; then
39913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39915  fi
39916
39917    # Output is in $new_path
39918
39919  windows_path="$new_path"
39920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39921    unix_path=`$CYGPATH -u "$windows_path"`
39922    new_path="$unix_path"
39923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39925    new_path="$unix_path"
39926  fi
39927
39928    # remove trailing .exe if any
39929    new_path="${new_path/%.exe/}"
39930
39931    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39932    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39933  fi
39934
39935    else
39936      # We're on a unix platform. Hooray! :)
39937      # First separate the path from the arguments. This will split at the first
39938      # space.
39939      complete="$RC"
39940      path="${complete%% *}"
39941      tmp="$complete EOL"
39942      arguments="${tmp#* }"
39943
39944      # Cannot rely on the command "which" here since it doesn't always work.
39945      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39946      if test -z "$is_absolute_path"; then
39947        # Path to executable is not absolute. Find it.
39948        IFS_save="$IFS"
39949        IFS=:
39950        for p in $PATH; do
39951          if test -f "$p/$path" && test -x "$p/$path"; then
39952            new_path="$p/$path"
39953            break
39954          fi
39955        done
39956        IFS="$IFS_save"
39957      else
39958        # This is an absolute path, we can use it without further modifications.
39959        new_path="$path"
39960      fi
39961
39962      if test "x$new_path" = x; then
39963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39964$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39965        has_space=`$ECHO "$complete" | $GREP " "`
39966        if test "x$has_space" != x; then
39967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39969        fi
39970        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39971      fi
39972    fi
39973
39974    # Now join together the path and the arguments once again
39975    if test "x$arguments" != xEOL; then
39976      new_complete="$new_path ${arguments% *}"
39977    else
39978      new_complete="$new_path"
39979    fi
39980
39981    if test "x$complete" != "x$new_complete"; then
39982      RC="$new_complete"
39983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39984$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39985    fi
39986  fi
39987
39988    # Extract the first word of "dumpbin", so it can be a program name with args.
39989set dummy dumpbin; ac_word=$2
39990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39991$as_echo_n "checking for $ac_word... " >&6; }
39992if ${ac_cv_prog_DUMPBIN+:} false; then :
39993  $as_echo_n "(cached) " >&6
39994else
39995  if test -n "$DUMPBIN"; then
39996  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39997else
39998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39999for as_dir in $PATH
40000do
40001  IFS=$as_save_IFS
40002  test -z "$as_dir" && as_dir=.
40003    for ac_exec_ext in '' $ac_executable_extensions; do
40004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40005    ac_cv_prog_DUMPBIN="dumpbin"
40006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40007    break 2
40008  fi
40009done
40010  done
40011IFS=$as_save_IFS
40012
40013fi
40014fi
40015DUMPBIN=$ac_cv_prog_DUMPBIN
40016if test -n "$DUMPBIN"; then
40017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40018$as_echo "$DUMPBIN" >&6; }
40019else
40020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40021$as_echo "no" >&6; }
40022fi
40023
40024
40025
40026  # Only process if variable expands to non-empty
40027
40028  if test "x$DUMPBIN" != x; then
40029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40030
40031  # First separate the path from the arguments. This will split at the first
40032  # space.
40033  complete="$DUMPBIN"
40034  path="${complete%% *}"
40035  tmp="$complete EOL"
40036  arguments="${tmp#* }"
40037
40038  # Input might be given as Windows format, start by converting to
40039  # unix format.
40040  new_path=`$CYGPATH -u "$path"`
40041
40042  # Now try to locate executable using which
40043  new_path=`$WHICH "$new_path" 2> /dev/null`
40044  # bat and cmd files are not always considered executable in cygwin causing which
40045  # to not find them
40046  if test "x$new_path" = x \
40047      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40048      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40049    new_path=`$CYGPATH -u "$path"`
40050  fi
40051  if test "x$new_path" = x; then
40052    # Oops. Which didn't find the executable.
40053    # The splitting of arguments from the executable at a space might have been incorrect,
40054    # since paths with space are more likely in Windows. Give it another try with the whole
40055    # argument.
40056    path="$complete"
40057    arguments="EOL"
40058    new_path=`$CYGPATH -u "$path"`
40059    new_path=`$WHICH "$new_path" 2> /dev/null`
40060    # bat and cmd files are not always considered executable in cygwin causing which
40061    # to not find them
40062    if test "x$new_path" = x \
40063        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40064        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40065      new_path=`$CYGPATH -u "$path"`
40066    fi
40067    if test "x$new_path" = x; then
40068      # It's still not found. Now this is an unrecoverable error.
40069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40070$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40071      has_space=`$ECHO "$complete" | $GREP " "`
40072      if test "x$has_space" != x; then
40073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40075      fi
40076      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40077    fi
40078  fi
40079
40080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40083  # "foo.exe" is OK but "foo" is an error.
40084  #
40085  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40086  # It is also a way to make sure we got the proper file name for the real test later on.
40087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40088  if test "x$test_shortpath" = x; then
40089    # Short path failed, file does not exist as specified.
40090    # Try adding .exe or .cmd
40091    if test -f "${new_path}.exe"; then
40092      input_to_shortpath="${new_path}.exe"
40093    elif test -f "${new_path}.cmd"; then
40094      input_to_shortpath="${new_path}.cmd"
40095    else
40096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40097$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40098      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40099$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40100      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40101    fi
40102  else
40103    input_to_shortpath="$new_path"
40104  fi
40105
40106  # Call helper function which possibly converts this using DOS-style short mode.
40107  # If so, the updated path is stored in $new_path.
40108  new_path="$input_to_shortpath"
40109
40110  input_path="$input_to_shortpath"
40111  # Check if we need to convert this using DOS-style short mode. If the path
40112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40113  # take no chances and rewrite it.
40114  # Note: m4 eats our [], so we need to use [ and ] instead.
40115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40116  if test "x$has_forbidden_chars" != x; then
40117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40121      # Going to short mode and back again did indeed matter. Since short mode is
40122      # case insensitive, let's make it lowercase to improve readability.
40123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40124      # Now convert it back to Unix-style (cygpath)
40125      input_path=`$CYGPATH -u "$shortmode_path"`
40126      new_path="$input_path"
40127    fi
40128  fi
40129
40130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40131  if test "x$test_cygdrive_prefix" = x; then
40132    # As a simple fix, exclude /usr/bin since it's not a real path.
40133    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40135      # a path prefixed by /cygdrive for fixpath to work.
40136      new_path="$CYGWIN_ROOT_PATH$input_path"
40137    fi
40138  fi
40139
40140  # remove trailing .exe if any
40141  new_path="${new_path/%.exe/}"
40142
40143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40144
40145  # First separate the path from the arguments. This will split at the first
40146  # space.
40147  complete="$DUMPBIN"
40148  path="${complete%% *}"
40149  tmp="$complete EOL"
40150  arguments="${tmp#* }"
40151
40152  # Input might be given as Windows format, start by converting to
40153  # unix format.
40154  new_path="$path"
40155
40156  windows_path="$new_path"
40157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40158    unix_path=`$CYGPATH -u "$windows_path"`
40159    new_path="$unix_path"
40160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40162    new_path="$unix_path"
40163  fi
40164
40165
40166  # Now try to locate executable using which
40167  new_path=`$WHICH "$new_path" 2> /dev/null`
40168
40169  if test "x$new_path" = x; then
40170    # Oops. Which didn't find the executable.
40171    # The splitting of arguments from the executable at a space might have been incorrect,
40172    # since paths with space are more likely in Windows. Give it another try with the whole
40173    # argument.
40174    path="$complete"
40175    arguments="EOL"
40176    new_path="$path"
40177
40178  windows_path="$new_path"
40179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40180    unix_path=`$CYGPATH -u "$windows_path"`
40181    new_path="$unix_path"
40182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40184    new_path="$unix_path"
40185  fi
40186
40187
40188    new_path=`$WHICH "$new_path" 2> /dev/null`
40189    # bat and cmd files are not always considered executable in MSYS causing which
40190    # to not find them
40191    if test "x$new_path" = x \
40192        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40193        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40194      new_path="$path"
40195
40196  windows_path="$new_path"
40197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40198    unix_path=`$CYGPATH -u "$windows_path"`
40199    new_path="$unix_path"
40200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40202    new_path="$unix_path"
40203  fi
40204
40205    fi
40206
40207    if test "x$new_path" = x; then
40208      # It's still not found. Now this is an unrecoverable error.
40209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40210$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40211      has_space=`$ECHO "$complete" | $GREP " "`
40212      if test "x$has_space" != x; then
40213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40215      fi
40216      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40217    fi
40218  fi
40219
40220  # Now new_path has a complete unix path to the binary
40221  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40222    # Keep paths in /bin as-is, but remove trailing .exe if any
40223    new_path="${new_path/%.exe/}"
40224    # Do not save /bin paths to all_fixpath_prefixes!
40225  else
40226    # Not in mixed or Windows style, start by that.
40227    new_path=`cmd //c echo $new_path`
40228
40229  input_path="$new_path"
40230  # Check if we need to convert this using DOS-style short mode. If the path
40231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40232  # take no chances and rewrite it.
40233  # Note: m4 eats our [], so we need to use [ and ] instead.
40234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40235  if test "x$has_forbidden_chars" != x; then
40236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40238  fi
40239
40240    # Output is in $new_path
40241
40242  windows_path="$new_path"
40243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40244    unix_path=`$CYGPATH -u "$windows_path"`
40245    new_path="$unix_path"
40246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40248    new_path="$unix_path"
40249  fi
40250
40251    # remove trailing .exe if any
40252    new_path="${new_path/%.exe/}"
40253
40254    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40255    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40256  fi
40257
40258    else
40259      # We're on a unix platform. Hooray! :)
40260      # First separate the path from the arguments. This will split at the first
40261      # space.
40262      complete="$DUMPBIN"
40263      path="${complete%% *}"
40264      tmp="$complete EOL"
40265      arguments="${tmp#* }"
40266
40267      # Cannot rely on the command "which" here since it doesn't always work.
40268      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40269      if test -z "$is_absolute_path"; then
40270        # Path to executable is not absolute. Find it.
40271        IFS_save="$IFS"
40272        IFS=:
40273        for p in $PATH; do
40274          if test -f "$p/$path" && test -x "$p/$path"; then
40275            new_path="$p/$path"
40276            break
40277          fi
40278        done
40279        IFS="$IFS_save"
40280      else
40281        # This is an absolute path, we can use it without further modifications.
40282        new_path="$path"
40283      fi
40284
40285      if test "x$new_path" = x; then
40286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40287$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40288        has_space=`$ECHO "$complete" | $GREP " "`
40289        if test "x$has_space" != x; then
40290          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40291$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40292        fi
40293        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40294      fi
40295    fi
40296
40297    # Now join together the path and the arguments once again
40298    if test "x$arguments" != xEOL; then
40299      new_complete="$new_path ${arguments% *}"
40300    else
40301      new_complete="$new_path"
40302    fi
40303
40304    if test "x$complete" != "x$new_complete"; then
40305      DUMPBIN="$new_complete"
40306      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40307$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40308    fi
40309  fi
40310
40311    # We need to check for 'msbuild.exe' because at the place where we expect to
40312    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40313    # won't find the 'msbuild.exe' executable in that case (and the
40314    # 'ac_executable_extensions' is unusable due to performance reasons).
40315    # Notice that we intentionally don't fix up the path to MSBUILD because we
40316    # will call it in a DOS shell during freetype detection on Windows (see
40317    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40318    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40319set dummy msbuild.exe; ac_word=$2
40320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40321$as_echo_n "checking for $ac_word... " >&6; }
40322if ${ac_cv_prog_MSBUILD+:} false; then :
40323  $as_echo_n "(cached) " >&6
40324else
40325  if test -n "$MSBUILD"; then
40326  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40327else
40328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40329for as_dir in $PATH
40330do
40331  IFS=$as_save_IFS
40332  test -z "$as_dir" && as_dir=.
40333    for ac_exec_ext in '' $ac_executable_extensions; do
40334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40335    ac_cv_prog_MSBUILD="msbuild.exe"
40336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40337    break 2
40338  fi
40339done
40340  done
40341IFS=$as_save_IFS
40342
40343fi
40344fi
40345MSBUILD=$ac_cv_prog_MSBUILD
40346if test -n "$MSBUILD"; then
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40348$as_echo "$MSBUILD" >&6; }
40349else
40350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40351$as_echo "no" >&6; }
40352fi
40353
40354
40355  fi
40356
40357  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40358
40359
40360  # Publish this variable in the help.
40361
40362
40363  if [ -z "${STRIP+x}" ]; then
40364    # The variable is not set by user, try to locate tool using the code snippet
40365    for ac_prog in strip
40366do
40367  # Extract the first word of "$ac_prog", so it can be a program name with args.
40368set dummy $ac_prog; ac_word=$2
40369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40370$as_echo_n "checking for $ac_word... " >&6; }
40371if ${ac_cv_path_STRIP+:} false; then :
40372  $as_echo_n "(cached) " >&6
40373else
40374  case $STRIP in
40375  [\\/]* | ?:[\\/]*)
40376  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40377  ;;
40378  *)
40379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40380for as_dir in $PATH
40381do
40382  IFS=$as_save_IFS
40383  test -z "$as_dir" && as_dir=.
40384    for ac_exec_ext in '' $ac_executable_extensions; do
40385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40386    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40388    break 2
40389  fi
40390done
40391  done
40392IFS=$as_save_IFS
40393
40394  ;;
40395esac
40396fi
40397STRIP=$ac_cv_path_STRIP
40398if test -n "$STRIP"; then
40399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40400$as_echo "$STRIP" >&6; }
40401else
40402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40403$as_echo "no" >&6; }
40404fi
40405
40406
40407  test -n "$STRIP" && break
40408done
40409
40410  else
40411    # The variable is set, but is it from the command line or the environment?
40412
40413    # Try to remove the string !STRIP! from our list.
40414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40416      # If it failed, the variable was not from the command line. Ignore it,
40417      # but warn the user (except for BASH, which is always set by the calling BASH).
40418      if test "xSTRIP" != xBASH; then
40419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40420$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40421      fi
40422      # Try to locate tool using the code snippet
40423      for ac_prog in strip
40424do
40425  # Extract the first word of "$ac_prog", so it can be a program name with args.
40426set dummy $ac_prog; ac_word=$2
40427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40428$as_echo_n "checking for $ac_word... " >&6; }
40429if ${ac_cv_path_STRIP+:} false; then :
40430  $as_echo_n "(cached) " >&6
40431else
40432  case $STRIP in
40433  [\\/]* | ?:[\\/]*)
40434  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40435  ;;
40436  *)
40437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40438for as_dir in $PATH
40439do
40440  IFS=$as_save_IFS
40441  test -z "$as_dir" && as_dir=.
40442    for ac_exec_ext in '' $ac_executable_extensions; do
40443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40444    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40446    break 2
40447  fi
40448done
40449  done
40450IFS=$as_save_IFS
40451
40452  ;;
40453esac
40454fi
40455STRIP=$ac_cv_path_STRIP
40456if test -n "$STRIP"; then
40457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40458$as_echo "$STRIP" >&6; }
40459else
40460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40461$as_echo "no" >&6; }
40462fi
40463
40464
40465  test -n "$STRIP" && break
40466done
40467
40468    else
40469      # If it succeeded, then it was overridden by the user. We will use it
40470      # for the tool.
40471
40472      # First remove it from the list of overridden variables, so we can test
40473      # for unknown variables in the end.
40474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40475
40476      # Check if we try to supply an empty value
40477      if test "x$STRIP" = x; then
40478        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40479$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40481$as_echo_n "checking for STRIP... " >&6; }
40482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40483$as_echo "disabled" >&6; }
40484      else
40485        # Check if the provided tool contains a complete path.
40486        tool_specified="$STRIP"
40487        tool_basename="${tool_specified##*/}"
40488        if test "x$tool_basename" = "x$tool_specified"; then
40489          # A command without a complete path is provided, search $PATH.
40490          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40491$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40492          # Extract the first word of "$tool_basename", so it can be a program name with args.
40493set dummy $tool_basename; ac_word=$2
40494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40495$as_echo_n "checking for $ac_word... " >&6; }
40496if ${ac_cv_path_STRIP+:} false; then :
40497  $as_echo_n "(cached) " >&6
40498else
40499  case $STRIP in
40500  [\\/]* | ?:[\\/]*)
40501  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40502  ;;
40503  *)
40504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40505for as_dir in $PATH
40506do
40507  IFS=$as_save_IFS
40508  test -z "$as_dir" && as_dir=.
40509    for ac_exec_ext in '' $ac_executable_extensions; do
40510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40511    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40513    break 2
40514  fi
40515done
40516  done
40517IFS=$as_save_IFS
40518
40519  ;;
40520esac
40521fi
40522STRIP=$ac_cv_path_STRIP
40523if test -n "$STRIP"; then
40524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40525$as_echo "$STRIP" >&6; }
40526else
40527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40528$as_echo "no" >&6; }
40529fi
40530
40531
40532          if test "x$STRIP" = x; then
40533            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40534          fi
40535        else
40536          # Otherwise we believe it is a complete path. Use it as it is.
40537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40538$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40539          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40540$as_echo_n "checking for STRIP... " >&6; }
40541          if test ! -x "$tool_specified"; then
40542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40543$as_echo "not found" >&6; }
40544            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40545          fi
40546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40547$as_echo "$tool_specified" >&6; }
40548        fi
40549      fi
40550    fi
40551
40552  fi
40553
40554
40555
40556  # Only process if variable expands to non-empty
40557
40558  if test "x$STRIP" != x; then
40559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40560
40561  # First separate the path from the arguments. This will split at the first
40562  # space.
40563  complete="$STRIP"
40564  path="${complete%% *}"
40565  tmp="$complete EOL"
40566  arguments="${tmp#* }"
40567
40568  # Input might be given as Windows format, start by converting to
40569  # unix format.
40570  new_path=`$CYGPATH -u "$path"`
40571
40572  # Now try to locate executable using which
40573  new_path=`$WHICH "$new_path" 2> /dev/null`
40574  # bat and cmd files are not always considered executable in cygwin causing which
40575  # to not find them
40576  if test "x$new_path" = x \
40577      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40578      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40579    new_path=`$CYGPATH -u "$path"`
40580  fi
40581  if test "x$new_path" = x; then
40582    # Oops. Which didn't find the executable.
40583    # The splitting of arguments from the executable at a space might have been incorrect,
40584    # since paths with space are more likely in Windows. Give it another try with the whole
40585    # argument.
40586    path="$complete"
40587    arguments="EOL"
40588    new_path=`$CYGPATH -u "$path"`
40589    new_path=`$WHICH "$new_path" 2> /dev/null`
40590    # bat and cmd files are not always considered executable in cygwin causing which
40591    # to not find them
40592    if test "x$new_path" = x \
40593        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40594        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40595      new_path=`$CYGPATH -u "$path"`
40596    fi
40597    if test "x$new_path" = x; then
40598      # It's still not found. Now this is an unrecoverable error.
40599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40600$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40601      has_space=`$ECHO "$complete" | $GREP " "`
40602      if test "x$has_space" != x; then
40603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40605      fi
40606      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40607    fi
40608  fi
40609
40610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40613  # "foo.exe" is OK but "foo" is an error.
40614  #
40615  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40616  # It is also a way to make sure we got the proper file name for the real test later on.
40617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40618  if test "x$test_shortpath" = x; then
40619    # Short path failed, file does not exist as specified.
40620    # Try adding .exe or .cmd
40621    if test -f "${new_path}.exe"; then
40622      input_to_shortpath="${new_path}.exe"
40623    elif test -f "${new_path}.cmd"; then
40624      input_to_shortpath="${new_path}.cmd"
40625    else
40626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40627$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40628      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40629$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40630      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40631    fi
40632  else
40633    input_to_shortpath="$new_path"
40634  fi
40635
40636  # Call helper function which possibly converts this using DOS-style short mode.
40637  # If so, the updated path is stored in $new_path.
40638  new_path="$input_to_shortpath"
40639
40640  input_path="$input_to_shortpath"
40641  # Check if we need to convert this using DOS-style short mode. If the path
40642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40643  # take no chances and rewrite it.
40644  # Note: m4 eats our [], so we need to use [ and ] instead.
40645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40646  if test "x$has_forbidden_chars" != x; then
40647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40651      # Going to short mode and back again did indeed matter. Since short mode is
40652      # case insensitive, let's make it lowercase to improve readability.
40653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40654      # Now convert it back to Unix-style (cygpath)
40655      input_path=`$CYGPATH -u "$shortmode_path"`
40656      new_path="$input_path"
40657    fi
40658  fi
40659
40660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40661  if test "x$test_cygdrive_prefix" = x; then
40662    # As a simple fix, exclude /usr/bin since it's not a real path.
40663    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40665      # a path prefixed by /cygdrive for fixpath to work.
40666      new_path="$CYGWIN_ROOT_PATH$input_path"
40667    fi
40668  fi
40669
40670  # remove trailing .exe if any
40671  new_path="${new_path/%.exe/}"
40672
40673    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40674
40675  # First separate the path from the arguments. This will split at the first
40676  # space.
40677  complete="$STRIP"
40678  path="${complete%% *}"
40679  tmp="$complete EOL"
40680  arguments="${tmp#* }"
40681
40682  # Input might be given as Windows format, start by converting to
40683  # unix format.
40684  new_path="$path"
40685
40686  windows_path="$new_path"
40687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40688    unix_path=`$CYGPATH -u "$windows_path"`
40689    new_path="$unix_path"
40690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40692    new_path="$unix_path"
40693  fi
40694
40695
40696  # Now try to locate executable using which
40697  new_path=`$WHICH "$new_path" 2> /dev/null`
40698
40699  if test "x$new_path" = x; then
40700    # Oops. Which didn't find the executable.
40701    # The splitting of arguments from the executable at a space might have been incorrect,
40702    # since paths with space are more likely in Windows. Give it another try with the whole
40703    # argument.
40704    path="$complete"
40705    arguments="EOL"
40706    new_path="$path"
40707
40708  windows_path="$new_path"
40709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40710    unix_path=`$CYGPATH -u "$windows_path"`
40711    new_path="$unix_path"
40712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40714    new_path="$unix_path"
40715  fi
40716
40717
40718    new_path=`$WHICH "$new_path" 2> /dev/null`
40719    # bat and cmd files are not always considered executable in MSYS causing which
40720    # to not find them
40721    if test "x$new_path" = x \
40722        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40723        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40724      new_path="$path"
40725
40726  windows_path="$new_path"
40727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40728    unix_path=`$CYGPATH -u "$windows_path"`
40729    new_path="$unix_path"
40730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40732    new_path="$unix_path"
40733  fi
40734
40735    fi
40736
40737    if test "x$new_path" = x; then
40738      # It's still not found. Now this is an unrecoverable error.
40739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40740$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40741      has_space=`$ECHO "$complete" | $GREP " "`
40742      if test "x$has_space" != x; then
40743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40745      fi
40746      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40747    fi
40748  fi
40749
40750  # Now new_path has a complete unix path to the binary
40751  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40752    # Keep paths in /bin as-is, but remove trailing .exe if any
40753    new_path="${new_path/%.exe/}"
40754    # Do not save /bin paths to all_fixpath_prefixes!
40755  else
40756    # Not in mixed or Windows style, start by that.
40757    new_path=`cmd //c echo $new_path`
40758
40759  input_path="$new_path"
40760  # Check if we need to convert this using DOS-style short mode. If the path
40761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40762  # take no chances and rewrite it.
40763  # Note: m4 eats our [], so we need to use [ and ] instead.
40764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40765  if test "x$has_forbidden_chars" != x; then
40766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40768  fi
40769
40770    # Output is in $new_path
40771
40772  windows_path="$new_path"
40773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40774    unix_path=`$CYGPATH -u "$windows_path"`
40775    new_path="$unix_path"
40776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40778    new_path="$unix_path"
40779  fi
40780
40781    # remove trailing .exe if any
40782    new_path="${new_path/%.exe/}"
40783
40784    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40785    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40786  fi
40787
40788    else
40789      # We're on a unix platform. Hooray! :)
40790      # First separate the path from the arguments. This will split at the first
40791      # space.
40792      complete="$STRIP"
40793      path="${complete%% *}"
40794      tmp="$complete EOL"
40795      arguments="${tmp#* }"
40796
40797      # Cannot rely on the command "which" here since it doesn't always work.
40798      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40799      if test -z "$is_absolute_path"; then
40800        # Path to executable is not absolute. Find it.
40801        IFS_save="$IFS"
40802        IFS=:
40803        for p in $PATH; do
40804          if test -f "$p/$path" && test -x "$p/$path"; then
40805            new_path="$p/$path"
40806            break
40807          fi
40808        done
40809        IFS="$IFS_save"
40810      else
40811        # This is an absolute path, we can use it without further modifications.
40812        new_path="$path"
40813      fi
40814
40815      if test "x$new_path" = x; then
40816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40817$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40818        has_space=`$ECHO "$complete" | $GREP " "`
40819        if test "x$has_space" != x; then
40820          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40821$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40822        fi
40823        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40824      fi
40825    fi
40826
40827    # Now join together the path and the arguments once again
40828    if test "x$arguments" != xEOL; then
40829      new_complete="$new_path ${arguments% *}"
40830    else
40831      new_complete="$new_path"
40832    fi
40833
40834    if test "x$complete" != "x$new_complete"; then
40835      STRIP="$new_complete"
40836      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40837$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40838    fi
40839  fi
40840
40841
40842
40843  # Publish this variable in the help.
40844
40845
40846  if [ -z "${NM+x}" ]; then
40847    # The variable is not set by user, try to locate tool using the code snippet
40848    for ac_prog in nm
40849do
40850  # Extract the first word of "$ac_prog", so it can be a program name with args.
40851set dummy $ac_prog; ac_word=$2
40852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40853$as_echo_n "checking for $ac_word... " >&6; }
40854if ${ac_cv_path_NM+:} false; then :
40855  $as_echo_n "(cached) " >&6
40856else
40857  case $NM in
40858  [\\/]* | ?:[\\/]*)
40859  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40860  ;;
40861  *)
40862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40863for as_dir in $PATH
40864do
40865  IFS=$as_save_IFS
40866  test -z "$as_dir" && as_dir=.
40867    for ac_exec_ext in '' $ac_executable_extensions; do
40868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40869    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40871    break 2
40872  fi
40873done
40874  done
40875IFS=$as_save_IFS
40876
40877  ;;
40878esac
40879fi
40880NM=$ac_cv_path_NM
40881if test -n "$NM"; then
40882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40883$as_echo "$NM" >&6; }
40884else
40885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40886$as_echo "no" >&6; }
40887fi
40888
40889
40890  test -n "$NM" && break
40891done
40892
40893  else
40894    # The variable is set, but is it from the command line or the environment?
40895
40896    # Try to remove the string !NM! from our list.
40897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40899      # If it failed, the variable was not from the command line. Ignore it,
40900      # but warn the user (except for BASH, which is always set by the calling BASH).
40901      if test "xNM" != xBASH; then
40902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40903$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40904      fi
40905      # Try to locate tool using the code snippet
40906      for ac_prog in nm
40907do
40908  # Extract the first word of "$ac_prog", so it can be a program name with args.
40909set dummy $ac_prog; ac_word=$2
40910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40911$as_echo_n "checking for $ac_word... " >&6; }
40912if ${ac_cv_path_NM+:} false; then :
40913  $as_echo_n "(cached) " >&6
40914else
40915  case $NM in
40916  [\\/]* | ?:[\\/]*)
40917  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40918  ;;
40919  *)
40920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40921for as_dir in $PATH
40922do
40923  IFS=$as_save_IFS
40924  test -z "$as_dir" && as_dir=.
40925    for ac_exec_ext in '' $ac_executable_extensions; do
40926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40927    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40929    break 2
40930  fi
40931done
40932  done
40933IFS=$as_save_IFS
40934
40935  ;;
40936esac
40937fi
40938NM=$ac_cv_path_NM
40939if test -n "$NM"; then
40940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40941$as_echo "$NM" >&6; }
40942else
40943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40944$as_echo "no" >&6; }
40945fi
40946
40947
40948  test -n "$NM" && break
40949done
40950
40951    else
40952      # If it succeeded, then it was overridden by the user. We will use it
40953      # for the tool.
40954
40955      # First remove it from the list of overridden variables, so we can test
40956      # for unknown variables in the end.
40957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40958
40959      # Check if we try to supply an empty value
40960      if test "x$NM" = x; then
40961        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40962$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40964$as_echo_n "checking for NM... " >&6; }
40965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40966$as_echo "disabled" >&6; }
40967      else
40968        # Check if the provided tool contains a complete path.
40969        tool_specified="$NM"
40970        tool_basename="${tool_specified##*/}"
40971        if test "x$tool_basename" = "x$tool_specified"; then
40972          # A command without a complete path is provided, search $PATH.
40973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40974$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40975          # Extract the first word of "$tool_basename", so it can be a program name with args.
40976set dummy $tool_basename; ac_word=$2
40977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40978$as_echo_n "checking for $ac_word... " >&6; }
40979if ${ac_cv_path_NM+:} false; then :
40980  $as_echo_n "(cached) " >&6
40981else
40982  case $NM in
40983  [\\/]* | ?:[\\/]*)
40984  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40985  ;;
40986  *)
40987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40988for as_dir in $PATH
40989do
40990  IFS=$as_save_IFS
40991  test -z "$as_dir" && as_dir=.
40992    for ac_exec_ext in '' $ac_executable_extensions; do
40993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40994    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40996    break 2
40997  fi
40998done
40999  done
41000IFS=$as_save_IFS
41001
41002  ;;
41003esac
41004fi
41005NM=$ac_cv_path_NM
41006if test -n "$NM"; then
41007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41008$as_echo "$NM" >&6; }
41009else
41010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41011$as_echo "no" >&6; }
41012fi
41013
41014
41015          if test "x$NM" = x; then
41016            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41017          fi
41018        else
41019          # Otherwise we believe it is a complete path. Use it as it is.
41020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41021$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41022          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41023$as_echo_n "checking for NM... " >&6; }
41024          if test ! -x "$tool_specified"; then
41025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41026$as_echo "not found" >&6; }
41027            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41028          fi
41029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41030$as_echo "$tool_specified" >&6; }
41031        fi
41032      fi
41033    fi
41034
41035  fi
41036
41037
41038
41039  # Only process if variable expands to non-empty
41040
41041  if test "x$NM" != x; then
41042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41043
41044  # First separate the path from the arguments. This will split at the first
41045  # space.
41046  complete="$NM"
41047  path="${complete%% *}"
41048  tmp="$complete EOL"
41049  arguments="${tmp#* }"
41050
41051  # Input might be given as Windows format, start by converting to
41052  # unix format.
41053  new_path=`$CYGPATH -u "$path"`
41054
41055  # Now try to locate executable using which
41056  new_path=`$WHICH "$new_path" 2> /dev/null`
41057  # bat and cmd files are not always considered executable in cygwin causing which
41058  # to not find them
41059  if test "x$new_path" = x \
41060      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41061      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41062    new_path=`$CYGPATH -u "$path"`
41063  fi
41064  if test "x$new_path" = x; then
41065    # Oops. Which didn't find the executable.
41066    # The splitting of arguments from the executable at a space might have been incorrect,
41067    # since paths with space are more likely in Windows. Give it another try with the whole
41068    # argument.
41069    path="$complete"
41070    arguments="EOL"
41071    new_path=`$CYGPATH -u "$path"`
41072    new_path=`$WHICH "$new_path" 2> /dev/null`
41073    # bat and cmd files are not always considered executable in cygwin causing which
41074    # to not find them
41075    if test "x$new_path" = x \
41076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41078      new_path=`$CYGPATH -u "$path"`
41079    fi
41080    if test "x$new_path" = x; then
41081      # It's still not found. Now this is an unrecoverable error.
41082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41083$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41084      has_space=`$ECHO "$complete" | $GREP " "`
41085      if test "x$has_space" != x; then
41086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41088      fi
41089      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41090    fi
41091  fi
41092
41093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41096  # "foo.exe" is OK but "foo" is an error.
41097  #
41098  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41099  # It is also a way to make sure we got the proper file name for the real test later on.
41100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41101  if test "x$test_shortpath" = x; then
41102    # Short path failed, file does not exist as specified.
41103    # Try adding .exe or .cmd
41104    if test -f "${new_path}.exe"; then
41105      input_to_shortpath="${new_path}.exe"
41106    elif test -f "${new_path}.cmd"; then
41107      input_to_shortpath="${new_path}.cmd"
41108    else
41109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41110$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41111      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41112$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41113      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41114    fi
41115  else
41116    input_to_shortpath="$new_path"
41117  fi
41118
41119  # Call helper function which possibly converts this using DOS-style short mode.
41120  # If so, the updated path is stored in $new_path.
41121  new_path="$input_to_shortpath"
41122
41123  input_path="$input_to_shortpath"
41124  # Check if we need to convert this using DOS-style short mode. If the path
41125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41126  # take no chances and rewrite it.
41127  # Note: m4 eats our [], so we need to use [ and ] instead.
41128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41129  if test "x$has_forbidden_chars" != x; then
41130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41134      # Going to short mode and back again did indeed matter. Since short mode is
41135      # case insensitive, let's make it lowercase to improve readability.
41136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41137      # Now convert it back to Unix-style (cygpath)
41138      input_path=`$CYGPATH -u "$shortmode_path"`
41139      new_path="$input_path"
41140    fi
41141  fi
41142
41143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41144  if test "x$test_cygdrive_prefix" = x; then
41145    # As a simple fix, exclude /usr/bin since it's not a real path.
41146    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41148      # a path prefixed by /cygdrive for fixpath to work.
41149      new_path="$CYGWIN_ROOT_PATH$input_path"
41150    fi
41151  fi
41152
41153  # remove trailing .exe if any
41154  new_path="${new_path/%.exe/}"
41155
41156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41157
41158  # First separate the path from the arguments. This will split at the first
41159  # space.
41160  complete="$NM"
41161  path="${complete%% *}"
41162  tmp="$complete EOL"
41163  arguments="${tmp#* }"
41164
41165  # Input might be given as Windows format, start by converting to
41166  # unix format.
41167  new_path="$path"
41168
41169  windows_path="$new_path"
41170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41171    unix_path=`$CYGPATH -u "$windows_path"`
41172    new_path="$unix_path"
41173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41175    new_path="$unix_path"
41176  fi
41177
41178
41179  # Now try to locate executable using which
41180  new_path=`$WHICH "$new_path" 2> /dev/null`
41181
41182  if test "x$new_path" = x; then
41183    # Oops. Which didn't find the executable.
41184    # The splitting of arguments from the executable at a space might have been incorrect,
41185    # since paths with space are more likely in Windows. Give it another try with the whole
41186    # argument.
41187    path="$complete"
41188    arguments="EOL"
41189    new_path="$path"
41190
41191  windows_path="$new_path"
41192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41193    unix_path=`$CYGPATH -u "$windows_path"`
41194    new_path="$unix_path"
41195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41197    new_path="$unix_path"
41198  fi
41199
41200
41201    new_path=`$WHICH "$new_path" 2> /dev/null`
41202    # bat and cmd files are not always considered executable in MSYS causing which
41203    # to not find them
41204    if test "x$new_path" = x \
41205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41207      new_path="$path"
41208
41209  windows_path="$new_path"
41210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41211    unix_path=`$CYGPATH -u "$windows_path"`
41212    new_path="$unix_path"
41213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41215    new_path="$unix_path"
41216  fi
41217
41218    fi
41219
41220    if test "x$new_path" = x; then
41221      # It's still not found. Now this is an unrecoverable error.
41222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41223$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41224      has_space=`$ECHO "$complete" | $GREP " "`
41225      if test "x$has_space" != x; then
41226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41228      fi
41229      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41230    fi
41231  fi
41232
41233  # Now new_path has a complete unix path to the binary
41234  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41235    # Keep paths in /bin as-is, but remove trailing .exe if any
41236    new_path="${new_path/%.exe/}"
41237    # Do not save /bin paths to all_fixpath_prefixes!
41238  else
41239    # Not in mixed or Windows style, start by that.
41240    new_path=`cmd //c echo $new_path`
41241
41242  input_path="$new_path"
41243  # Check if we need to convert this using DOS-style short mode. If the path
41244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41245  # take no chances and rewrite it.
41246  # Note: m4 eats our [], so we need to use [ and ] instead.
41247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41248  if test "x$has_forbidden_chars" != x; then
41249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41251  fi
41252
41253    # Output is in $new_path
41254
41255  windows_path="$new_path"
41256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41257    unix_path=`$CYGPATH -u "$windows_path"`
41258    new_path="$unix_path"
41259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41261    new_path="$unix_path"
41262  fi
41263
41264    # remove trailing .exe if any
41265    new_path="${new_path/%.exe/}"
41266
41267    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41268    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41269  fi
41270
41271    else
41272      # We're on a unix platform. Hooray! :)
41273      # First separate the path from the arguments. This will split at the first
41274      # space.
41275      complete="$NM"
41276      path="${complete%% *}"
41277      tmp="$complete EOL"
41278      arguments="${tmp#* }"
41279
41280      # Cannot rely on the command "which" here since it doesn't always work.
41281      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41282      if test -z "$is_absolute_path"; then
41283        # Path to executable is not absolute. Find it.
41284        IFS_save="$IFS"
41285        IFS=:
41286        for p in $PATH; do
41287          if test -f "$p/$path" && test -x "$p/$path"; then
41288            new_path="$p/$path"
41289            break
41290          fi
41291        done
41292        IFS="$IFS_save"
41293      else
41294        # This is an absolute path, we can use it without further modifications.
41295        new_path="$path"
41296      fi
41297
41298      if test "x$new_path" = x; then
41299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41300$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41301        has_space=`$ECHO "$complete" | $GREP " "`
41302        if test "x$has_space" != x; then
41303          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41304$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41305        fi
41306        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41307      fi
41308    fi
41309
41310    # Now join together the path and the arguments once again
41311    if test "x$arguments" != xEOL; then
41312      new_complete="$new_path ${arguments% *}"
41313    else
41314      new_complete="$new_path"
41315    fi
41316
41317    if test "x$complete" != "x$new_complete"; then
41318      NM="$new_complete"
41319      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41320$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41321    fi
41322  fi
41323
41324
41325
41326  # Publish this variable in the help.
41327
41328
41329  if [ -z "${GNM+x}" ]; then
41330    # The variable is not set by user, try to locate tool using the code snippet
41331    for ac_prog in gnm
41332do
41333  # Extract the first word of "$ac_prog", so it can be a program name with args.
41334set dummy $ac_prog; ac_word=$2
41335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41336$as_echo_n "checking for $ac_word... " >&6; }
41337if ${ac_cv_path_GNM+:} false; then :
41338  $as_echo_n "(cached) " >&6
41339else
41340  case $GNM in
41341  [\\/]* | ?:[\\/]*)
41342  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41343  ;;
41344  *)
41345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41346for as_dir in $PATH
41347do
41348  IFS=$as_save_IFS
41349  test -z "$as_dir" && as_dir=.
41350    for ac_exec_ext in '' $ac_executable_extensions; do
41351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41352    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41354    break 2
41355  fi
41356done
41357  done
41358IFS=$as_save_IFS
41359
41360  ;;
41361esac
41362fi
41363GNM=$ac_cv_path_GNM
41364if test -n "$GNM"; then
41365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41366$as_echo "$GNM" >&6; }
41367else
41368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41369$as_echo "no" >&6; }
41370fi
41371
41372
41373  test -n "$GNM" && break
41374done
41375
41376  else
41377    # The variable is set, but is it from the command line or the environment?
41378
41379    # Try to remove the string !GNM! from our list.
41380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41382      # If it failed, the variable was not from the command line. Ignore it,
41383      # but warn the user (except for BASH, which is always set by the calling BASH).
41384      if test "xGNM" != xBASH; then
41385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41386$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41387      fi
41388      # Try to locate tool using the code snippet
41389      for ac_prog in gnm
41390do
41391  # Extract the first word of "$ac_prog", so it can be a program name with args.
41392set dummy $ac_prog; ac_word=$2
41393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41394$as_echo_n "checking for $ac_word... " >&6; }
41395if ${ac_cv_path_GNM+:} false; then :
41396  $as_echo_n "(cached) " >&6
41397else
41398  case $GNM in
41399  [\\/]* | ?:[\\/]*)
41400  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41401  ;;
41402  *)
41403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41404for as_dir in $PATH
41405do
41406  IFS=$as_save_IFS
41407  test -z "$as_dir" && as_dir=.
41408    for ac_exec_ext in '' $ac_executable_extensions; do
41409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41410    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41412    break 2
41413  fi
41414done
41415  done
41416IFS=$as_save_IFS
41417
41418  ;;
41419esac
41420fi
41421GNM=$ac_cv_path_GNM
41422if test -n "$GNM"; then
41423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41424$as_echo "$GNM" >&6; }
41425else
41426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41427$as_echo "no" >&6; }
41428fi
41429
41430
41431  test -n "$GNM" && break
41432done
41433
41434    else
41435      # If it succeeded, then it was overridden by the user. We will use it
41436      # for the tool.
41437
41438      # First remove it from the list of overridden variables, so we can test
41439      # for unknown variables in the end.
41440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41441
41442      # Check if we try to supply an empty value
41443      if test "x$GNM" = x; then
41444        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41445$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41447$as_echo_n "checking for GNM... " >&6; }
41448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41449$as_echo "disabled" >&6; }
41450      else
41451        # Check if the provided tool contains a complete path.
41452        tool_specified="$GNM"
41453        tool_basename="${tool_specified##*/}"
41454        if test "x$tool_basename" = "x$tool_specified"; then
41455          # A command without a complete path is provided, search $PATH.
41456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41457$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41458          # Extract the first word of "$tool_basename", so it can be a program name with args.
41459set dummy $tool_basename; ac_word=$2
41460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41461$as_echo_n "checking for $ac_word... " >&6; }
41462if ${ac_cv_path_GNM+:} false; then :
41463  $as_echo_n "(cached) " >&6
41464else
41465  case $GNM in
41466  [\\/]* | ?:[\\/]*)
41467  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41468  ;;
41469  *)
41470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41471for as_dir in $PATH
41472do
41473  IFS=$as_save_IFS
41474  test -z "$as_dir" && as_dir=.
41475    for ac_exec_ext in '' $ac_executable_extensions; do
41476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41477    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41479    break 2
41480  fi
41481done
41482  done
41483IFS=$as_save_IFS
41484
41485  ;;
41486esac
41487fi
41488GNM=$ac_cv_path_GNM
41489if test -n "$GNM"; then
41490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41491$as_echo "$GNM" >&6; }
41492else
41493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41494$as_echo "no" >&6; }
41495fi
41496
41497
41498          if test "x$GNM" = x; then
41499            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41500          fi
41501        else
41502          # Otherwise we believe it is a complete path. Use it as it is.
41503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41504$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41505          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41506$as_echo_n "checking for GNM... " >&6; }
41507          if test ! -x "$tool_specified"; then
41508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41509$as_echo "not found" >&6; }
41510            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41511          fi
41512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41513$as_echo "$tool_specified" >&6; }
41514        fi
41515      fi
41516    fi
41517
41518  fi
41519
41520
41521
41522  # Only process if variable expands to non-empty
41523
41524  if test "x$GNM" != x; then
41525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41526
41527  # First separate the path from the arguments. This will split at the first
41528  # space.
41529  complete="$GNM"
41530  path="${complete%% *}"
41531  tmp="$complete EOL"
41532  arguments="${tmp#* }"
41533
41534  # Input might be given as Windows format, start by converting to
41535  # unix format.
41536  new_path=`$CYGPATH -u "$path"`
41537
41538  # Now try to locate executable using which
41539  new_path=`$WHICH "$new_path" 2> /dev/null`
41540  # bat and cmd files are not always considered executable in cygwin causing which
41541  # to not find them
41542  if test "x$new_path" = x \
41543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41545    new_path=`$CYGPATH -u "$path"`
41546  fi
41547  if test "x$new_path" = x; then
41548    # Oops. Which didn't find the executable.
41549    # The splitting of arguments from the executable at a space might have been incorrect,
41550    # since paths with space are more likely in Windows. Give it another try with the whole
41551    # argument.
41552    path="$complete"
41553    arguments="EOL"
41554    new_path=`$CYGPATH -u "$path"`
41555    new_path=`$WHICH "$new_path" 2> /dev/null`
41556    # bat and cmd files are not always considered executable in cygwin causing which
41557    # to not find them
41558    if test "x$new_path" = x \
41559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41561      new_path=`$CYGPATH -u "$path"`
41562    fi
41563    if test "x$new_path" = x; then
41564      # It's still not found. Now this is an unrecoverable error.
41565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41566$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41567      has_space=`$ECHO "$complete" | $GREP " "`
41568      if test "x$has_space" != x; then
41569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41571      fi
41572      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41573    fi
41574  fi
41575
41576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41579  # "foo.exe" is OK but "foo" is an error.
41580  #
41581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41582  # It is also a way to make sure we got the proper file name for the real test later on.
41583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41584  if test "x$test_shortpath" = x; then
41585    # Short path failed, file does not exist as specified.
41586    # Try adding .exe or .cmd
41587    if test -f "${new_path}.exe"; then
41588      input_to_shortpath="${new_path}.exe"
41589    elif test -f "${new_path}.cmd"; then
41590      input_to_shortpath="${new_path}.cmd"
41591    else
41592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41593$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41596      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41597    fi
41598  else
41599    input_to_shortpath="$new_path"
41600  fi
41601
41602  # Call helper function which possibly converts this using DOS-style short mode.
41603  # If so, the updated path is stored in $new_path.
41604  new_path="$input_to_shortpath"
41605
41606  input_path="$input_to_shortpath"
41607  # Check if we need to convert this using DOS-style short mode. If the path
41608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41609  # take no chances and rewrite it.
41610  # Note: m4 eats our [], so we need to use [ and ] instead.
41611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41612  if test "x$has_forbidden_chars" != x; then
41613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41617      # Going to short mode and back again did indeed matter. Since short mode is
41618      # case insensitive, let's make it lowercase to improve readability.
41619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41620      # Now convert it back to Unix-style (cygpath)
41621      input_path=`$CYGPATH -u "$shortmode_path"`
41622      new_path="$input_path"
41623    fi
41624  fi
41625
41626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41627  if test "x$test_cygdrive_prefix" = x; then
41628    # As a simple fix, exclude /usr/bin since it's not a real path.
41629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41631      # a path prefixed by /cygdrive for fixpath to work.
41632      new_path="$CYGWIN_ROOT_PATH$input_path"
41633    fi
41634  fi
41635
41636  # remove trailing .exe if any
41637  new_path="${new_path/%.exe/}"
41638
41639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41640
41641  # First separate the path from the arguments. This will split at the first
41642  # space.
41643  complete="$GNM"
41644  path="${complete%% *}"
41645  tmp="$complete EOL"
41646  arguments="${tmp#* }"
41647
41648  # Input might be given as Windows format, start by converting to
41649  # unix format.
41650  new_path="$path"
41651
41652  windows_path="$new_path"
41653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41654    unix_path=`$CYGPATH -u "$windows_path"`
41655    new_path="$unix_path"
41656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41658    new_path="$unix_path"
41659  fi
41660
41661
41662  # Now try to locate executable using which
41663  new_path=`$WHICH "$new_path" 2> /dev/null`
41664
41665  if test "x$new_path" = x; then
41666    # Oops. Which didn't find the executable.
41667    # The splitting of arguments from the executable at a space might have been incorrect,
41668    # since paths with space are more likely in Windows. Give it another try with the whole
41669    # argument.
41670    path="$complete"
41671    arguments="EOL"
41672    new_path="$path"
41673
41674  windows_path="$new_path"
41675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41676    unix_path=`$CYGPATH -u "$windows_path"`
41677    new_path="$unix_path"
41678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41680    new_path="$unix_path"
41681  fi
41682
41683
41684    new_path=`$WHICH "$new_path" 2> /dev/null`
41685    # bat and cmd files are not always considered executable in MSYS causing which
41686    # to not find them
41687    if test "x$new_path" = x \
41688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41690      new_path="$path"
41691
41692  windows_path="$new_path"
41693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41694    unix_path=`$CYGPATH -u "$windows_path"`
41695    new_path="$unix_path"
41696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41698    new_path="$unix_path"
41699  fi
41700
41701    fi
41702
41703    if test "x$new_path" = x; then
41704      # It's still not found. Now this is an unrecoverable error.
41705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41706$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41707      has_space=`$ECHO "$complete" | $GREP " "`
41708      if test "x$has_space" != x; then
41709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41711      fi
41712      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41713    fi
41714  fi
41715
41716  # Now new_path has a complete unix path to the binary
41717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41718    # Keep paths in /bin as-is, but remove trailing .exe if any
41719    new_path="${new_path/%.exe/}"
41720    # Do not save /bin paths to all_fixpath_prefixes!
41721  else
41722    # Not in mixed or Windows style, start by that.
41723    new_path=`cmd //c echo $new_path`
41724
41725  input_path="$new_path"
41726  # Check if we need to convert this using DOS-style short mode. If the path
41727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41728  # take no chances and rewrite it.
41729  # Note: m4 eats our [], so we need to use [ and ] instead.
41730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41731  if test "x$has_forbidden_chars" != x; then
41732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41734  fi
41735
41736    # Output is in $new_path
41737
41738  windows_path="$new_path"
41739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41740    unix_path=`$CYGPATH -u "$windows_path"`
41741    new_path="$unix_path"
41742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41744    new_path="$unix_path"
41745  fi
41746
41747    # remove trailing .exe if any
41748    new_path="${new_path/%.exe/}"
41749
41750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41752  fi
41753
41754    else
41755      # We're on a unix platform. Hooray! :)
41756      # First separate the path from the arguments. This will split at the first
41757      # space.
41758      complete="$GNM"
41759      path="${complete%% *}"
41760      tmp="$complete EOL"
41761      arguments="${tmp#* }"
41762
41763      # Cannot rely on the command "which" here since it doesn't always work.
41764      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41765      if test -z "$is_absolute_path"; then
41766        # Path to executable is not absolute. Find it.
41767        IFS_save="$IFS"
41768        IFS=:
41769        for p in $PATH; do
41770          if test -f "$p/$path" && test -x "$p/$path"; then
41771            new_path="$p/$path"
41772            break
41773          fi
41774        done
41775        IFS="$IFS_save"
41776      else
41777        # This is an absolute path, we can use it without further modifications.
41778        new_path="$path"
41779      fi
41780
41781      if test "x$new_path" = x; then
41782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41783$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41784        has_space=`$ECHO "$complete" | $GREP " "`
41785        if test "x$has_space" != x; then
41786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41788        fi
41789        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41790      fi
41791    fi
41792
41793    # Now join together the path and the arguments once again
41794    if test "x$arguments" != xEOL; then
41795      new_complete="$new_path ${arguments% *}"
41796    else
41797      new_complete="$new_path"
41798    fi
41799
41800    if test "x$complete" != "x$new_complete"; then
41801      GNM="$new_complete"
41802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41803$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41804    fi
41805  fi
41806
41807  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41808    # FIXME: we should unify this with the solaris case above.
41809
41810
41811  # Publish this variable in the help.
41812
41813
41814  if [ -z "${STRIP+x}" ]; then
41815    # The variable is not set by user, try to locate tool using the code snippet
41816    if test -n "$ac_tool_prefix"; then
41817  for ac_prog in strip
41818  do
41819    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41820set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41822$as_echo_n "checking for $ac_word... " >&6; }
41823if ${ac_cv_prog_STRIP+:} false; then :
41824  $as_echo_n "(cached) " >&6
41825else
41826  if test -n "$STRIP"; then
41827  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41828else
41829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41830for as_dir in $PATH
41831do
41832  IFS=$as_save_IFS
41833  test -z "$as_dir" && as_dir=.
41834    for ac_exec_ext in '' $ac_executable_extensions; do
41835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41836    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41838    break 2
41839  fi
41840done
41841  done
41842IFS=$as_save_IFS
41843
41844fi
41845fi
41846STRIP=$ac_cv_prog_STRIP
41847if test -n "$STRIP"; then
41848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41849$as_echo "$STRIP" >&6; }
41850else
41851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41852$as_echo "no" >&6; }
41853fi
41854
41855
41856    test -n "$STRIP" && break
41857  done
41858fi
41859if test -z "$STRIP"; then
41860  ac_ct_STRIP=$STRIP
41861  for ac_prog in strip
41862do
41863  # Extract the first word of "$ac_prog", so it can be a program name with args.
41864set dummy $ac_prog; ac_word=$2
41865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41866$as_echo_n "checking for $ac_word... " >&6; }
41867if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41868  $as_echo_n "(cached) " >&6
41869else
41870  if test -n "$ac_ct_STRIP"; then
41871  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41872else
41873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41874for as_dir in $PATH
41875do
41876  IFS=$as_save_IFS
41877  test -z "$as_dir" && as_dir=.
41878    for ac_exec_ext in '' $ac_executable_extensions; do
41879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41880    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41882    break 2
41883  fi
41884done
41885  done
41886IFS=$as_save_IFS
41887
41888fi
41889fi
41890ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41891if test -n "$ac_ct_STRIP"; then
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41893$as_echo "$ac_ct_STRIP" >&6; }
41894else
41895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41896$as_echo "no" >&6; }
41897fi
41898
41899
41900  test -n "$ac_ct_STRIP" && break
41901done
41902
41903  if test "x$ac_ct_STRIP" = x; then
41904    STRIP=""
41905  else
41906    case $cross_compiling:$ac_tool_warned in
41907yes:)
41908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41910ac_tool_warned=yes ;;
41911esac
41912    STRIP=$ac_ct_STRIP
41913  fi
41914fi
41915
41916  else
41917    # The variable is set, but is it from the command line or the environment?
41918
41919    # Try to remove the string !STRIP! from our list.
41920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41922      # If it failed, the variable was not from the command line. Ignore it,
41923      # but warn the user (except for BASH, which is always set by the calling BASH).
41924      if test "xSTRIP" != xBASH; then
41925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41926$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41927      fi
41928      # Try to locate tool using the code snippet
41929      if test -n "$ac_tool_prefix"; then
41930  for ac_prog in strip
41931  do
41932    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41933set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41935$as_echo_n "checking for $ac_word... " >&6; }
41936if ${ac_cv_prog_STRIP+:} false; then :
41937  $as_echo_n "(cached) " >&6
41938else
41939  if test -n "$STRIP"; then
41940  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41941else
41942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41943for as_dir in $PATH
41944do
41945  IFS=$as_save_IFS
41946  test -z "$as_dir" && as_dir=.
41947    for ac_exec_ext in '' $ac_executable_extensions; do
41948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41949    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41951    break 2
41952  fi
41953done
41954  done
41955IFS=$as_save_IFS
41956
41957fi
41958fi
41959STRIP=$ac_cv_prog_STRIP
41960if test -n "$STRIP"; then
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41962$as_echo "$STRIP" >&6; }
41963else
41964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41965$as_echo "no" >&6; }
41966fi
41967
41968
41969    test -n "$STRIP" && break
41970  done
41971fi
41972if test -z "$STRIP"; then
41973  ac_ct_STRIP=$STRIP
41974  for ac_prog in strip
41975do
41976  # Extract the first word of "$ac_prog", so it can be a program name with args.
41977set dummy $ac_prog; ac_word=$2
41978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41979$as_echo_n "checking for $ac_word... " >&6; }
41980if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41981  $as_echo_n "(cached) " >&6
41982else
41983  if test -n "$ac_ct_STRIP"; then
41984  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41985else
41986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41987for as_dir in $PATH
41988do
41989  IFS=$as_save_IFS
41990  test -z "$as_dir" && as_dir=.
41991    for ac_exec_ext in '' $ac_executable_extensions; do
41992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41993    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41995    break 2
41996  fi
41997done
41998  done
41999IFS=$as_save_IFS
42000
42001fi
42002fi
42003ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42004if test -n "$ac_ct_STRIP"; then
42005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42006$as_echo "$ac_ct_STRIP" >&6; }
42007else
42008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42009$as_echo "no" >&6; }
42010fi
42011
42012
42013  test -n "$ac_ct_STRIP" && break
42014done
42015
42016  if test "x$ac_ct_STRIP" = x; then
42017    STRIP=""
42018  else
42019    case $cross_compiling:$ac_tool_warned in
42020yes:)
42021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42023ac_tool_warned=yes ;;
42024esac
42025    STRIP=$ac_ct_STRIP
42026  fi
42027fi
42028
42029    else
42030      # If it succeeded, then it was overridden by the user. We will use it
42031      # for the tool.
42032
42033      # First remove it from the list of overridden variables, so we can test
42034      # for unknown variables in the end.
42035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42036
42037      # Check if we try to supply an empty value
42038      if test "x$STRIP" = x; then
42039        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42040$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42042$as_echo_n "checking for STRIP... " >&6; }
42043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42044$as_echo "disabled" >&6; }
42045      else
42046        # Check if the provided tool contains a complete path.
42047        tool_specified="$STRIP"
42048        tool_basename="${tool_specified##*/}"
42049        if test "x$tool_basename" = "x$tool_specified"; then
42050          # A command without a complete path is provided, search $PATH.
42051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42052$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42053          # Extract the first word of "$tool_basename", so it can be a program name with args.
42054set dummy $tool_basename; ac_word=$2
42055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42056$as_echo_n "checking for $ac_word... " >&6; }
42057if ${ac_cv_path_STRIP+:} false; then :
42058  $as_echo_n "(cached) " >&6
42059else
42060  case $STRIP in
42061  [\\/]* | ?:[\\/]*)
42062  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42063  ;;
42064  *)
42065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42066for as_dir in $PATH
42067do
42068  IFS=$as_save_IFS
42069  test -z "$as_dir" && as_dir=.
42070    for ac_exec_ext in '' $ac_executable_extensions; do
42071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42072    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42074    break 2
42075  fi
42076done
42077  done
42078IFS=$as_save_IFS
42079
42080  ;;
42081esac
42082fi
42083STRIP=$ac_cv_path_STRIP
42084if test -n "$STRIP"; then
42085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42086$as_echo "$STRIP" >&6; }
42087else
42088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42089$as_echo "no" >&6; }
42090fi
42091
42092
42093          if test "x$STRIP" = x; then
42094            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42095          fi
42096        else
42097          # Otherwise we believe it is a complete path. Use it as it is.
42098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42099$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42100          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42101$as_echo_n "checking for STRIP... " >&6; }
42102          if test ! -x "$tool_specified"; then
42103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42104$as_echo "not found" >&6; }
42105            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42106          fi
42107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42108$as_echo "$tool_specified" >&6; }
42109        fi
42110      fi
42111    fi
42112
42113  fi
42114
42115
42116
42117  # Only process if variable expands to non-empty
42118
42119  if test "x$STRIP" != x; then
42120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42121
42122  # First separate the path from the arguments. This will split at the first
42123  # space.
42124  complete="$STRIP"
42125  path="${complete%% *}"
42126  tmp="$complete EOL"
42127  arguments="${tmp#* }"
42128
42129  # Input might be given as Windows format, start by converting to
42130  # unix format.
42131  new_path=`$CYGPATH -u "$path"`
42132
42133  # Now try to locate executable using which
42134  new_path=`$WHICH "$new_path" 2> /dev/null`
42135  # bat and cmd files are not always considered executable in cygwin causing which
42136  # to not find them
42137  if test "x$new_path" = x \
42138      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42139      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42140    new_path=`$CYGPATH -u "$path"`
42141  fi
42142  if test "x$new_path" = x; then
42143    # Oops. Which didn't find the executable.
42144    # The splitting of arguments from the executable at a space might have been incorrect,
42145    # since paths with space are more likely in Windows. Give it another try with the whole
42146    # argument.
42147    path="$complete"
42148    arguments="EOL"
42149    new_path=`$CYGPATH -u "$path"`
42150    new_path=`$WHICH "$new_path" 2> /dev/null`
42151    # bat and cmd files are not always considered executable in cygwin causing which
42152    # to not find them
42153    if test "x$new_path" = x \
42154        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42155        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42156      new_path=`$CYGPATH -u "$path"`
42157    fi
42158    if test "x$new_path" = x; then
42159      # It's still not found. Now this is an unrecoverable error.
42160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42161$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42162      has_space=`$ECHO "$complete" | $GREP " "`
42163      if test "x$has_space" != x; then
42164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42166      fi
42167      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42168    fi
42169  fi
42170
42171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42174  # "foo.exe" is OK but "foo" is an error.
42175  #
42176  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42177  # It is also a way to make sure we got the proper file name for the real test later on.
42178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42179  if test "x$test_shortpath" = x; then
42180    # Short path failed, file does not exist as specified.
42181    # Try adding .exe or .cmd
42182    if test -f "${new_path}.exe"; then
42183      input_to_shortpath="${new_path}.exe"
42184    elif test -f "${new_path}.cmd"; then
42185      input_to_shortpath="${new_path}.cmd"
42186    else
42187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42188$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42189      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42190$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42191      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42192    fi
42193  else
42194    input_to_shortpath="$new_path"
42195  fi
42196
42197  # Call helper function which possibly converts this using DOS-style short mode.
42198  # If so, the updated path is stored in $new_path.
42199  new_path="$input_to_shortpath"
42200
42201  input_path="$input_to_shortpath"
42202  # Check if we need to convert this using DOS-style short mode. If the path
42203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42204  # take no chances and rewrite it.
42205  # Note: m4 eats our [], so we need to use [ and ] instead.
42206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42207  if test "x$has_forbidden_chars" != x; then
42208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42212      # Going to short mode and back again did indeed matter. Since short mode is
42213      # case insensitive, let's make it lowercase to improve readability.
42214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42215      # Now convert it back to Unix-style (cygpath)
42216      input_path=`$CYGPATH -u "$shortmode_path"`
42217      new_path="$input_path"
42218    fi
42219  fi
42220
42221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42222  if test "x$test_cygdrive_prefix" = x; then
42223    # As a simple fix, exclude /usr/bin since it's not a real path.
42224    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42226      # a path prefixed by /cygdrive for fixpath to work.
42227      new_path="$CYGWIN_ROOT_PATH$input_path"
42228    fi
42229  fi
42230
42231  # remove trailing .exe if any
42232  new_path="${new_path/%.exe/}"
42233
42234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42235
42236  # First separate the path from the arguments. This will split at the first
42237  # space.
42238  complete="$STRIP"
42239  path="${complete%% *}"
42240  tmp="$complete EOL"
42241  arguments="${tmp#* }"
42242
42243  # Input might be given as Windows format, start by converting to
42244  # unix format.
42245  new_path="$path"
42246
42247  windows_path="$new_path"
42248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42249    unix_path=`$CYGPATH -u "$windows_path"`
42250    new_path="$unix_path"
42251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42253    new_path="$unix_path"
42254  fi
42255
42256
42257  # Now try to locate executable using which
42258  new_path=`$WHICH "$new_path" 2> /dev/null`
42259
42260  if test "x$new_path" = x; then
42261    # Oops. Which didn't find the executable.
42262    # The splitting of arguments from the executable at a space might have been incorrect,
42263    # since paths with space are more likely in Windows. Give it another try with the whole
42264    # argument.
42265    path="$complete"
42266    arguments="EOL"
42267    new_path="$path"
42268
42269  windows_path="$new_path"
42270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42271    unix_path=`$CYGPATH -u "$windows_path"`
42272    new_path="$unix_path"
42273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42275    new_path="$unix_path"
42276  fi
42277
42278
42279    new_path=`$WHICH "$new_path" 2> /dev/null`
42280    # bat and cmd files are not always considered executable in MSYS causing which
42281    # to not find them
42282    if test "x$new_path" = x \
42283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42285      new_path="$path"
42286
42287  windows_path="$new_path"
42288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42289    unix_path=`$CYGPATH -u "$windows_path"`
42290    new_path="$unix_path"
42291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42293    new_path="$unix_path"
42294  fi
42295
42296    fi
42297
42298    if test "x$new_path" = x; then
42299      # It's still not found. Now this is an unrecoverable error.
42300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42301$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42302      has_space=`$ECHO "$complete" | $GREP " "`
42303      if test "x$has_space" != x; then
42304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42306      fi
42307      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42308    fi
42309  fi
42310
42311  # Now new_path has a complete unix path to the binary
42312  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42313    # Keep paths in /bin as-is, but remove trailing .exe if any
42314    new_path="${new_path/%.exe/}"
42315    # Do not save /bin paths to all_fixpath_prefixes!
42316  else
42317    # Not in mixed or Windows style, start by that.
42318    new_path=`cmd //c echo $new_path`
42319
42320  input_path="$new_path"
42321  # Check if we need to convert this using DOS-style short mode. If the path
42322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42323  # take no chances and rewrite it.
42324  # Note: m4 eats our [], so we need to use [ and ] instead.
42325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42326  if test "x$has_forbidden_chars" != x; then
42327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42329  fi
42330
42331    # Output is in $new_path
42332
42333  windows_path="$new_path"
42334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42335    unix_path=`$CYGPATH -u "$windows_path"`
42336    new_path="$unix_path"
42337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42339    new_path="$unix_path"
42340  fi
42341
42342    # remove trailing .exe if any
42343    new_path="${new_path/%.exe/}"
42344
42345    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42346    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42347  fi
42348
42349    else
42350      # We're on a unix platform. Hooray! :)
42351      # First separate the path from the arguments. This will split at the first
42352      # space.
42353      complete="$STRIP"
42354      path="${complete%% *}"
42355      tmp="$complete EOL"
42356      arguments="${tmp#* }"
42357
42358      # Cannot rely on the command "which" here since it doesn't always work.
42359      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42360      if test -z "$is_absolute_path"; then
42361        # Path to executable is not absolute. Find it.
42362        IFS_save="$IFS"
42363        IFS=:
42364        for p in $PATH; do
42365          if test -f "$p/$path" && test -x "$p/$path"; then
42366            new_path="$p/$path"
42367            break
42368          fi
42369        done
42370        IFS="$IFS_save"
42371      else
42372        # This is an absolute path, we can use it without further modifications.
42373        new_path="$path"
42374      fi
42375
42376      if test "x$new_path" = x; then
42377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42378$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42379        has_space=`$ECHO "$complete" | $GREP " "`
42380        if test "x$has_space" != x; then
42381          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42382$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42383        fi
42384        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42385      fi
42386    fi
42387
42388    # Now join together the path and the arguments once again
42389    if test "x$arguments" != xEOL; then
42390      new_complete="$new_path ${arguments% *}"
42391    else
42392      new_complete="$new_path"
42393    fi
42394
42395    if test "x$complete" != "x$new_complete"; then
42396      STRIP="$new_complete"
42397      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42398$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42399    fi
42400  fi
42401
42402    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42403
42404
42405  # Publish this variable in the help.
42406
42407
42408  if [ -z "${NM+x}" ]; then
42409    # The variable is not set by user, try to locate tool using the code snippet
42410    if test -n "$ac_tool_prefix"; then
42411  for ac_prog in nm gcc-nm
42412  do
42413    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42414set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42416$as_echo_n "checking for $ac_word... " >&6; }
42417if ${ac_cv_prog_NM+:} false; then :
42418  $as_echo_n "(cached) " >&6
42419else
42420  if test -n "$NM"; then
42421  ac_cv_prog_NM="$NM" # Let the user override the test.
42422else
42423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42424for as_dir in $PATH
42425do
42426  IFS=$as_save_IFS
42427  test -z "$as_dir" && as_dir=.
42428    for ac_exec_ext in '' $ac_executable_extensions; do
42429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42430    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42432    break 2
42433  fi
42434done
42435  done
42436IFS=$as_save_IFS
42437
42438fi
42439fi
42440NM=$ac_cv_prog_NM
42441if test -n "$NM"; then
42442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42443$as_echo "$NM" >&6; }
42444else
42445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42446$as_echo "no" >&6; }
42447fi
42448
42449
42450    test -n "$NM" && break
42451  done
42452fi
42453if test -z "$NM"; then
42454  ac_ct_NM=$NM
42455  for ac_prog in nm gcc-nm
42456do
42457  # Extract the first word of "$ac_prog", so it can be a program name with args.
42458set dummy $ac_prog; ac_word=$2
42459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42460$as_echo_n "checking for $ac_word... " >&6; }
42461if ${ac_cv_prog_ac_ct_NM+:} false; then :
42462  $as_echo_n "(cached) " >&6
42463else
42464  if test -n "$ac_ct_NM"; then
42465  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42466else
42467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42468for as_dir in $PATH
42469do
42470  IFS=$as_save_IFS
42471  test -z "$as_dir" && as_dir=.
42472    for ac_exec_ext in '' $ac_executable_extensions; do
42473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42474    ac_cv_prog_ac_ct_NM="$ac_prog"
42475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42476    break 2
42477  fi
42478done
42479  done
42480IFS=$as_save_IFS
42481
42482fi
42483fi
42484ac_ct_NM=$ac_cv_prog_ac_ct_NM
42485if test -n "$ac_ct_NM"; then
42486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42487$as_echo "$ac_ct_NM" >&6; }
42488else
42489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42490$as_echo "no" >&6; }
42491fi
42492
42493
42494  test -n "$ac_ct_NM" && break
42495done
42496
42497  if test "x$ac_ct_NM" = x; then
42498    NM=""
42499  else
42500    case $cross_compiling:$ac_tool_warned in
42501yes:)
42502{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42503$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42504ac_tool_warned=yes ;;
42505esac
42506    NM=$ac_ct_NM
42507  fi
42508fi
42509
42510  else
42511    # The variable is set, but is it from the command line or the environment?
42512
42513    # Try to remove the string !NM! from our list.
42514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42516      # If it failed, the variable was not from the command line. Ignore it,
42517      # but warn the user (except for BASH, which is always set by the calling BASH).
42518      if test "xNM" != xBASH; then
42519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42520$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42521      fi
42522      # Try to locate tool using the code snippet
42523      if test -n "$ac_tool_prefix"; then
42524  for ac_prog in nm gcc-nm
42525  do
42526    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42527set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42529$as_echo_n "checking for $ac_word... " >&6; }
42530if ${ac_cv_prog_NM+:} false; then :
42531  $as_echo_n "(cached) " >&6
42532else
42533  if test -n "$NM"; then
42534  ac_cv_prog_NM="$NM" # Let the user override the test.
42535else
42536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42537for as_dir in $PATH
42538do
42539  IFS=$as_save_IFS
42540  test -z "$as_dir" && as_dir=.
42541    for ac_exec_ext in '' $ac_executable_extensions; do
42542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42543    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42545    break 2
42546  fi
42547done
42548  done
42549IFS=$as_save_IFS
42550
42551fi
42552fi
42553NM=$ac_cv_prog_NM
42554if test -n "$NM"; then
42555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42556$as_echo "$NM" >&6; }
42557else
42558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42559$as_echo "no" >&6; }
42560fi
42561
42562
42563    test -n "$NM" && break
42564  done
42565fi
42566if test -z "$NM"; then
42567  ac_ct_NM=$NM
42568  for ac_prog in nm gcc-nm
42569do
42570  # Extract the first word of "$ac_prog", so it can be a program name with args.
42571set dummy $ac_prog; ac_word=$2
42572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42573$as_echo_n "checking for $ac_word... " >&6; }
42574if ${ac_cv_prog_ac_ct_NM+:} false; then :
42575  $as_echo_n "(cached) " >&6
42576else
42577  if test -n "$ac_ct_NM"; then
42578  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42579else
42580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42581for as_dir in $PATH
42582do
42583  IFS=$as_save_IFS
42584  test -z "$as_dir" && as_dir=.
42585    for ac_exec_ext in '' $ac_executable_extensions; do
42586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42587    ac_cv_prog_ac_ct_NM="$ac_prog"
42588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42589    break 2
42590  fi
42591done
42592  done
42593IFS=$as_save_IFS
42594
42595fi
42596fi
42597ac_ct_NM=$ac_cv_prog_ac_ct_NM
42598if test -n "$ac_ct_NM"; then
42599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42600$as_echo "$ac_ct_NM" >&6; }
42601else
42602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42603$as_echo "no" >&6; }
42604fi
42605
42606
42607  test -n "$ac_ct_NM" && break
42608done
42609
42610  if test "x$ac_ct_NM" = x; then
42611    NM=""
42612  else
42613    case $cross_compiling:$ac_tool_warned in
42614yes:)
42615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42617ac_tool_warned=yes ;;
42618esac
42619    NM=$ac_ct_NM
42620  fi
42621fi
42622
42623    else
42624      # If it succeeded, then it was overridden by the user. We will use it
42625      # for the tool.
42626
42627      # First remove it from the list of overridden variables, so we can test
42628      # for unknown variables in the end.
42629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42630
42631      # Check if we try to supply an empty value
42632      if test "x$NM" = x; then
42633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42634$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42636$as_echo_n "checking for NM... " >&6; }
42637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42638$as_echo "disabled" >&6; }
42639      else
42640        # Check if the provided tool contains a complete path.
42641        tool_specified="$NM"
42642        tool_basename="${tool_specified##*/}"
42643        if test "x$tool_basename" = "x$tool_specified"; then
42644          # A command without a complete path is provided, search $PATH.
42645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42646$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42647          # Extract the first word of "$tool_basename", so it can be a program name with args.
42648set dummy $tool_basename; ac_word=$2
42649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42650$as_echo_n "checking for $ac_word... " >&6; }
42651if ${ac_cv_path_NM+:} false; then :
42652  $as_echo_n "(cached) " >&6
42653else
42654  case $NM in
42655  [\\/]* | ?:[\\/]*)
42656  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42657  ;;
42658  *)
42659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42660for as_dir in $PATH
42661do
42662  IFS=$as_save_IFS
42663  test -z "$as_dir" && as_dir=.
42664    for ac_exec_ext in '' $ac_executable_extensions; do
42665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42666    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42668    break 2
42669  fi
42670done
42671  done
42672IFS=$as_save_IFS
42673
42674  ;;
42675esac
42676fi
42677NM=$ac_cv_path_NM
42678if test -n "$NM"; then
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42680$as_echo "$NM" >&6; }
42681else
42682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42683$as_echo "no" >&6; }
42684fi
42685
42686
42687          if test "x$NM" = x; then
42688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42689          fi
42690        else
42691          # Otherwise we believe it is a complete path. Use it as it is.
42692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42693$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42695$as_echo_n "checking for NM... " >&6; }
42696          if test ! -x "$tool_specified"; then
42697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42698$as_echo "not found" >&6; }
42699            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42700          fi
42701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42702$as_echo "$tool_specified" >&6; }
42703        fi
42704      fi
42705    fi
42706
42707  fi
42708
42709
42710    else
42711
42712
42713  # Publish this variable in the help.
42714
42715
42716  if [ -z "${NM+x}" ]; then
42717    # The variable is not set by user, try to locate tool using the code snippet
42718    if test -n "$ac_tool_prefix"; then
42719  for ac_prog in nm
42720  do
42721    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42722set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42724$as_echo_n "checking for $ac_word... " >&6; }
42725if ${ac_cv_prog_NM+:} false; then :
42726  $as_echo_n "(cached) " >&6
42727else
42728  if test -n "$NM"; then
42729  ac_cv_prog_NM="$NM" # Let the user override the test.
42730else
42731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42732for as_dir in $PATH
42733do
42734  IFS=$as_save_IFS
42735  test -z "$as_dir" && as_dir=.
42736    for ac_exec_ext in '' $ac_executable_extensions; do
42737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42738    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42740    break 2
42741  fi
42742done
42743  done
42744IFS=$as_save_IFS
42745
42746fi
42747fi
42748NM=$ac_cv_prog_NM
42749if test -n "$NM"; then
42750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42751$as_echo "$NM" >&6; }
42752else
42753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42754$as_echo "no" >&6; }
42755fi
42756
42757
42758    test -n "$NM" && break
42759  done
42760fi
42761if test -z "$NM"; then
42762  ac_ct_NM=$NM
42763  for ac_prog in nm
42764do
42765  # Extract the first word of "$ac_prog", so it can be a program name with args.
42766set dummy $ac_prog; ac_word=$2
42767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42768$as_echo_n "checking for $ac_word... " >&6; }
42769if ${ac_cv_prog_ac_ct_NM+:} false; then :
42770  $as_echo_n "(cached) " >&6
42771else
42772  if test -n "$ac_ct_NM"; then
42773  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42774else
42775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42776for as_dir in $PATH
42777do
42778  IFS=$as_save_IFS
42779  test -z "$as_dir" && as_dir=.
42780    for ac_exec_ext in '' $ac_executable_extensions; do
42781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42782    ac_cv_prog_ac_ct_NM="$ac_prog"
42783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42784    break 2
42785  fi
42786done
42787  done
42788IFS=$as_save_IFS
42789
42790fi
42791fi
42792ac_ct_NM=$ac_cv_prog_ac_ct_NM
42793if test -n "$ac_ct_NM"; then
42794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42795$as_echo "$ac_ct_NM" >&6; }
42796else
42797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42798$as_echo "no" >&6; }
42799fi
42800
42801
42802  test -n "$ac_ct_NM" && break
42803done
42804
42805  if test "x$ac_ct_NM" = x; then
42806    NM=""
42807  else
42808    case $cross_compiling:$ac_tool_warned in
42809yes:)
42810{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42811$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42812ac_tool_warned=yes ;;
42813esac
42814    NM=$ac_ct_NM
42815  fi
42816fi
42817
42818  else
42819    # The variable is set, but is it from the command line or the environment?
42820
42821    # Try to remove the string !NM! from our list.
42822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42824      # If it failed, the variable was not from the command line. Ignore it,
42825      # but warn the user (except for BASH, which is always set by the calling BASH).
42826      if test "xNM" != xBASH; then
42827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42828$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42829      fi
42830      # Try to locate tool using the code snippet
42831      if test -n "$ac_tool_prefix"; then
42832  for ac_prog in nm
42833  do
42834    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42835set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42837$as_echo_n "checking for $ac_word... " >&6; }
42838if ${ac_cv_prog_NM+:} false; then :
42839  $as_echo_n "(cached) " >&6
42840else
42841  if test -n "$NM"; then
42842  ac_cv_prog_NM="$NM" # Let the user override the test.
42843else
42844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42845for as_dir in $PATH
42846do
42847  IFS=$as_save_IFS
42848  test -z "$as_dir" && as_dir=.
42849    for ac_exec_ext in '' $ac_executable_extensions; do
42850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42851    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42853    break 2
42854  fi
42855done
42856  done
42857IFS=$as_save_IFS
42858
42859fi
42860fi
42861NM=$ac_cv_prog_NM
42862if test -n "$NM"; then
42863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42864$as_echo "$NM" >&6; }
42865else
42866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42867$as_echo "no" >&6; }
42868fi
42869
42870
42871    test -n "$NM" && break
42872  done
42873fi
42874if test -z "$NM"; then
42875  ac_ct_NM=$NM
42876  for ac_prog in nm
42877do
42878  # Extract the first word of "$ac_prog", so it can be a program name with args.
42879set dummy $ac_prog; ac_word=$2
42880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42881$as_echo_n "checking for $ac_word... " >&6; }
42882if ${ac_cv_prog_ac_ct_NM+:} false; then :
42883  $as_echo_n "(cached) " >&6
42884else
42885  if test -n "$ac_ct_NM"; then
42886  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42887else
42888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42889for as_dir in $PATH
42890do
42891  IFS=$as_save_IFS
42892  test -z "$as_dir" && as_dir=.
42893    for ac_exec_ext in '' $ac_executable_extensions; do
42894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42895    ac_cv_prog_ac_ct_NM="$ac_prog"
42896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42897    break 2
42898  fi
42899done
42900  done
42901IFS=$as_save_IFS
42902
42903fi
42904fi
42905ac_ct_NM=$ac_cv_prog_ac_ct_NM
42906if test -n "$ac_ct_NM"; then
42907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42908$as_echo "$ac_ct_NM" >&6; }
42909else
42910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42911$as_echo "no" >&6; }
42912fi
42913
42914
42915  test -n "$ac_ct_NM" && break
42916done
42917
42918  if test "x$ac_ct_NM" = x; then
42919    NM=""
42920  else
42921    case $cross_compiling:$ac_tool_warned in
42922yes:)
42923{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42924$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42925ac_tool_warned=yes ;;
42926esac
42927    NM=$ac_ct_NM
42928  fi
42929fi
42930
42931    else
42932      # If it succeeded, then it was overridden by the user. We will use it
42933      # for the tool.
42934
42935      # First remove it from the list of overridden variables, so we can test
42936      # for unknown variables in the end.
42937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42938
42939      # Check if we try to supply an empty value
42940      if test "x$NM" = x; then
42941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42942$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42944$as_echo_n "checking for NM... " >&6; }
42945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42946$as_echo "disabled" >&6; }
42947      else
42948        # Check if the provided tool contains a complete path.
42949        tool_specified="$NM"
42950        tool_basename="${tool_specified##*/}"
42951        if test "x$tool_basename" = "x$tool_specified"; then
42952          # A command without a complete path is provided, search $PATH.
42953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42954$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42955          # Extract the first word of "$tool_basename", so it can be a program name with args.
42956set dummy $tool_basename; ac_word=$2
42957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42958$as_echo_n "checking for $ac_word... " >&6; }
42959if ${ac_cv_path_NM+:} false; then :
42960  $as_echo_n "(cached) " >&6
42961else
42962  case $NM in
42963  [\\/]* | ?:[\\/]*)
42964  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42965  ;;
42966  *)
42967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42968for as_dir in $PATH
42969do
42970  IFS=$as_save_IFS
42971  test -z "$as_dir" && as_dir=.
42972    for ac_exec_ext in '' $ac_executable_extensions; do
42973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42974    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42976    break 2
42977  fi
42978done
42979  done
42980IFS=$as_save_IFS
42981
42982  ;;
42983esac
42984fi
42985NM=$ac_cv_path_NM
42986if test -n "$NM"; then
42987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42988$as_echo "$NM" >&6; }
42989else
42990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42991$as_echo "no" >&6; }
42992fi
42993
42994
42995          if test "x$NM" = x; then
42996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42997          fi
42998        else
42999          # Otherwise we believe it is a complete path. Use it as it is.
43000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43001$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43003$as_echo_n "checking for NM... " >&6; }
43004          if test ! -x "$tool_specified"; then
43005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43006$as_echo "not found" >&6; }
43007            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43008          fi
43009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43010$as_echo "$tool_specified" >&6; }
43011        fi
43012      fi
43013    fi
43014
43015  fi
43016
43017
43018    fi
43019
43020  # Only process if variable expands to non-empty
43021
43022  if test "x$NM" != x; then
43023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43024
43025  # First separate the path from the arguments. This will split at the first
43026  # space.
43027  complete="$NM"
43028  path="${complete%% *}"
43029  tmp="$complete EOL"
43030  arguments="${tmp#* }"
43031
43032  # Input might be given as Windows format, start by converting to
43033  # unix format.
43034  new_path=`$CYGPATH -u "$path"`
43035
43036  # Now try to locate executable using which
43037  new_path=`$WHICH "$new_path" 2> /dev/null`
43038  # bat and cmd files are not always considered executable in cygwin causing which
43039  # to not find them
43040  if test "x$new_path" = x \
43041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43043    new_path=`$CYGPATH -u "$path"`
43044  fi
43045  if test "x$new_path" = x; then
43046    # Oops. Which didn't find the executable.
43047    # The splitting of arguments from the executable at a space might have been incorrect,
43048    # since paths with space are more likely in Windows. Give it another try with the whole
43049    # argument.
43050    path="$complete"
43051    arguments="EOL"
43052    new_path=`$CYGPATH -u "$path"`
43053    new_path=`$WHICH "$new_path" 2> /dev/null`
43054    # bat and cmd files are not always considered executable in cygwin causing which
43055    # to not find them
43056    if test "x$new_path" = x \
43057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43059      new_path=`$CYGPATH -u "$path"`
43060    fi
43061    if test "x$new_path" = x; then
43062      # It's still not found. Now this is an unrecoverable error.
43063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43064$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43065      has_space=`$ECHO "$complete" | $GREP " "`
43066      if test "x$has_space" != x; then
43067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43069      fi
43070      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43071    fi
43072  fi
43073
43074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43077  # "foo.exe" is OK but "foo" is an error.
43078  #
43079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43080  # It is also a way to make sure we got the proper file name for the real test later on.
43081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43082  if test "x$test_shortpath" = x; then
43083    # Short path failed, file does not exist as specified.
43084    # Try adding .exe or .cmd
43085    if test -f "${new_path}.exe"; then
43086      input_to_shortpath="${new_path}.exe"
43087    elif test -f "${new_path}.cmd"; then
43088      input_to_shortpath="${new_path}.cmd"
43089    else
43090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43091$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43094      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43095    fi
43096  else
43097    input_to_shortpath="$new_path"
43098  fi
43099
43100  # Call helper function which possibly converts this using DOS-style short mode.
43101  # If so, the updated path is stored in $new_path.
43102  new_path="$input_to_shortpath"
43103
43104  input_path="$input_to_shortpath"
43105  # Check if we need to convert this using DOS-style short mode. If the path
43106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43107  # take no chances and rewrite it.
43108  # Note: m4 eats our [], so we need to use [ and ] instead.
43109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43110  if test "x$has_forbidden_chars" != x; then
43111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43115      # Going to short mode and back again did indeed matter. Since short mode is
43116      # case insensitive, let's make it lowercase to improve readability.
43117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43118      # Now convert it back to Unix-style (cygpath)
43119      input_path=`$CYGPATH -u "$shortmode_path"`
43120      new_path="$input_path"
43121    fi
43122  fi
43123
43124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43125  if test "x$test_cygdrive_prefix" = x; then
43126    # As a simple fix, exclude /usr/bin since it's not a real path.
43127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43129      # a path prefixed by /cygdrive for fixpath to work.
43130      new_path="$CYGWIN_ROOT_PATH$input_path"
43131    fi
43132  fi
43133
43134  # remove trailing .exe if any
43135  new_path="${new_path/%.exe/}"
43136
43137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43138
43139  # First separate the path from the arguments. This will split at the first
43140  # space.
43141  complete="$NM"
43142  path="${complete%% *}"
43143  tmp="$complete EOL"
43144  arguments="${tmp#* }"
43145
43146  # Input might be given as Windows format, start by converting to
43147  # unix format.
43148  new_path="$path"
43149
43150  windows_path="$new_path"
43151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43152    unix_path=`$CYGPATH -u "$windows_path"`
43153    new_path="$unix_path"
43154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43156    new_path="$unix_path"
43157  fi
43158
43159
43160  # Now try to locate executable using which
43161  new_path=`$WHICH "$new_path" 2> /dev/null`
43162
43163  if test "x$new_path" = x; then
43164    # Oops. Which didn't find the executable.
43165    # The splitting of arguments from the executable at a space might have been incorrect,
43166    # since paths with space are more likely in Windows. Give it another try with the whole
43167    # argument.
43168    path="$complete"
43169    arguments="EOL"
43170    new_path="$path"
43171
43172  windows_path="$new_path"
43173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43174    unix_path=`$CYGPATH -u "$windows_path"`
43175    new_path="$unix_path"
43176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43178    new_path="$unix_path"
43179  fi
43180
43181
43182    new_path=`$WHICH "$new_path" 2> /dev/null`
43183    # bat and cmd files are not always considered executable in MSYS causing which
43184    # to not find them
43185    if test "x$new_path" = x \
43186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43188      new_path="$path"
43189
43190  windows_path="$new_path"
43191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43192    unix_path=`$CYGPATH -u "$windows_path"`
43193    new_path="$unix_path"
43194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43196    new_path="$unix_path"
43197  fi
43198
43199    fi
43200
43201    if test "x$new_path" = x; then
43202      # It's still not found. Now this is an unrecoverable error.
43203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43204$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43205      has_space=`$ECHO "$complete" | $GREP " "`
43206      if test "x$has_space" != x; then
43207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43209      fi
43210      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43211    fi
43212  fi
43213
43214  # Now new_path has a complete unix path to the binary
43215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43216    # Keep paths in /bin as-is, but remove trailing .exe if any
43217    new_path="${new_path/%.exe/}"
43218    # Do not save /bin paths to all_fixpath_prefixes!
43219  else
43220    # Not in mixed or Windows style, start by that.
43221    new_path=`cmd //c echo $new_path`
43222
43223  input_path="$new_path"
43224  # Check if we need to convert this using DOS-style short mode. If the path
43225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43226  # take no chances and rewrite it.
43227  # Note: m4 eats our [], so we need to use [ and ] instead.
43228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43229  if test "x$has_forbidden_chars" != x; then
43230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43232  fi
43233
43234    # Output is in $new_path
43235
43236  windows_path="$new_path"
43237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43238    unix_path=`$CYGPATH -u "$windows_path"`
43239    new_path="$unix_path"
43240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43242    new_path="$unix_path"
43243  fi
43244
43245    # remove trailing .exe if any
43246    new_path="${new_path/%.exe/}"
43247
43248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43250  fi
43251
43252    else
43253      # We're on a unix platform. Hooray! :)
43254      # First separate the path from the arguments. This will split at the first
43255      # space.
43256      complete="$NM"
43257      path="${complete%% *}"
43258      tmp="$complete EOL"
43259      arguments="${tmp#* }"
43260
43261      # Cannot rely on the command "which" here since it doesn't always work.
43262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43263      if test -z "$is_absolute_path"; then
43264        # Path to executable is not absolute. Find it.
43265        IFS_save="$IFS"
43266        IFS=:
43267        for p in $PATH; do
43268          if test -f "$p/$path" && test -x "$p/$path"; then
43269            new_path="$p/$path"
43270            break
43271          fi
43272        done
43273        IFS="$IFS_save"
43274      else
43275        # This is an absolute path, we can use it without further modifications.
43276        new_path="$path"
43277      fi
43278
43279      if test "x$new_path" = x; then
43280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43281$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43282        has_space=`$ECHO "$complete" | $GREP " "`
43283        if test "x$has_space" != x; then
43284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43286        fi
43287        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43288      fi
43289    fi
43290
43291    # Now join together the path and the arguments once again
43292    if test "x$arguments" != xEOL; then
43293      new_complete="$new_path ${arguments% *}"
43294    else
43295      new_complete="$new_path"
43296    fi
43297
43298    if test "x$complete" != "x$new_complete"; then
43299      NM="$new_complete"
43300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43301$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43302    fi
43303  fi
43304
43305    GNM="$NM"
43306
43307  fi
43308
43309  # objcopy is used for moving debug symbols to separate files when
43310  # full debug symbols are enabled.
43311  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43312
43313
43314  # Publish this variable in the help.
43315
43316
43317  if [ -z "${OBJCOPY+x}" ]; then
43318    # The variable is not set by user, try to locate tool using the code snippet
43319    if test -n "$ac_tool_prefix"; then
43320  for ac_prog in gobjcopy objcopy
43321  do
43322    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43323set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43325$as_echo_n "checking for $ac_word... " >&6; }
43326if ${ac_cv_prog_OBJCOPY+:} false; then :
43327  $as_echo_n "(cached) " >&6
43328else
43329  if test -n "$OBJCOPY"; then
43330  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43331else
43332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43333for as_dir in $PATH
43334do
43335  IFS=$as_save_IFS
43336  test -z "$as_dir" && as_dir=.
43337    for ac_exec_ext in '' $ac_executable_extensions; do
43338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43339    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43341    break 2
43342  fi
43343done
43344  done
43345IFS=$as_save_IFS
43346
43347fi
43348fi
43349OBJCOPY=$ac_cv_prog_OBJCOPY
43350if test -n "$OBJCOPY"; then
43351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43352$as_echo "$OBJCOPY" >&6; }
43353else
43354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43355$as_echo "no" >&6; }
43356fi
43357
43358
43359    test -n "$OBJCOPY" && break
43360  done
43361fi
43362if test -z "$OBJCOPY"; then
43363  ac_ct_OBJCOPY=$OBJCOPY
43364  for ac_prog in gobjcopy objcopy
43365do
43366  # Extract the first word of "$ac_prog", so it can be a program name with args.
43367set dummy $ac_prog; ac_word=$2
43368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43369$as_echo_n "checking for $ac_word... " >&6; }
43370if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43371  $as_echo_n "(cached) " >&6
43372else
43373  if test -n "$ac_ct_OBJCOPY"; then
43374  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43375else
43376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43377for as_dir in $PATH
43378do
43379  IFS=$as_save_IFS
43380  test -z "$as_dir" && as_dir=.
43381    for ac_exec_ext in '' $ac_executable_extensions; do
43382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43383    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43385    break 2
43386  fi
43387done
43388  done
43389IFS=$as_save_IFS
43390
43391fi
43392fi
43393ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43394if test -n "$ac_ct_OBJCOPY"; then
43395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43396$as_echo "$ac_ct_OBJCOPY" >&6; }
43397else
43398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43399$as_echo "no" >&6; }
43400fi
43401
43402
43403  test -n "$ac_ct_OBJCOPY" && break
43404done
43405
43406  if test "x$ac_ct_OBJCOPY" = x; then
43407    OBJCOPY=""
43408  else
43409    case $cross_compiling:$ac_tool_warned in
43410yes:)
43411{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43412$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43413ac_tool_warned=yes ;;
43414esac
43415    OBJCOPY=$ac_ct_OBJCOPY
43416  fi
43417fi
43418
43419  else
43420    # The variable is set, but is it from the command line or the environment?
43421
43422    # Try to remove the string !OBJCOPY! from our list.
43423    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43424    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43425      # If it failed, the variable was not from the command line. Ignore it,
43426      # but warn the user (except for BASH, which is always set by the calling BASH).
43427      if test "xOBJCOPY" != xBASH; then
43428        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43429$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43430      fi
43431      # Try to locate tool using the code snippet
43432      if test -n "$ac_tool_prefix"; then
43433  for ac_prog in gobjcopy objcopy
43434  do
43435    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43438$as_echo_n "checking for $ac_word... " >&6; }
43439if ${ac_cv_prog_OBJCOPY+:} false; then :
43440  $as_echo_n "(cached) " >&6
43441else
43442  if test -n "$OBJCOPY"; then
43443  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43444else
43445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43446for as_dir in $PATH
43447do
43448  IFS=$as_save_IFS
43449  test -z "$as_dir" && as_dir=.
43450    for ac_exec_ext in '' $ac_executable_extensions; do
43451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43452    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43454    break 2
43455  fi
43456done
43457  done
43458IFS=$as_save_IFS
43459
43460fi
43461fi
43462OBJCOPY=$ac_cv_prog_OBJCOPY
43463if test -n "$OBJCOPY"; then
43464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43465$as_echo "$OBJCOPY" >&6; }
43466else
43467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43468$as_echo "no" >&6; }
43469fi
43470
43471
43472    test -n "$OBJCOPY" && break
43473  done
43474fi
43475if test -z "$OBJCOPY"; then
43476  ac_ct_OBJCOPY=$OBJCOPY
43477  for ac_prog in gobjcopy objcopy
43478do
43479  # Extract the first word of "$ac_prog", so it can be a program name with args.
43480set dummy $ac_prog; ac_word=$2
43481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43482$as_echo_n "checking for $ac_word... " >&6; }
43483if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43484  $as_echo_n "(cached) " >&6
43485else
43486  if test -n "$ac_ct_OBJCOPY"; then
43487  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43488else
43489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43490for as_dir in $PATH
43491do
43492  IFS=$as_save_IFS
43493  test -z "$as_dir" && as_dir=.
43494    for ac_exec_ext in '' $ac_executable_extensions; do
43495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43496    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43498    break 2
43499  fi
43500done
43501  done
43502IFS=$as_save_IFS
43503
43504fi
43505fi
43506ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43507if test -n "$ac_ct_OBJCOPY"; then
43508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43509$as_echo "$ac_ct_OBJCOPY" >&6; }
43510else
43511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43512$as_echo "no" >&6; }
43513fi
43514
43515
43516  test -n "$ac_ct_OBJCOPY" && break
43517done
43518
43519  if test "x$ac_ct_OBJCOPY" = x; then
43520    OBJCOPY=""
43521  else
43522    case $cross_compiling:$ac_tool_warned in
43523yes:)
43524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43526ac_tool_warned=yes ;;
43527esac
43528    OBJCOPY=$ac_ct_OBJCOPY
43529  fi
43530fi
43531
43532    else
43533      # If it succeeded, then it was overridden by the user. We will use it
43534      # for the tool.
43535
43536      # First remove it from the list of overridden variables, so we can test
43537      # for unknown variables in the end.
43538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43539
43540      # Check if we try to supply an empty value
43541      if test "x$OBJCOPY" = x; then
43542        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43543$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43545$as_echo_n "checking for OBJCOPY... " >&6; }
43546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43547$as_echo "disabled" >&6; }
43548      else
43549        # Check if the provided tool contains a complete path.
43550        tool_specified="$OBJCOPY"
43551        tool_basename="${tool_specified##*/}"
43552        if test "x$tool_basename" = "x$tool_specified"; then
43553          # A command without a complete path is provided, search $PATH.
43554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43555$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43556          # Extract the first word of "$tool_basename", so it can be a program name with args.
43557set dummy $tool_basename; ac_word=$2
43558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43559$as_echo_n "checking for $ac_word... " >&6; }
43560if ${ac_cv_path_OBJCOPY+:} false; then :
43561  $as_echo_n "(cached) " >&6
43562else
43563  case $OBJCOPY in
43564  [\\/]* | ?:[\\/]*)
43565  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43566  ;;
43567  *)
43568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43569for as_dir in $PATH
43570do
43571  IFS=$as_save_IFS
43572  test -z "$as_dir" && as_dir=.
43573    for ac_exec_ext in '' $ac_executable_extensions; do
43574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43575    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43577    break 2
43578  fi
43579done
43580  done
43581IFS=$as_save_IFS
43582
43583  ;;
43584esac
43585fi
43586OBJCOPY=$ac_cv_path_OBJCOPY
43587if test -n "$OBJCOPY"; then
43588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43589$as_echo "$OBJCOPY" >&6; }
43590else
43591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43592$as_echo "no" >&6; }
43593fi
43594
43595
43596          if test "x$OBJCOPY" = x; then
43597            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43598          fi
43599        else
43600          # Otherwise we believe it is a complete path. Use it as it is.
43601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43602$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43603          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43604$as_echo_n "checking for OBJCOPY... " >&6; }
43605          if test ! -x "$tool_specified"; then
43606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43607$as_echo "not found" >&6; }
43608            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43609          fi
43610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43611$as_echo "$tool_specified" >&6; }
43612        fi
43613      fi
43614    fi
43615
43616  fi
43617
43618
43619    # Only call fixup if objcopy was found.
43620    if test -n "$OBJCOPY"; then
43621
43622  # Only process if variable expands to non-empty
43623
43624  if test "x$OBJCOPY" != x; then
43625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43626
43627  # First separate the path from the arguments. This will split at the first
43628  # space.
43629  complete="$OBJCOPY"
43630  path="${complete%% *}"
43631  tmp="$complete EOL"
43632  arguments="${tmp#* }"
43633
43634  # Input might be given as Windows format, start by converting to
43635  # unix format.
43636  new_path=`$CYGPATH -u "$path"`
43637
43638  # Now try to locate executable using which
43639  new_path=`$WHICH "$new_path" 2> /dev/null`
43640  # bat and cmd files are not always considered executable in cygwin causing which
43641  # to not find them
43642  if test "x$new_path" = x \
43643      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43644      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43645    new_path=`$CYGPATH -u "$path"`
43646  fi
43647  if test "x$new_path" = x; then
43648    # Oops. Which didn't find the executable.
43649    # The splitting of arguments from the executable at a space might have been incorrect,
43650    # since paths with space are more likely in Windows. Give it another try with the whole
43651    # argument.
43652    path="$complete"
43653    arguments="EOL"
43654    new_path=`$CYGPATH -u "$path"`
43655    new_path=`$WHICH "$new_path" 2> /dev/null`
43656    # bat and cmd files are not always considered executable in cygwin causing which
43657    # to not find them
43658    if test "x$new_path" = x \
43659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43661      new_path=`$CYGPATH -u "$path"`
43662    fi
43663    if test "x$new_path" = x; then
43664      # It's still not found. Now this is an unrecoverable error.
43665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43666$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43667      has_space=`$ECHO "$complete" | $GREP " "`
43668      if test "x$has_space" != x; then
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43671      fi
43672      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43673    fi
43674  fi
43675
43676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43679  # "foo.exe" is OK but "foo" is an error.
43680  #
43681  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43682  # It is also a way to make sure we got the proper file name for the real test later on.
43683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43684  if test "x$test_shortpath" = x; then
43685    # Short path failed, file does not exist as specified.
43686    # Try adding .exe or .cmd
43687    if test -f "${new_path}.exe"; then
43688      input_to_shortpath="${new_path}.exe"
43689    elif test -f "${new_path}.cmd"; then
43690      input_to_shortpath="${new_path}.cmd"
43691    else
43692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43693$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43696      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43697    fi
43698  else
43699    input_to_shortpath="$new_path"
43700  fi
43701
43702  # Call helper function which possibly converts this using DOS-style short mode.
43703  # If so, the updated path is stored in $new_path.
43704  new_path="$input_to_shortpath"
43705
43706  input_path="$input_to_shortpath"
43707  # Check if we need to convert this using DOS-style short mode. If the path
43708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43709  # take no chances and rewrite it.
43710  # Note: m4 eats our [], so we need to use [ and ] instead.
43711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43712  if test "x$has_forbidden_chars" != x; then
43713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43717      # Going to short mode and back again did indeed matter. Since short mode is
43718      # case insensitive, let's make it lowercase to improve readability.
43719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43720      # Now convert it back to Unix-style (cygpath)
43721      input_path=`$CYGPATH -u "$shortmode_path"`
43722      new_path="$input_path"
43723    fi
43724  fi
43725
43726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43727  if test "x$test_cygdrive_prefix" = x; then
43728    # As a simple fix, exclude /usr/bin since it's not a real path.
43729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43731      # a path prefixed by /cygdrive for fixpath to work.
43732      new_path="$CYGWIN_ROOT_PATH$input_path"
43733    fi
43734  fi
43735
43736  # remove trailing .exe if any
43737  new_path="${new_path/%.exe/}"
43738
43739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43740
43741  # First separate the path from the arguments. This will split at the first
43742  # space.
43743  complete="$OBJCOPY"
43744  path="${complete%% *}"
43745  tmp="$complete EOL"
43746  arguments="${tmp#* }"
43747
43748  # Input might be given as Windows format, start by converting to
43749  # unix format.
43750  new_path="$path"
43751
43752  windows_path="$new_path"
43753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43754    unix_path=`$CYGPATH -u "$windows_path"`
43755    new_path="$unix_path"
43756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43758    new_path="$unix_path"
43759  fi
43760
43761
43762  # Now try to locate executable using which
43763  new_path=`$WHICH "$new_path" 2> /dev/null`
43764
43765  if test "x$new_path" = x; then
43766    # Oops. Which didn't find the executable.
43767    # The splitting of arguments from the executable at a space might have been incorrect,
43768    # since paths with space are more likely in Windows. Give it another try with the whole
43769    # argument.
43770    path="$complete"
43771    arguments="EOL"
43772    new_path="$path"
43773
43774  windows_path="$new_path"
43775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43776    unix_path=`$CYGPATH -u "$windows_path"`
43777    new_path="$unix_path"
43778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43780    new_path="$unix_path"
43781  fi
43782
43783
43784    new_path=`$WHICH "$new_path" 2> /dev/null`
43785    # bat and cmd files are not always considered executable in MSYS causing which
43786    # to not find them
43787    if test "x$new_path" = x \
43788        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43789        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43790      new_path="$path"
43791
43792  windows_path="$new_path"
43793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43794    unix_path=`$CYGPATH -u "$windows_path"`
43795    new_path="$unix_path"
43796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43798    new_path="$unix_path"
43799  fi
43800
43801    fi
43802
43803    if test "x$new_path" = x; then
43804      # It's still not found. Now this is an unrecoverable error.
43805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43806$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43807      has_space=`$ECHO "$complete" | $GREP " "`
43808      if test "x$has_space" != x; then
43809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43811      fi
43812      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43813    fi
43814  fi
43815
43816  # Now new_path has a complete unix path to the binary
43817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43818    # Keep paths in /bin as-is, but remove trailing .exe if any
43819    new_path="${new_path/%.exe/}"
43820    # Do not save /bin paths to all_fixpath_prefixes!
43821  else
43822    # Not in mixed or Windows style, start by that.
43823    new_path=`cmd //c echo $new_path`
43824
43825  input_path="$new_path"
43826  # Check if we need to convert this using DOS-style short mode. If the path
43827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43828  # take no chances and rewrite it.
43829  # Note: m4 eats our [], so we need to use [ and ] instead.
43830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43831  if test "x$has_forbidden_chars" != x; then
43832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43834  fi
43835
43836    # Output is in $new_path
43837
43838  windows_path="$new_path"
43839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43840    unix_path=`$CYGPATH -u "$windows_path"`
43841    new_path="$unix_path"
43842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43844    new_path="$unix_path"
43845  fi
43846
43847    # remove trailing .exe if any
43848    new_path="${new_path/%.exe/}"
43849
43850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43852  fi
43853
43854    else
43855      # We're on a unix platform. Hooray! :)
43856      # First separate the path from the arguments. This will split at the first
43857      # space.
43858      complete="$OBJCOPY"
43859      path="${complete%% *}"
43860      tmp="$complete EOL"
43861      arguments="${tmp#* }"
43862
43863      # Cannot rely on the command "which" here since it doesn't always work.
43864      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43865      if test -z "$is_absolute_path"; then
43866        # Path to executable is not absolute. Find it.
43867        IFS_save="$IFS"
43868        IFS=:
43869        for p in $PATH; do
43870          if test -f "$p/$path" && test -x "$p/$path"; then
43871            new_path="$p/$path"
43872            break
43873          fi
43874        done
43875        IFS="$IFS_save"
43876      else
43877        # This is an absolute path, we can use it without further modifications.
43878        new_path="$path"
43879      fi
43880
43881      if test "x$new_path" = x; then
43882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43883$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43884        has_space=`$ECHO "$complete" | $GREP " "`
43885        if test "x$has_space" != x; then
43886          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43887$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43888        fi
43889        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43890      fi
43891    fi
43892
43893    # Now join together the path and the arguments once again
43894    if test "x$arguments" != xEOL; then
43895      new_complete="$new_path ${arguments% *}"
43896    else
43897      new_complete="$new_path"
43898    fi
43899
43900    if test "x$complete" != "x$new_complete"; then
43901      OBJCOPY="$new_complete"
43902      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43903$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43904    fi
43905  fi
43906
43907      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43908        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43909        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43910        # - version number is last blank separate word on first line
43911        # - version number formats that have been seen:
43912        #   - <major>.<minor>
43913        #   - <major>.<minor>.<micro>
43914        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43915        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43916         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43917              -e 's/.* //' \
43918              -e '/^[01]\./b bad' \
43919              -e '/^2\./{' \
43920              -e '  s/^2\.//' \
43921              -e '  /^[0-9]$/b bad' \
43922              -e '  /^[0-9]\./b bad' \
43923              -e '  /^1[0-9]$/b bad' \
43924              -e '  /^1[0-9]\./b bad' \
43925              -e '  /^20\./b bad' \
43926              -e '  /^21\.0$/b bad' \
43927              -e '  /^21\.0\./b bad' \
43928              -e '}' \
43929              -e ':good' \
43930              -e 's/.*/VALID_VERSION/p' \
43931              -e 'q' \
43932              -e ':bad' \
43933              -e 's/.*/BAD_VERSION/p' \
43934              -e 'q'`
43935        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43936          OBJCOPY=
43937          { $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
43938$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43939          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43940$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43941          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43942$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43943          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43944$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43945          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43946$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43947        fi
43948      fi
43949    fi
43950  fi
43951
43952
43953
43954  # Publish this variable in the help.
43955
43956
43957  if [ -z "${OBJDUMP+x}" ]; then
43958    # The variable is not set by user, try to locate tool using the code snippet
43959    if test -n "$ac_tool_prefix"; then
43960  for ac_prog in gobjdump objdump
43961  do
43962    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43963set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43965$as_echo_n "checking for $ac_word... " >&6; }
43966if ${ac_cv_prog_OBJDUMP+:} false; then :
43967  $as_echo_n "(cached) " >&6
43968else
43969  if test -n "$OBJDUMP"; then
43970  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43971else
43972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43973for as_dir in $PATH
43974do
43975  IFS=$as_save_IFS
43976  test -z "$as_dir" && as_dir=.
43977    for ac_exec_ext in '' $ac_executable_extensions; do
43978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43979    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43981    break 2
43982  fi
43983done
43984  done
43985IFS=$as_save_IFS
43986
43987fi
43988fi
43989OBJDUMP=$ac_cv_prog_OBJDUMP
43990if test -n "$OBJDUMP"; then
43991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43992$as_echo "$OBJDUMP" >&6; }
43993else
43994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43995$as_echo "no" >&6; }
43996fi
43997
43998
43999    test -n "$OBJDUMP" && break
44000  done
44001fi
44002if test -z "$OBJDUMP"; then
44003  ac_ct_OBJDUMP=$OBJDUMP
44004  for ac_prog in gobjdump objdump
44005do
44006  # Extract the first word of "$ac_prog", so it can be a program name with args.
44007set dummy $ac_prog; ac_word=$2
44008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44009$as_echo_n "checking for $ac_word... " >&6; }
44010if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44011  $as_echo_n "(cached) " >&6
44012else
44013  if test -n "$ac_ct_OBJDUMP"; then
44014  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44015else
44016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44017for as_dir in $PATH
44018do
44019  IFS=$as_save_IFS
44020  test -z "$as_dir" && as_dir=.
44021    for ac_exec_ext in '' $ac_executable_extensions; do
44022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44023    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44025    break 2
44026  fi
44027done
44028  done
44029IFS=$as_save_IFS
44030
44031fi
44032fi
44033ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44034if test -n "$ac_ct_OBJDUMP"; then
44035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44036$as_echo "$ac_ct_OBJDUMP" >&6; }
44037else
44038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44039$as_echo "no" >&6; }
44040fi
44041
44042
44043  test -n "$ac_ct_OBJDUMP" && break
44044done
44045
44046  if test "x$ac_ct_OBJDUMP" = x; then
44047    OBJDUMP=""
44048  else
44049    case $cross_compiling:$ac_tool_warned in
44050yes:)
44051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44053ac_tool_warned=yes ;;
44054esac
44055    OBJDUMP=$ac_ct_OBJDUMP
44056  fi
44057fi
44058
44059  else
44060    # The variable is set, but is it from the command line or the environment?
44061
44062    # Try to remove the string !OBJDUMP! from our list.
44063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44065      # If it failed, the variable was not from the command line. Ignore it,
44066      # but warn the user (except for BASH, which is always set by the calling BASH).
44067      if test "xOBJDUMP" != xBASH; then
44068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44069$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44070      fi
44071      # Try to locate tool using the code snippet
44072      if test -n "$ac_tool_prefix"; then
44073  for ac_prog in gobjdump objdump
44074  do
44075    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44078$as_echo_n "checking for $ac_word... " >&6; }
44079if ${ac_cv_prog_OBJDUMP+:} false; then :
44080  $as_echo_n "(cached) " >&6
44081else
44082  if test -n "$OBJDUMP"; then
44083  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44084else
44085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44086for as_dir in $PATH
44087do
44088  IFS=$as_save_IFS
44089  test -z "$as_dir" && as_dir=.
44090    for ac_exec_ext in '' $ac_executable_extensions; do
44091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44092    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44094    break 2
44095  fi
44096done
44097  done
44098IFS=$as_save_IFS
44099
44100fi
44101fi
44102OBJDUMP=$ac_cv_prog_OBJDUMP
44103if test -n "$OBJDUMP"; then
44104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44105$as_echo "$OBJDUMP" >&6; }
44106else
44107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44108$as_echo "no" >&6; }
44109fi
44110
44111
44112    test -n "$OBJDUMP" && break
44113  done
44114fi
44115if test -z "$OBJDUMP"; then
44116  ac_ct_OBJDUMP=$OBJDUMP
44117  for ac_prog in gobjdump objdump
44118do
44119  # Extract the first word of "$ac_prog", so it can be a program name with args.
44120set dummy $ac_prog; ac_word=$2
44121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44122$as_echo_n "checking for $ac_word... " >&6; }
44123if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44124  $as_echo_n "(cached) " >&6
44125else
44126  if test -n "$ac_ct_OBJDUMP"; then
44127  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44128else
44129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44130for as_dir in $PATH
44131do
44132  IFS=$as_save_IFS
44133  test -z "$as_dir" && as_dir=.
44134    for ac_exec_ext in '' $ac_executable_extensions; do
44135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44136    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44138    break 2
44139  fi
44140done
44141  done
44142IFS=$as_save_IFS
44143
44144fi
44145fi
44146ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44147if test -n "$ac_ct_OBJDUMP"; then
44148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44149$as_echo "$ac_ct_OBJDUMP" >&6; }
44150else
44151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44152$as_echo "no" >&6; }
44153fi
44154
44155
44156  test -n "$ac_ct_OBJDUMP" && break
44157done
44158
44159  if test "x$ac_ct_OBJDUMP" = x; then
44160    OBJDUMP=""
44161  else
44162    case $cross_compiling:$ac_tool_warned in
44163yes:)
44164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44166ac_tool_warned=yes ;;
44167esac
44168    OBJDUMP=$ac_ct_OBJDUMP
44169  fi
44170fi
44171
44172    else
44173      # If it succeeded, then it was overridden by the user. We will use it
44174      # for the tool.
44175
44176      # First remove it from the list of overridden variables, so we can test
44177      # for unknown variables in the end.
44178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44179
44180      # Check if we try to supply an empty value
44181      if test "x$OBJDUMP" = x; then
44182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44183$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44185$as_echo_n "checking for OBJDUMP... " >&6; }
44186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44187$as_echo "disabled" >&6; }
44188      else
44189        # Check if the provided tool contains a complete path.
44190        tool_specified="$OBJDUMP"
44191        tool_basename="${tool_specified##*/}"
44192        if test "x$tool_basename" = "x$tool_specified"; then
44193          # A command without a complete path is provided, search $PATH.
44194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44195$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44196          # Extract the first word of "$tool_basename", so it can be a program name with args.
44197set dummy $tool_basename; ac_word=$2
44198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44199$as_echo_n "checking for $ac_word... " >&6; }
44200if ${ac_cv_path_OBJDUMP+:} false; then :
44201  $as_echo_n "(cached) " >&6
44202else
44203  case $OBJDUMP in
44204  [\\/]* | ?:[\\/]*)
44205  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44206  ;;
44207  *)
44208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44209for as_dir in $PATH
44210do
44211  IFS=$as_save_IFS
44212  test -z "$as_dir" && as_dir=.
44213    for ac_exec_ext in '' $ac_executable_extensions; do
44214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44215    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44217    break 2
44218  fi
44219done
44220  done
44221IFS=$as_save_IFS
44222
44223  ;;
44224esac
44225fi
44226OBJDUMP=$ac_cv_path_OBJDUMP
44227if test -n "$OBJDUMP"; then
44228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44229$as_echo "$OBJDUMP" >&6; }
44230else
44231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44232$as_echo "no" >&6; }
44233fi
44234
44235
44236          if test "x$OBJDUMP" = x; then
44237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44238          fi
44239        else
44240          # Otherwise we believe it is a complete path. Use it as it is.
44241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44242$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44244$as_echo_n "checking for OBJDUMP... " >&6; }
44245          if test ! -x "$tool_specified"; then
44246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44247$as_echo "not found" >&6; }
44248            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44249          fi
44250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44251$as_echo "$tool_specified" >&6; }
44252        fi
44253      fi
44254    fi
44255
44256  fi
44257
44258
44259  if test "x$OBJDUMP" != x; then
44260    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44261    # bails if argument is missing.
44262
44263  # Only process if variable expands to non-empty
44264
44265  if test "x$OBJDUMP" != x; then
44266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44267
44268  # First separate the path from the arguments. This will split at the first
44269  # space.
44270  complete="$OBJDUMP"
44271  path="${complete%% *}"
44272  tmp="$complete EOL"
44273  arguments="${tmp#* }"
44274
44275  # Input might be given as Windows format, start by converting to
44276  # unix format.
44277  new_path=`$CYGPATH -u "$path"`
44278
44279  # Now try to locate executable using which
44280  new_path=`$WHICH "$new_path" 2> /dev/null`
44281  # bat and cmd files are not always considered executable in cygwin causing which
44282  # to not find them
44283  if test "x$new_path" = x \
44284      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44285      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44286    new_path=`$CYGPATH -u "$path"`
44287  fi
44288  if test "x$new_path" = x; then
44289    # Oops. Which didn't find the executable.
44290    # The splitting of arguments from the executable at a space might have been incorrect,
44291    # since paths with space are more likely in Windows. Give it another try with the whole
44292    # argument.
44293    path="$complete"
44294    arguments="EOL"
44295    new_path=`$CYGPATH -u "$path"`
44296    new_path=`$WHICH "$new_path" 2> /dev/null`
44297    # bat and cmd files are not always considered executable in cygwin causing which
44298    # to not find them
44299    if test "x$new_path" = x \
44300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44302      new_path=`$CYGPATH -u "$path"`
44303    fi
44304    if test "x$new_path" = x; then
44305      # It's still not found. Now this is an unrecoverable error.
44306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44307$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44308      has_space=`$ECHO "$complete" | $GREP " "`
44309      if test "x$has_space" != x; then
44310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44312      fi
44313      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44314    fi
44315  fi
44316
44317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44320  # "foo.exe" is OK but "foo" is an error.
44321  #
44322  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44323  # It is also a way to make sure we got the proper file name for the real test later on.
44324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44325  if test "x$test_shortpath" = x; then
44326    # Short path failed, file does not exist as specified.
44327    # Try adding .exe or .cmd
44328    if test -f "${new_path}.exe"; then
44329      input_to_shortpath="${new_path}.exe"
44330    elif test -f "${new_path}.cmd"; then
44331      input_to_shortpath="${new_path}.cmd"
44332    else
44333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44334$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44335      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44336$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44337      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44338    fi
44339  else
44340    input_to_shortpath="$new_path"
44341  fi
44342
44343  # Call helper function which possibly converts this using DOS-style short mode.
44344  # If so, the updated path is stored in $new_path.
44345  new_path="$input_to_shortpath"
44346
44347  input_path="$input_to_shortpath"
44348  # Check if we need to convert this using DOS-style short mode. If the path
44349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44350  # take no chances and rewrite it.
44351  # Note: m4 eats our [], so we need to use [ and ] instead.
44352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44353  if test "x$has_forbidden_chars" != x; then
44354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44358      # Going to short mode and back again did indeed matter. Since short mode is
44359      # case insensitive, let's make it lowercase to improve readability.
44360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44361      # Now convert it back to Unix-style (cygpath)
44362      input_path=`$CYGPATH -u "$shortmode_path"`
44363      new_path="$input_path"
44364    fi
44365  fi
44366
44367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44368  if test "x$test_cygdrive_prefix" = x; then
44369    # As a simple fix, exclude /usr/bin since it's not a real path.
44370    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44372      # a path prefixed by /cygdrive for fixpath to work.
44373      new_path="$CYGWIN_ROOT_PATH$input_path"
44374    fi
44375  fi
44376
44377  # remove trailing .exe if any
44378  new_path="${new_path/%.exe/}"
44379
44380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44381
44382  # First separate the path from the arguments. This will split at the first
44383  # space.
44384  complete="$OBJDUMP"
44385  path="${complete%% *}"
44386  tmp="$complete EOL"
44387  arguments="${tmp#* }"
44388
44389  # Input might be given as Windows format, start by converting to
44390  # unix format.
44391  new_path="$path"
44392
44393  windows_path="$new_path"
44394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44395    unix_path=`$CYGPATH -u "$windows_path"`
44396    new_path="$unix_path"
44397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44399    new_path="$unix_path"
44400  fi
44401
44402
44403  # Now try to locate executable using which
44404  new_path=`$WHICH "$new_path" 2> /dev/null`
44405
44406  if test "x$new_path" = x; then
44407    # Oops. Which didn't find the executable.
44408    # The splitting of arguments from the executable at a space might have been incorrect,
44409    # since paths with space are more likely in Windows. Give it another try with the whole
44410    # argument.
44411    path="$complete"
44412    arguments="EOL"
44413    new_path="$path"
44414
44415  windows_path="$new_path"
44416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44417    unix_path=`$CYGPATH -u "$windows_path"`
44418    new_path="$unix_path"
44419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44421    new_path="$unix_path"
44422  fi
44423
44424
44425    new_path=`$WHICH "$new_path" 2> /dev/null`
44426    # bat and cmd files are not always considered executable in MSYS causing which
44427    # to not find them
44428    if test "x$new_path" = x \
44429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44431      new_path="$path"
44432
44433  windows_path="$new_path"
44434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435    unix_path=`$CYGPATH -u "$windows_path"`
44436    new_path="$unix_path"
44437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44439    new_path="$unix_path"
44440  fi
44441
44442    fi
44443
44444    if test "x$new_path" = x; then
44445      # It's still not found. Now this is an unrecoverable error.
44446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44447$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44448      has_space=`$ECHO "$complete" | $GREP " "`
44449      if test "x$has_space" != x; then
44450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44452      fi
44453      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44454    fi
44455  fi
44456
44457  # Now new_path has a complete unix path to the binary
44458  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44459    # Keep paths in /bin as-is, but remove trailing .exe if any
44460    new_path="${new_path/%.exe/}"
44461    # Do not save /bin paths to all_fixpath_prefixes!
44462  else
44463    # Not in mixed or Windows style, start by that.
44464    new_path=`cmd //c echo $new_path`
44465
44466  input_path="$new_path"
44467  # Check if we need to convert this using DOS-style short mode. If the path
44468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44469  # take no chances and rewrite it.
44470  # Note: m4 eats our [], so we need to use [ and ] instead.
44471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44472  if test "x$has_forbidden_chars" != x; then
44473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44475  fi
44476
44477    # Output is in $new_path
44478
44479  windows_path="$new_path"
44480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44481    unix_path=`$CYGPATH -u "$windows_path"`
44482    new_path="$unix_path"
44483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44485    new_path="$unix_path"
44486  fi
44487
44488    # remove trailing .exe if any
44489    new_path="${new_path/%.exe/}"
44490
44491    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44492    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44493  fi
44494
44495    else
44496      # We're on a unix platform. Hooray! :)
44497      # First separate the path from the arguments. This will split at the first
44498      # space.
44499      complete="$OBJDUMP"
44500      path="${complete%% *}"
44501      tmp="$complete EOL"
44502      arguments="${tmp#* }"
44503
44504      # Cannot rely on the command "which" here since it doesn't always work.
44505      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44506      if test -z "$is_absolute_path"; then
44507        # Path to executable is not absolute. Find it.
44508        IFS_save="$IFS"
44509        IFS=:
44510        for p in $PATH; do
44511          if test -f "$p/$path" && test -x "$p/$path"; then
44512            new_path="$p/$path"
44513            break
44514          fi
44515        done
44516        IFS="$IFS_save"
44517      else
44518        # This is an absolute path, we can use it without further modifications.
44519        new_path="$path"
44520      fi
44521
44522      if test "x$new_path" = x; then
44523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44524$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44525        has_space=`$ECHO "$complete" | $GREP " "`
44526        if test "x$has_space" != x; then
44527          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44528$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44529        fi
44530        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44531      fi
44532    fi
44533
44534    # Now join together the path and the arguments once again
44535    if test "x$arguments" != xEOL; then
44536      new_complete="$new_path ${arguments% *}"
44537    else
44538      new_complete="$new_path"
44539    fi
44540
44541    if test "x$complete" != "x$new_complete"; then
44542      OBJDUMP="$new_complete"
44543      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44544$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44545    fi
44546  fi
44547
44548  fi
44549
44550
44551  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44552  # to remain in place. Otherwise the compiler will not work in some siutations
44553  # in later configure checks.
44554  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44555    PATH="$OLD_PATH"
44556  fi
44557
44558  # Restore the flags to the user specified values.
44559  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44560  CFLAGS="$ORG_CFLAGS"
44561  CXXFLAGS="$ORG_CXXFLAGS"
44562
44563
44564# Finally do some processing after the detection phase
44565
44566  if test "x$COMPILE_TYPE" = "xcross"; then
44567    # Now we need to find a C/C++ compiler that can build executables for the
44568    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44569    # used once. Also, we need to do this without adding a tools dir to the
44570    # path, otherwise we might pick up cross-compilers which don't use standard
44571    # naming.
44572
44573    OLDPATH="$PATH"
44574
44575
44576# Check whether --with-build-devkit was given.
44577if test "${with_build_devkit+set}" = set; then :
44578  withval=$with_build_devkit;
44579fi
44580
44581    if test "x$with_build_devkit" = "xyes"; then
44582      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44583    elif test -n "$with_build_devkit"; then
44584      if test ! -d "$with_build_devkit"; then
44585        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44586      else
44587
44588  # Only process if variable expands to non-empty
44589
44590  if test "x$with_build_devkit" != x; then
44591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44592
44593  # Input might be given as Windows format, start by converting to
44594  # unix format.
44595  path="$with_build_devkit"
44596  new_path=`$CYGPATH -u "$path"`
44597
44598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44601  # "foo.exe" is OK but "foo" is an error.
44602  #
44603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44604  # It is also a way to make sure we got the proper file name for the real test later on.
44605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44606  if test "x$test_shortpath" = x; then
44607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44608$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44609    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44610  fi
44611
44612  # Call helper function which possibly converts this using DOS-style short mode.
44613  # If so, the updated path is stored in $new_path.
44614
44615  input_path="$new_path"
44616  # Check if we need to convert this using DOS-style short mode. If the path
44617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44618  # take no chances and rewrite it.
44619  # Note: m4 eats our [], so we need to use [ and ] instead.
44620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44621  if test "x$has_forbidden_chars" != x; then
44622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44626      # Going to short mode and back again did indeed matter. Since short mode is
44627      # case insensitive, let's make it lowercase to improve readability.
44628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44629      # Now convert it back to Unix-style (cygpath)
44630      input_path=`$CYGPATH -u "$shortmode_path"`
44631      new_path="$input_path"
44632    fi
44633  fi
44634
44635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44636  if test "x$test_cygdrive_prefix" = x; then
44637    # As a simple fix, exclude /usr/bin since it's not a real path.
44638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44640      # a path prefixed by /cygdrive for fixpath to work.
44641      new_path="$CYGWIN_ROOT_PATH$input_path"
44642    fi
44643  fi
44644
44645
44646  if test "x$path" != "x$new_path"; then
44647    with_build_devkit="$new_path"
44648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44649$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44650  fi
44651
44652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44653
44654  path="$with_build_devkit"
44655  has_colon=`$ECHO $path | $GREP ^.:`
44656  new_path="$path"
44657  if test "x$has_colon" = x; then
44658    # Not in mixed or Windows style, start by that.
44659    new_path=`cmd //c echo $path`
44660  fi
44661
44662
44663  input_path="$new_path"
44664  # Check if we need to convert this using DOS-style short mode. If the path
44665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44666  # take no chances and rewrite it.
44667  # Note: m4 eats our [], so we need to use [ and ] instead.
44668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44669  if test "x$has_forbidden_chars" != x; then
44670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44672  fi
44673
44674
44675  windows_path="$new_path"
44676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44677    unix_path=`$CYGPATH -u "$windows_path"`
44678    new_path="$unix_path"
44679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44681    new_path="$unix_path"
44682  fi
44683
44684  if test "x$path" != "x$new_path"; then
44685    with_build_devkit="$new_path"
44686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44687$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44688  fi
44689
44690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44692
44693    else
44694      # We're on a unix platform. Hooray! :)
44695      path="$with_build_devkit"
44696      has_space=`$ECHO "$path" | $GREP " "`
44697      if test "x$has_space" != x; then
44698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44699$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44701      fi
44702
44703      # Use eval to expand a potential ~
44704      eval path="$path"
44705      if test ! -f "$path" && test ! -d "$path"; then
44706        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44707      fi
44708
44709      if test -d "$path"; then
44710        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44711      else
44712        dir="`$DIRNAME "$path"`"
44713        base="`$BASENAME "$path"`"
44714        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44715      fi
44716    fi
44717  fi
44718
44719        BUILD_DEVKIT_ROOT="$with_build_devkit"
44720        # Check for a meta data info file in the root of the devkit
44721        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44722          # Process devkit.info so that existing devkit variables are not
44723          # modified by this
44724          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44725              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44726              -e "s/\$host/\$build/g" \
44727              $BUILD_DEVKIT_ROOT/devkit.info \
44728              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44729          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44730          # This potentially sets the following:
44731          # A descriptive name of the devkit
44732
44733  if test "x$BUILD_DEVKIT_NAME" = x; then
44734    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44735  fi
44736
44737          # Corresponds to --with-extra-path
44738
44739  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44740    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44741  fi
44742
44743          # Corresponds to --with-toolchain-path
44744
44745  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44746    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44747  fi
44748
44749          # Corresponds to --with-sysroot
44750
44751  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44752    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44753  fi
44754
44755          # Skip the Window specific parts
44756        fi
44757
44758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44759$as_echo_n "checking for build platform devkit... " >&6; }
44760        if test "x$BUILD_DEVKIT_NAME" != x; then
44761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44762$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44763        else
44764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44765$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44766        fi
44767
44768        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44769
44770  if test "x$BUILD_SYSROOT" != "x"; then
44771    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44772      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44773        # Solaris Studio does not have a concept of sysroot. Instead we must
44774        # make sure the default include and lib dirs are appended to each
44775        # compile and link command line. Must also add -I-xbuiltin to enable
44776        # inlining of system functions and intrinsics.
44777        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44778        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44779            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44780      fi
44781    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44782      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44783      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44784    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44785      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44786      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44787    fi
44788    # The global CFLAGS and LDFLAGS variables need these for configure to function
44789    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44790    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44791    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44792    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44793  fi
44794
44795  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44796    # We also need -iframework<path>/System/Library/Frameworks
44797    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44798    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44799    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44800    # set this here so it doesn't have to be peppered throughout the forest
44801    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44802    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44803  fi
44804
44805
44806
44807
44808
44809         # Fallback default of just /bin if DEVKIT_PATH is not defined
44810        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44811          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44812        fi
44813        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44814      fi
44815    fi
44816
44817    # FIXME: we should list the discovered compilers as an exclude pattern!
44818    # If we do that, we can do this detection before POST_DETECTION, and still
44819    # find the build compilers in the tools dir, if needed.
44820
44821
44822
44823  # Publish this variable in the help.
44824
44825
44826  if [ -z "${BUILD_CC+x}" ]; then
44827    # The variable is not set by user, try to locate tool using the code snippet
44828    for ac_prog in cl cc gcc
44829do
44830  # Extract the first word of "$ac_prog", so it can be a program name with args.
44831set dummy $ac_prog; ac_word=$2
44832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44833$as_echo_n "checking for $ac_word... " >&6; }
44834if ${ac_cv_path_BUILD_CC+:} false; then :
44835  $as_echo_n "(cached) " >&6
44836else
44837  case $BUILD_CC in
44838  [\\/]* | ?:[\\/]*)
44839  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44840  ;;
44841  *)
44842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44843for as_dir in $PATH
44844do
44845  IFS=$as_save_IFS
44846  test -z "$as_dir" && as_dir=.
44847    for ac_exec_ext in '' $ac_executable_extensions; do
44848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44849    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44851    break 2
44852  fi
44853done
44854  done
44855IFS=$as_save_IFS
44856
44857  ;;
44858esac
44859fi
44860BUILD_CC=$ac_cv_path_BUILD_CC
44861if test -n "$BUILD_CC"; then
44862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44863$as_echo "$BUILD_CC" >&6; }
44864else
44865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44866$as_echo "no" >&6; }
44867fi
44868
44869
44870  test -n "$BUILD_CC" && break
44871done
44872
44873  else
44874    # The variable is set, but is it from the command line or the environment?
44875
44876    # Try to remove the string !BUILD_CC! from our list.
44877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44879      # If it failed, the variable was not from the command line. Ignore it,
44880      # but warn the user (except for BASH, which is always set by the calling BASH).
44881      if test "xBUILD_CC" != xBASH; then
44882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44883$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44884      fi
44885      # Try to locate tool using the code snippet
44886      for ac_prog in cl cc gcc
44887do
44888  # Extract the first word of "$ac_prog", so it can be a program name with args.
44889set dummy $ac_prog; ac_word=$2
44890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44891$as_echo_n "checking for $ac_word... " >&6; }
44892if ${ac_cv_path_BUILD_CC+:} false; then :
44893  $as_echo_n "(cached) " >&6
44894else
44895  case $BUILD_CC in
44896  [\\/]* | ?:[\\/]*)
44897  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44898  ;;
44899  *)
44900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44901for as_dir in $PATH
44902do
44903  IFS=$as_save_IFS
44904  test -z "$as_dir" && as_dir=.
44905    for ac_exec_ext in '' $ac_executable_extensions; do
44906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44907    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44909    break 2
44910  fi
44911done
44912  done
44913IFS=$as_save_IFS
44914
44915  ;;
44916esac
44917fi
44918BUILD_CC=$ac_cv_path_BUILD_CC
44919if test -n "$BUILD_CC"; then
44920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44921$as_echo "$BUILD_CC" >&6; }
44922else
44923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44924$as_echo "no" >&6; }
44925fi
44926
44927
44928  test -n "$BUILD_CC" && break
44929done
44930
44931    else
44932      # If it succeeded, then it was overridden by the user. We will use it
44933      # for the tool.
44934
44935      # First remove it from the list of overridden variables, so we can test
44936      # for unknown variables in the end.
44937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44938
44939      # Check if we try to supply an empty value
44940      if test "x$BUILD_CC" = x; then
44941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44942$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44944$as_echo_n "checking for BUILD_CC... " >&6; }
44945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44946$as_echo "disabled" >&6; }
44947      else
44948        # Check if the provided tool contains a complete path.
44949        tool_specified="$BUILD_CC"
44950        tool_basename="${tool_specified##*/}"
44951        if test "x$tool_basename" = "x$tool_specified"; then
44952          # A command without a complete path is provided, search $PATH.
44953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44954$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44955          # Extract the first word of "$tool_basename", so it can be a program name with args.
44956set dummy $tool_basename; ac_word=$2
44957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44958$as_echo_n "checking for $ac_word... " >&6; }
44959if ${ac_cv_path_BUILD_CC+:} false; then :
44960  $as_echo_n "(cached) " >&6
44961else
44962  case $BUILD_CC in
44963  [\\/]* | ?:[\\/]*)
44964  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44965  ;;
44966  *)
44967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44968for as_dir in $PATH
44969do
44970  IFS=$as_save_IFS
44971  test -z "$as_dir" && as_dir=.
44972    for ac_exec_ext in '' $ac_executable_extensions; do
44973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44974    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44976    break 2
44977  fi
44978done
44979  done
44980IFS=$as_save_IFS
44981
44982  ;;
44983esac
44984fi
44985BUILD_CC=$ac_cv_path_BUILD_CC
44986if test -n "$BUILD_CC"; then
44987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44988$as_echo "$BUILD_CC" >&6; }
44989else
44990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44991$as_echo "no" >&6; }
44992fi
44993
44994
44995          if test "x$BUILD_CC" = x; then
44996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44997          fi
44998        else
44999          # Otherwise we believe it is a complete path. Use it as it is.
45000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45001$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45003$as_echo_n "checking for BUILD_CC... " >&6; }
45004          if test ! -x "$tool_specified"; then
45005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45006$as_echo "not found" >&6; }
45007            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45008          fi
45009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45010$as_echo "$tool_specified" >&6; }
45011        fi
45012      fi
45013    fi
45014
45015  fi
45016
45017
45018
45019  if test "x$BUILD_CC" = x; then
45020    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45021  fi
45022
45023
45024
45025  # Only process if variable expands to non-empty
45026
45027  if test "x$BUILD_CC" != x; then
45028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45029
45030  # First separate the path from the arguments. This will split at the first
45031  # space.
45032  complete="$BUILD_CC"
45033  path="${complete%% *}"
45034  tmp="$complete EOL"
45035  arguments="${tmp#* }"
45036
45037  # Input might be given as Windows format, start by converting to
45038  # unix format.
45039  new_path=`$CYGPATH -u "$path"`
45040
45041  # Now try to locate executable using which
45042  new_path=`$WHICH "$new_path" 2> /dev/null`
45043  # bat and cmd files are not always considered executable in cygwin causing which
45044  # to not find them
45045  if test "x$new_path" = x \
45046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45048    new_path=`$CYGPATH -u "$path"`
45049  fi
45050  if test "x$new_path" = x; then
45051    # Oops. Which didn't find the executable.
45052    # The splitting of arguments from the executable at a space might have been incorrect,
45053    # since paths with space are more likely in Windows. Give it another try with the whole
45054    # argument.
45055    path="$complete"
45056    arguments="EOL"
45057    new_path=`$CYGPATH -u "$path"`
45058    new_path=`$WHICH "$new_path" 2> /dev/null`
45059    # bat and cmd files are not always considered executable in cygwin causing which
45060    # to not find them
45061    if test "x$new_path" = x \
45062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45064      new_path=`$CYGPATH -u "$path"`
45065    fi
45066    if test "x$new_path" = x; then
45067      # It's still not found. Now this is an unrecoverable error.
45068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45069$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45070      has_space=`$ECHO "$complete" | $GREP " "`
45071      if test "x$has_space" != x; then
45072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45074      fi
45075      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45076    fi
45077  fi
45078
45079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45082  # "foo.exe" is OK but "foo" is an error.
45083  #
45084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45085  # It is also a way to make sure we got the proper file name for the real test later on.
45086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45087  if test "x$test_shortpath" = x; then
45088    # Short path failed, file does not exist as specified.
45089    # Try adding .exe or .cmd
45090    if test -f "${new_path}.exe"; then
45091      input_to_shortpath="${new_path}.exe"
45092    elif test -f "${new_path}.cmd"; then
45093      input_to_shortpath="${new_path}.cmd"
45094    else
45095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45096$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45099      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45100    fi
45101  else
45102    input_to_shortpath="$new_path"
45103  fi
45104
45105  # Call helper function which possibly converts this using DOS-style short mode.
45106  # If so, the updated path is stored in $new_path.
45107  new_path="$input_to_shortpath"
45108
45109  input_path="$input_to_shortpath"
45110  # Check if we need to convert this using DOS-style short mode. If the path
45111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45112  # take no chances and rewrite it.
45113  # Note: m4 eats our [], so we need to use [ and ] instead.
45114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45115  if test "x$has_forbidden_chars" != x; then
45116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45120      # Going to short mode and back again did indeed matter. Since short mode is
45121      # case insensitive, let's make it lowercase to improve readability.
45122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45123      # Now convert it back to Unix-style (cygpath)
45124      input_path=`$CYGPATH -u "$shortmode_path"`
45125      new_path="$input_path"
45126    fi
45127  fi
45128
45129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45130  if test "x$test_cygdrive_prefix" = x; then
45131    # As a simple fix, exclude /usr/bin since it's not a real path.
45132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45134      # a path prefixed by /cygdrive for fixpath to work.
45135      new_path="$CYGWIN_ROOT_PATH$input_path"
45136    fi
45137  fi
45138
45139  # remove trailing .exe if any
45140  new_path="${new_path/%.exe/}"
45141
45142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45143
45144  # First separate the path from the arguments. This will split at the first
45145  # space.
45146  complete="$BUILD_CC"
45147  path="${complete%% *}"
45148  tmp="$complete EOL"
45149  arguments="${tmp#* }"
45150
45151  # Input might be given as Windows format, start by converting to
45152  # unix format.
45153  new_path="$path"
45154
45155  windows_path="$new_path"
45156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45157    unix_path=`$CYGPATH -u "$windows_path"`
45158    new_path="$unix_path"
45159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45161    new_path="$unix_path"
45162  fi
45163
45164
45165  # Now try to locate executable using which
45166  new_path=`$WHICH "$new_path" 2> /dev/null`
45167
45168  if test "x$new_path" = x; then
45169    # Oops. Which didn't find the executable.
45170    # The splitting of arguments from the executable at a space might have been incorrect,
45171    # since paths with space are more likely in Windows. Give it another try with the whole
45172    # argument.
45173    path="$complete"
45174    arguments="EOL"
45175    new_path="$path"
45176
45177  windows_path="$new_path"
45178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45179    unix_path=`$CYGPATH -u "$windows_path"`
45180    new_path="$unix_path"
45181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45183    new_path="$unix_path"
45184  fi
45185
45186
45187    new_path=`$WHICH "$new_path" 2> /dev/null`
45188    # bat and cmd files are not always considered executable in MSYS causing which
45189    # to not find them
45190    if test "x$new_path" = x \
45191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45193      new_path="$path"
45194
45195  windows_path="$new_path"
45196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45197    unix_path=`$CYGPATH -u "$windows_path"`
45198    new_path="$unix_path"
45199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45201    new_path="$unix_path"
45202  fi
45203
45204    fi
45205
45206    if test "x$new_path" = x; then
45207      # It's still not found. Now this is an unrecoverable error.
45208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45209$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45210      has_space=`$ECHO "$complete" | $GREP " "`
45211      if test "x$has_space" != x; then
45212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45214      fi
45215      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45216    fi
45217  fi
45218
45219  # Now new_path has a complete unix path to the binary
45220  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45221    # Keep paths in /bin as-is, but remove trailing .exe if any
45222    new_path="${new_path/%.exe/}"
45223    # Do not save /bin paths to all_fixpath_prefixes!
45224  else
45225    # Not in mixed or Windows style, start by that.
45226    new_path=`cmd //c echo $new_path`
45227
45228  input_path="$new_path"
45229  # Check if we need to convert this using DOS-style short mode. If the path
45230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45231  # take no chances and rewrite it.
45232  # Note: m4 eats our [], so we need to use [ and ] instead.
45233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45234  if test "x$has_forbidden_chars" != x; then
45235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45237  fi
45238
45239    # Output is in $new_path
45240
45241  windows_path="$new_path"
45242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45243    unix_path=`$CYGPATH -u "$windows_path"`
45244    new_path="$unix_path"
45245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45247    new_path="$unix_path"
45248  fi
45249
45250    # remove trailing .exe if any
45251    new_path="${new_path/%.exe/}"
45252
45253    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45254    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45255  fi
45256
45257    else
45258      # We're on a unix platform. Hooray! :)
45259      # First separate the path from the arguments. This will split at the first
45260      # space.
45261      complete="$BUILD_CC"
45262      path="${complete%% *}"
45263      tmp="$complete EOL"
45264      arguments="${tmp#* }"
45265
45266      # Cannot rely on the command "which" here since it doesn't always work.
45267      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45268      if test -z "$is_absolute_path"; then
45269        # Path to executable is not absolute. Find it.
45270        IFS_save="$IFS"
45271        IFS=:
45272        for p in $PATH; do
45273          if test -f "$p/$path" && test -x "$p/$path"; then
45274            new_path="$p/$path"
45275            break
45276          fi
45277        done
45278        IFS="$IFS_save"
45279      else
45280        # This is an absolute path, we can use it without further modifications.
45281        new_path="$path"
45282      fi
45283
45284      if test "x$new_path" = x; then
45285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45286$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45287        has_space=`$ECHO "$complete" | $GREP " "`
45288        if test "x$has_space" != x; then
45289          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45291        fi
45292        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45293      fi
45294    fi
45295
45296    # Now join together the path and the arguments once again
45297    if test "x$arguments" != xEOL; then
45298      new_complete="$new_path ${arguments% *}"
45299    else
45300      new_complete="$new_path"
45301    fi
45302
45303    if test "x$complete" != "x$new_complete"; then
45304      BUILD_CC="$new_complete"
45305      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45306$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45307    fi
45308  fi
45309
45310
45311
45312
45313  # Publish this variable in the help.
45314
45315
45316  if [ -z "${BUILD_CXX+x}" ]; then
45317    # The variable is not set by user, try to locate tool using the code snippet
45318    for ac_prog in cl CC g++
45319do
45320  # Extract the first word of "$ac_prog", so it can be a program name with args.
45321set dummy $ac_prog; ac_word=$2
45322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45323$as_echo_n "checking for $ac_word... " >&6; }
45324if ${ac_cv_path_BUILD_CXX+:} false; then :
45325  $as_echo_n "(cached) " >&6
45326else
45327  case $BUILD_CXX in
45328  [\\/]* | ?:[\\/]*)
45329  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45330  ;;
45331  *)
45332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45333for as_dir in $PATH
45334do
45335  IFS=$as_save_IFS
45336  test -z "$as_dir" && as_dir=.
45337    for ac_exec_ext in '' $ac_executable_extensions; do
45338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45339    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45341    break 2
45342  fi
45343done
45344  done
45345IFS=$as_save_IFS
45346
45347  ;;
45348esac
45349fi
45350BUILD_CXX=$ac_cv_path_BUILD_CXX
45351if test -n "$BUILD_CXX"; then
45352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45353$as_echo "$BUILD_CXX" >&6; }
45354else
45355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45356$as_echo "no" >&6; }
45357fi
45358
45359
45360  test -n "$BUILD_CXX" && break
45361done
45362
45363  else
45364    # The variable is set, but is it from the command line or the environment?
45365
45366    # Try to remove the string !BUILD_CXX! from our list.
45367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45369      # If it failed, the variable was not from the command line. Ignore it,
45370      # but warn the user (except for BASH, which is always set by the calling BASH).
45371      if test "xBUILD_CXX" != xBASH; then
45372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45373$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45374      fi
45375      # Try to locate tool using the code snippet
45376      for ac_prog in cl CC g++
45377do
45378  # Extract the first word of "$ac_prog", so it can be a program name with args.
45379set dummy $ac_prog; ac_word=$2
45380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45381$as_echo_n "checking for $ac_word... " >&6; }
45382if ${ac_cv_path_BUILD_CXX+:} false; then :
45383  $as_echo_n "(cached) " >&6
45384else
45385  case $BUILD_CXX in
45386  [\\/]* | ?:[\\/]*)
45387  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45388  ;;
45389  *)
45390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45391for as_dir in $PATH
45392do
45393  IFS=$as_save_IFS
45394  test -z "$as_dir" && as_dir=.
45395    for ac_exec_ext in '' $ac_executable_extensions; do
45396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45397    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45399    break 2
45400  fi
45401done
45402  done
45403IFS=$as_save_IFS
45404
45405  ;;
45406esac
45407fi
45408BUILD_CXX=$ac_cv_path_BUILD_CXX
45409if test -n "$BUILD_CXX"; then
45410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45411$as_echo "$BUILD_CXX" >&6; }
45412else
45413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45414$as_echo "no" >&6; }
45415fi
45416
45417
45418  test -n "$BUILD_CXX" && break
45419done
45420
45421    else
45422      # If it succeeded, then it was overridden by the user. We will use it
45423      # for the tool.
45424
45425      # First remove it from the list of overridden variables, so we can test
45426      # for unknown variables in the end.
45427      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45428
45429      # Check if we try to supply an empty value
45430      if test "x$BUILD_CXX" = x; then
45431        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45432$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45434$as_echo_n "checking for BUILD_CXX... " >&6; }
45435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45436$as_echo "disabled" >&6; }
45437      else
45438        # Check if the provided tool contains a complete path.
45439        tool_specified="$BUILD_CXX"
45440        tool_basename="${tool_specified##*/}"
45441        if test "x$tool_basename" = "x$tool_specified"; then
45442          # A command without a complete path is provided, search $PATH.
45443          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45444$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45445          # Extract the first word of "$tool_basename", so it can be a program name with args.
45446set dummy $tool_basename; ac_word=$2
45447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45448$as_echo_n "checking for $ac_word... " >&6; }
45449if ${ac_cv_path_BUILD_CXX+:} false; then :
45450  $as_echo_n "(cached) " >&6
45451else
45452  case $BUILD_CXX in
45453  [\\/]* | ?:[\\/]*)
45454  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45455  ;;
45456  *)
45457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45458for as_dir in $PATH
45459do
45460  IFS=$as_save_IFS
45461  test -z "$as_dir" && as_dir=.
45462    for ac_exec_ext in '' $ac_executable_extensions; do
45463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45464    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45466    break 2
45467  fi
45468done
45469  done
45470IFS=$as_save_IFS
45471
45472  ;;
45473esac
45474fi
45475BUILD_CXX=$ac_cv_path_BUILD_CXX
45476if test -n "$BUILD_CXX"; then
45477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45478$as_echo "$BUILD_CXX" >&6; }
45479else
45480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45481$as_echo "no" >&6; }
45482fi
45483
45484
45485          if test "x$BUILD_CXX" = x; then
45486            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45487          fi
45488        else
45489          # Otherwise we believe it is a complete path. Use it as it is.
45490          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45491$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45492          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45493$as_echo_n "checking for BUILD_CXX... " >&6; }
45494          if test ! -x "$tool_specified"; then
45495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45496$as_echo "not found" >&6; }
45497            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45498          fi
45499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45500$as_echo "$tool_specified" >&6; }
45501        fi
45502      fi
45503    fi
45504
45505  fi
45506
45507
45508
45509  if test "x$BUILD_CXX" = x; then
45510    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45511  fi
45512
45513
45514
45515  # Only process if variable expands to non-empty
45516
45517  if test "x$BUILD_CXX" != x; then
45518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45519
45520  # First separate the path from the arguments. This will split at the first
45521  # space.
45522  complete="$BUILD_CXX"
45523  path="${complete%% *}"
45524  tmp="$complete EOL"
45525  arguments="${tmp#* }"
45526
45527  # Input might be given as Windows format, start by converting to
45528  # unix format.
45529  new_path=`$CYGPATH -u "$path"`
45530
45531  # Now try to locate executable using which
45532  new_path=`$WHICH "$new_path" 2> /dev/null`
45533  # bat and cmd files are not always considered executable in cygwin causing which
45534  # to not find them
45535  if test "x$new_path" = x \
45536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45538    new_path=`$CYGPATH -u "$path"`
45539  fi
45540  if test "x$new_path" = x; then
45541    # Oops. Which didn't find the executable.
45542    # The splitting of arguments from the executable at a space might have been incorrect,
45543    # since paths with space are more likely in Windows. Give it another try with the whole
45544    # argument.
45545    path="$complete"
45546    arguments="EOL"
45547    new_path=`$CYGPATH -u "$path"`
45548    new_path=`$WHICH "$new_path" 2> /dev/null`
45549    # bat and cmd files are not always considered executable in cygwin causing which
45550    # to not find them
45551    if test "x$new_path" = x \
45552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45554      new_path=`$CYGPATH -u "$path"`
45555    fi
45556    if test "x$new_path" = x; then
45557      # It's still not found. Now this is an unrecoverable error.
45558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45559$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45560      has_space=`$ECHO "$complete" | $GREP " "`
45561      if test "x$has_space" != x; then
45562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45564      fi
45565      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45566    fi
45567  fi
45568
45569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45572  # "foo.exe" is OK but "foo" is an error.
45573  #
45574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45575  # It is also a way to make sure we got the proper file name for the real test later on.
45576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45577  if test "x$test_shortpath" = x; then
45578    # Short path failed, file does not exist as specified.
45579    # Try adding .exe or .cmd
45580    if test -f "${new_path}.exe"; then
45581      input_to_shortpath="${new_path}.exe"
45582    elif test -f "${new_path}.cmd"; then
45583      input_to_shortpath="${new_path}.cmd"
45584    else
45585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45586$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45589      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45590    fi
45591  else
45592    input_to_shortpath="$new_path"
45593  fi
45594
45595  # Call helper function which possibly converts this using DOS-style short mode.
45596  # If so, the updated path is stored in $new_path.
45597  new_path="$input_to_shortpath"
45598
45599  input_path="$input_to_shortpath"
45600  # Check if we need to convert this using DOS-style short mode. If the path
45601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45602  # take no chances and rewrite it.
45603  # Note: m4 eats our [], so we need to use [ and ] instead.
45604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45605  if test "x$has_forbidden_chars" != x; then
45606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45610      # Going to short mode and back again did indeed matter. Since short mode is
45611      # case insensitive, let's make it lowercase to improve readability.
45612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45613      # Now convert it back to Unix-style (cygpath)
45614      input_path=`$CYGPATH -u "$shortmode_path"`
45615      new_path="$input_path"
45616    fi
45617  fi
45618
45619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45620  if test "x$test_cygdrive_prefix" = x; then
45621    # As a simple fix, exclude /usr/bin since it's not a real path.
45622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45624      # a path prefixed by /cygdrive for fixpath to work.
45625      new_path="$CYGWIN_ROOT_PATH$input_path"
45626    fi
45627  fi
45628
45629  # remove trailing .exe if any
45630  new_path="${new_path/%.exe/}"
45631
45632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45633
45634  # First separate the path from the arguments. This will split at the first
45635  # space.
45636  complete="$BUILD_CXX"
45637  path="${complete%% *}"
45638  tmp="$complete EOL"
45639  arguments="${tmp#* }"
45640
45641  # Input might be given as Windows format, start by converting to
45642  # unix format.
45643  new_path="$path"
45644
45645  windows_path="$new_path"
45646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45647    unix_path=`$CYGPATH -u "$windows_path"`
45648    new_path="$unix_path"
45649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45651    new_path="$unix_path"
45652  fi
45653
45654
45655  # Now try to locate executable using which
45656  new_path=`$WHICH "$new_path" 2> /dev/null`
45657
45658  if test "x$new_path" = x; then
45659    # Oops. Which didn't find the executable.
45660    # The splitting of arguments from the executable at a space might have been incorrect,
45661    # since paths with space are more likely in Windows. Give it another try with the whole
45662    # argument.
45663    path="$complete"
45664    arguments="EOL"
45665    new_path="$path"
45666
45667  windows_path="$new_path"
45668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45669    unix_path=`$CYGPATH -u "$windows_path"`
45670    new_path="$unix_path"
45671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45673    new_path="$unix_path"
45674  fi
45675
45676
45677    new_path=`$WHICH "$new_path" 2> /dev/null`
45678    # bat and cmd files are not always considered executable in MSYS causing which
45679    # to not find them
45680    if test "x$new_path" = x \
45681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45683      new_path="$path"
45684
45685  windows_path="$new_path"
45686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45687    unix_path=`$CYGPATH -u "$windows_path"`
45688    new_path="$unix_path"
45689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45691    new_path="$unix_path"
45692  fi
45693
45694    fi
45695
45696    if test "x$new_path" = x; then
45697      # It's still not found. Now this is an unrecoverable error.
45698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45699$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45700      has_space=`$ECHO "$complete" | $GREP " "`
45701      if test "x$has_space" != x; then
45702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45704      fi
45705      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45706    fi
45707  fi
45708
45709  # Now new_path has a complete unix path to the binary
45710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45711    # Keep paths in /bin as-is, but remove trailing .exe if any
45712    new_path="${new_path/%.exe/}"
45713    # Do not save /bin paths to all_fixpath_prefixes!
45714  else
45715    # Not in mixed or Windows style, start by that.
45716    new_path=`cmd //c echo $new_path`
45717
45718  input_path="$new_path"
45719  # Check if we need to convert this using DOS-style short mode. If the path
45720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45721  # take no chances and rewrite it.
45722  # Note: m4 eats our [], so we need to use [ and ] instead.
45723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45724  if test "x$has_forbidden_chars" != x; then
45725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45727  fi
45728
45729    # Output is in $new_path
45730
45731  windows_path="$new_path"
45732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45733    unix_path=`$CYGPATH -u "$windows_path"`
45734    new_path="$unix_path"
45735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45737    new_path="$unix_path"
45738  fi
45739
45740    # remove trailing .exe if any
45741    new_path="${new_path/%.exe/}"
45742
45743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45745  fi
45746
45747    else
45748      # We're on a unix platform. Hooray! :)
45749      # First separate the path from the arguments. This will split at the first
45750      # space.
45751      complete="$BUILD_CXX"
45752      path="${complete%% *}"
45753      tmp="$complete EOL"
45754      arguments="${tmp#* }"
45755
45756      # Cannot rely on the command "which" here since it doesn't always work.
45757      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45758      if test -z "$is_absolute_path"; then
45759        # Path to executable is not absolute. Find it.
45760        IFS_save="$IFS"
45761        IFS=:
45762        for p in $PATH; do
45763          if test -f "$p/$path" && test -x "$p/$path"; then
45764            new_path="$p/$path"
45765            break
45766          fi
45767        done
45768        IFS="$IFS_save"
45769      else
45770        # This is an absolute path, we can use it without further modifications.
45771        new_path="$path"
45772      fi
45773
45774      if test "x$new_path" = x; then
45775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45776$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45777        has_space=`$ECHO "$complete" | $GREP " "`
45778        if test "x$has_space" != x; then
45779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45781        fi
45782        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45783      fi
45784    fi
45785
45786    # Now join together the path and the arguments once again
45787    if test "x$arguments" != xEOL; then
45788      new_complete="$new_path ${arguments% *}"
45789    else
45790      new_complete="$new_path"
45791    fi
45792
45793    if test "x$complete" != "x$new_complete"; then
45794      BUILD_CXX="$new_complete"
45795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45796$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45797    fi
45798  fi
45799
45800
45801
45802  # Publish this variable in the help.
45803
45804
45805  if [ -z "${BUILD_NM+x}" ]; then
45806    # The variable is not set by user, try to locate tool using the code snippet
45807    for ac_prog in nm gcc-nm
45808do
45809  # Extract the first word of "$ac_prog", so it can be a program name with args.
45810set dummy $ac_prog; ac_word=$2
45811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45812$as_echo_n "checking for $ac_word... " >&6; }
45813if ${ac_cv_path_BUILD_NM+:} false; then :
45814  $as_echo_n "(cached) " >&6
45815else
45816  case $BUILD_NM in
45817  [\\/]* | ?:[\\/]*)
45818  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45819  ;;
45820  *)
45821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45822for as_dir in $PATH
45823do
45824  IFS=$as_save_IFS
45825  test -z "$as_dir" && as_dir=.
45826    for ac_exec_ext in '' $ac_executable_extensions; do
45827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45828    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45830    break 2
45831  fi
45832done
45833  done
45834IFS=$as_save_IFS
45835
45836  ;;
45837esac
45838fi
45839BUILD_NM=$ac_cv_path_BUILD_NM
45840if test -n "$BUILD_NM"; then
45841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45842$as_echo "$BUILD_NM" >&6; }
45843else
45844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45845$as_echo "no" >&6; }
45846fi
45847
45848
45849  test -n "$BUILD_NM" && break
45850done
45851
45852  else
45853    # The variable is set, but is it from the command line or the environment?
45854
45855    # Try to remove the string !BUILD_NM! from our list.
45856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45858      # If it failed, the variable was not from the command line. Ignore it,
45859      # but warn the user (except for BASH, which is always set by the calling BASH).
45860      if test "xBUILD_NM" != xBASH; then
45861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45862$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45863      fi
45864      # Try to locate tool using the code snippet
45865      for ac_prog in nm gcc-nm
45866do
45867  # Extract the first word of "$ac_prog", so it can be a program name with args.
45868set dummy $ac_prog; ac_word=$2
45869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45870$as_echo_n "checking for $ac_word... " >&6; }
45871if ${ac_cv_path_BUILD_NM+:} false; then :
45872  $as_echo_n "(cached) " >&6
45873else
45874  case $BUILD_NM in
45875  [\\/]* | ?:[\\/]*)
45876  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45877  ;;
45878  *)
45879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45880for as_dir in $PATH
45881do
45882  IFS=$as_save_IFS
45883  test -z "$as_dir" && as_dir=.
45884    for ac_exec_ext in '' $ac_executable_extensions; do
45885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45886    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45888    break 2
45889  fi
45890done
45891  done
45892IFS=$as_save_IFS
45893
45894  ;;
45895esac
45896fi
45897BUILD_NM=$ac_cv_path_BUILD_NM
45898if test -n "$BUILD_NM"; then
45899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45900$as_echo "$BUILD_NM" >&6; }
45901else
45902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45903$as_echo "no" >&6; }
45904fi
45905
45906
45907  test -n "$BUILD_NM" && break
45908done
45909
45910    else
45911      # If it succeeded, then it was overridden by the user. We will use it
45912      # for the tool.
45913
45914      # First remove it from the list of overridden variables, so we can test
45915      # for unknown variables in the end.
45916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45917
45918      # Check if we try to supply an empty value
45919      if test "x$BUILD_NM" = x; then
45920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45921$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45923$as_echo_n "checking for BUILD_NM... " >&6; }
45924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45925$as_echo "disabled" >&6; }
45926      else
45927        # Check if the provided tool contains a complete path.
45928        tool_specified="$BUILD_NM"
45929        tool_basename="${tool_specified##*/}"
45930        if test "x$tool_basename" = "x$tool_specified"; then
45931          # A command without a complete path is provided, search $PATH.
45932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45933$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45934          # Extract the first word of "$tool_basename", so it can be a program name with args.
45935set dummy $tool_basename; ac_word=$2
45936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45937$as_echo_n "checking for $ac_word... " >&6; }
45938if ${ac_cv_path_BUILD_NM+:} false; then :
45939  $as_echo_n "(cached) " >&6
45940else
45941  case $BUILD_NM in
45942  [\\/]* | ?:[\\/]*)
45943  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45944  ;;
45945  *)
45946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45947for as_dir in $PATH
45948do
45949  IFS=$as_save_IFS
45950  test -z "$as_dir" && as_dir=.
45951    for ac_exec_ext in '' $ac_executable_extensions; do
45952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45953    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45955    break 2
45956  fi
45957done
45958  done
45959IFS=$as_save_IFS
45960
45961  ;;
45962esac
45963fi
45964BUILD_NM=$ac_cv_path_BUILD_NM
45965if test -n "$BUILD_NM"; then
45966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45967$as_echo "$BUILD_NM" >&6; }
45968else
45969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45970$as_echo "no" >&6; }
45971fi
45972
45973
45974          if test "x$BUILD_NM" = x; then
45975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45976          fi
45977        else
45978          # Otherwise we believe it is a complete path. Use it as it is.
45979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45980$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45982$as_echo_n "checking for BUILD_NM... " >&6; }
45983          if test ! -x "$tool_specified"; then
45984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45985$as_echo "not found" >&6; }
45986            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45987          fi
45988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45989$as_echo "$tool_specified" >&6; }
45990        fi
45991      fi
45992    fi
45993
45994  fi
45995
45996
45997
45998  # Only process if variable expands to non-empty
45999
46000  if test "x$BUILD_NM" != x; then
46001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46002
46003  # First separate the path from the arguments. This will split at the first
46004  # space.
46005  complete="$BUILD_NM"
46006  path="${complete%% *}"
46007  tmp="$complete EOL"
46008  arguments="${tmp#* }"
46009
46010  # Input might be given as Windows format, start by converting to
46011  # unix format.
46012  new_path=`$CYGPATH -u "$path"`
46013
46014  # Now try to locate executable using which
46015  new_path=`$WHICH "$new_path" 2> /dev/null`
46016  # bat and cmd files are not always considered executable in cygwin causing which
46017  # to not find them
46018  if test "x$new_path" = x \
46019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46021    new_path=`$CYGPATH -u "$path"`
46022  fi
46023  if test "x$new_path" = x; then
46024    # Oops. Which didn't find the executable.
46025    # The splitting of arguments from the executable at a space might have been incorrect,
46026    # since paths with space are more likely in Windows. Give it another try with the whole
46027    # argument.
46028    path="$complete"
46029    arguments="EOL"
46030    new_path=`$CYGPATH -u "$path"`
46031    new_path=`$WHICH "$new_path" 2> /dev/null`
46032    # bat and cmd files are not always considered executable in cygwin causing which
46033    # to not find them
46034    if test "x$new_path" = x \
46035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46037      new_path=`$CYGPATH -u "$path"`
46038    fi
46039    if test "x$new_path" = x; then
46040      # It's still not found. Now this is an unrecoverable error.
46041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46042$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46043      has_space=`$ECHO "$complete" | $GREP " "`
46044      if test "x$has_space" != x; then
46045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46047      fi
46048      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46049    fi
46050  fi
46051
46052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46055  # "foo.exe" is OK but "foo" is an error.
46056  #
46057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46058  # It is also a way to make sure we got the proper file name for the real test later on.
46059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46060  if test "x$test_shortpath" = x; then
46061    # Short path failed, file does not exist as specified.
46062    # Try adding .exe or .cmd
46063    if test -f "${new_path}.exe"; then
46064      input_to_shortpath="${new_path}.exe"
46065    elif test -f "${new_path}.cmd"; then
46066      input_to_shortpath="${new_path}.cmd"
46067    else
46068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46069$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46072      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46073    fi
46074  else
46075    input_to_shortpath="$new_path"
46076  fi
46077
46078  # Call helper function which possibly converts this using DOS-style short mode.
46079  # If so, the updated path is stored in $new_path.
46080  new_path="$input_to_shortpath"
46081
46082  input_path="$input_to_shortpath"
46083  # Check if we need to convert this using DOS-style short mode. If the path
46084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46085  # take no chances and rewrite it.
46086  # Note: m4 eats our [], so we need to use [ and ] instead.
46087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46088  if test "x$has_forbidden_chars" != x; then
46089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46093      # Going to short mode and back again did indeed matter. Since short mode is
46094      # case insensitive, let's make it lowercase to improve readability.
46095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46096      # Now convert it back to Unix-style (cygpath)
46097      input_path=`$CYGPATH -u "$shortmode_path"`
46098      new_path="$input_path"
46099    fi
46100  fi
46101
46102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46103  if test "x$test_cygdrive_prefix" = x; then
46104    # As a simple fix, exclude /usr/bin since it's not a real path.
46105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46107      # a path prefixed by /cygdrive for fixpath to work.
46108      new_path="$CYGWIN_ROOT_PATH$input_path"
46109    fi
46110  fi
46111
46112  # remove trailing .exe if any
46113  new_path="${new_path/%.exe/}"
46114
46115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46116
46117  # First separate the path from the arguments. This will split at the first
46118  # space.
46119  complete="$BUILD_NM"
46120  path="${complete%% *}"
46121  tmp="$complete EOL"
46122  arguments="${tmp#* }"
46123
46124  # Input might be given as Windows format, start by converting to
46125  # unix format.
46126  new_path="$path"
46127
46128  windows_path="$new_path"
46129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46130    unix_path=`$CYGPATH -u "$windows_path"`
46131    new_path="$unix_path"
46132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46134    new_path="$unix_path"
46135  fi
46136
46137
46138  # Now try to locate executable using which
46139  new_path=`$WHICH "$new_path" 2> /dev/null`
46140
46141  if test "x$new_path" = x; then
46142    # Oops. Which didn't find the executable.
46143    # The splitting of arguments from the executable at a space might have been incorrect,
46144    # since paths with space are more likely in Windows. Give it another try with the whole
46145    # argument.
46146    path="$complete"
46147    arguments="EOL"
46148    new_path="$path"
46149
46150  windows_path="$new_path"
46151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46152    unix_path=`$CYGPATH -u "$windows_path"`
46153    new_path="$unix_path"
46154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46156    new_path="$unix_path"
46157  fi
46158
46159
46160    new_path=`$WHICH "$new_path" 2> /dev/null`
46161    # bat and cmd files are not always considered executable in MSYS causing which
46162    # to not find them
46163    if test "x$new_path" = x \
46164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46166      new_path="$path"
46167
46168  windows_path="$new_path"
46169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46170    unix_path=`$CYGPATH -u "$windows_path"`
46171    new_path="$unix_path"
46172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46174    new_path="$unix_path"
46175  fi
46176
46177    fi
46178
46179    if test "x$new_path" = x; then
46180      # It's still not found. Now this is an unrecoverable error.
46181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46182$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46183      has_space=`$ECHO "$complete" | $GREP " "`
46184      if test "x$has_space" != x; then
46185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46187      fi
46188      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46189    fi
46190  fi
46191
46192  # Now new_path has a complete unix path to the binary
46193  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46194    # Keep paths in /bin as-is, but remove trailing .exe if any
46195    new_path="${new_path/%.exe/}"
46196    # Do not save /bin paths to all_fixpath_prefixes!
46197  else
46198    # Not in mixed or Windows style, start by that.
46199    new_path=`cmd //c echo $new_path`
46200
46201  input_path="$new_path"
46202  # Check if we need to convert this using DOS-style short mode. If the path
46203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46204  # take no chances and rewrite it.
46205  # Note: m4 eats our [], so we need to use [ and ] instead.
46206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46207  if test "x$has_forbidden_chars" != x; then
46208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46210  fi
46211
46212    # Output is in $new_path
46213
46214  windows_path="$new_path"
46215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46216    unix_path=`$CYGPATH -u "$windows_path"`
46217    new_path="$unix_path"
46218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46220    new_path="$unix_path"
46221  fi
46222
46223    # remove trailing .exe if any
46224    new_path="${new_path/%.exe/}"
46225
46226    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46227    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46228  fi
46229
46230    else
46231      # We're on a unix platform. Hooray! :)
46232      # First separate the path from the arguments. This will split at the first
46233      # space.
46234      complete="$BUILD_NM"
46235      path="${complete%% *}"
46236      tmp="$complete EOL"
46237      arguments="${tmp#* }"
46238
46239      # Cannot rely on the command "which" here since it doesn't always work.
46240      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46241      if test -z "$is_absolute_path"; then
46242        # Path to executable is not absolute. Find it.
46243        IFS_save="$IFS"
46244        IFS=:
46245        for p in $PATH; do
46246          if test -f "$p/$path" && test -x "$p/$path"; then
46247            new_path="$p/$path"
46248            break
46249          fi
46250        done
46251        IFS="$IFS_save"
46252      else
46253        # This is an absolute path, we can use it without further modifications.
46254        new_path="$path"
46255      fi
46256
46257      if test "x$new_path" = x; then
46258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46259$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46260        has_space=`$ECHO "$complete" | $GREP " "`
46261        if test "x$has_space" != x; then
46262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46264        fi
46265        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46266      fi
46267    fi
46268
46269    # Now join together the path and the arguments once again
46270    if test "x$arguments" != xEOL; then
46271      new_complete="$new_path ${arguments% *}"
46272    else
46273      new_complete="$new_path"
46274    fi
46275
46276    if test "x$complete" != "x$new_complete"; then
46277      BUILD_NM="$new_complete"
46278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46279$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46280    fi
46281  fi
46282
46283
46284
46285  # Publish this variable in the help.
46286
46287
46288  if [ -z "${BUILD_AR+x}" ]; then
46289    # The variable is not set by user, try to locate tool using the code snippet
46290    for ac_prog in ar gcc-ar
46291do
46292  # Extract the first word of "$ac_prog", so it can be a program name with args.
46293set dummy $ac_prog; ac_word=$2
46294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46295$as_echo_n "checking for $ac_word... " >&6; }
46296if ${ac_cv_path_BUILD_AR+:} false; then :
46297  $as_echo_n "(cached) " >&6
46298else
46299  case $BUILD_AR in
46300  [\\/]* | ?:[\\/]*)
46301  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46302  ;;
46303  *)
46304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46305for as_dir in $PATH
46306do
46307  IFS=$as_save_IFS
46308  test -z "$as_dir" && as_dir=.
46309    for ac_exec_ext in '' $ac_executable_extensions; do
46310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46311    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46313    break 2
46314  fi
46315done
46316  done
46317IFS=$as_save_IFS
46318
46319  ;;
46320esac
46321fi
46322BUILD_AR=$ac_cv_path_BUILD_AR
46323if test -n "$BUILD_AR"; then
46324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46325$as_echo "$BUILD_AR" >&6; }
46326else
46327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46328$as_echo "no" >&6; }
46329fi
46330
46331
46332  test -n "$BUILD_AR" && break
46333done
46334
46335  else
46336    # The variable is set, but is it from the command line or the environment?
46337
46338    # Try to remove the string !BUILD_AR! from our list.
46339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46341      # If it failed, the variable was not from the command line. Ignore it,
46342      # but warn the user (except for BASH, which is always set by the calling BASH).
46343      if test "xBUILD_AR" != xBASH; then
46344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46345$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46346      fi
46347      # Try to locate tool using the code snippet
46348      for ac_prog in ar gcc-ar
46349do
46350  # Extract the first word of "$ac_prog", so it can be a program name with args.
46351set dummy $ac_prog; ac_word=$2
46352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46353$as_echo_n "checking for $ac_word... " >&6; }
46354if ${ac_cv_path_BUILD_AR+:} false; then :
46355  $as_echo_n "(cached) " >&6
46356else
46357  case $BUILD_AR in
46358  [\\/]* | ?:[\\/]*)
46359  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46360  ;;
46361  *)
46362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46363for as_dir in $PATH
46364do
46365  IFS=$as_save_IFS
46366  test -z "$as_dir" && as_dir=.
46367    for ac_exec_ext in '' $ac_executable_extensions; do
46368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46369    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46371    break 2
46372  fi
46373done
46374  done
46375IFS=$as_save_IFS
46376
46377  ;;
46378esac
46379fi
46380BUILD_AR=$ac_cv_path_BUILD_AR
46381if test -n "$BUILD_AR"; then
46382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46383$as_echo "$BUILD_AR" >&6; }
46384else
46385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46386$as_echo "no" >&6; }
46387fi
46388
46389
46390  test -n "$BUILD_AR" && break
46391done
46392
46393    else
46394      # If it succeeded, then it was overridden by the user. We will use it
46395      # for the tool.
46396
46397      # First remove it from the list of overridden variables, so we can test
46398      # for unknown variables in the end.
46399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46400
46401      # Check if we try to supply an empty value
46402      if test "x$BUILD_AR" = x; then
46403        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46404$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46406$as_echo_n "checking for BUILD_AR... " >&6; }
46407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46408$as_echo "disabled" >&6; }
46409      else
46410        # Check if the provided tool contains a complete path.
46411        tool_specified="$BUILD_AR"
46412        tool_basename="${tool_specified##*/}"
46413        if test "x$tool_basename" = "x$tool_specified"; then
46414          # A command without a complete path is provided, search $PATH.
46415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46416$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46417          # Extract the first word of "$tool_basename", so it can be a program name with args.
46418set dummy $tool_basename; ac_word=$2
46419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46420$as_echo_n "checking for $ac_word... " >&6; }
46421if ${ac_cv_path_BUILD_AR+:} false; then :
46422  $as_echo_n "(cached) " >&6
46423else
46424  case $BUILD_AR in
46425  [\\/]* | ?:[\\/]*)
46426  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46427  ;;
46428  *)
46429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46430for as_dir in $PATH
46431do
46432  IFS=$as_save_IFS
46433  test -z "$as_dir" && as_dir=.
46434    for ac_exec_ext in '' $ac_executable_extensions; do
46435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46436    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46438    break 2
46439  fi
46440done
46441  done
46442IFS=$as_save_IFS
46443
46444  ;;
46445esac
46446fi
46447BUILD_AR=$ac_cv_path_BUILD_AR
46448if test -n "$BUILD_AR"; then
46449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46450$as_echo "$BUILD_AR" >&6; }
46451else
46452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46453$as_echo "no" >&6; }
46454fi
46455
46456
46457          if test "x$BUILD_AR" = x; then
46458            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46459          fi
46460        else
46461          # Otherwise we believe it is a complete path. Use it as it is.
46462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46463$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46464          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46465$as_echo_n "checking for BUILD_AR... " >&6; }
46466          if test ! -x "$tool_specified"; then
46467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46468$as_echo "not found" >&6; }
46469            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46470          fi
46471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46472$as_echo "$tool_specified" >&6; }
46473        fi
46474      fi
46475    fi
46476
46477  fi
46478
46479
46480
46481  # Only process if variable expands to non-empty
46482
46483  if test "x$BUILD_AR" != x; then
46484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46485
46486  # First separate the path from the arguments. This will split at the first
46487  # space.
46488  complete="$BUILD_AR"
46489  path="${complete%% *}"
46490  tmp="$complete EOL"
46491  arguments="${tmp#* }"
46492
46493  # Input might be given as Windows format, start by converting to
46494  # unix format.
46495  new_path=`$CYGPATH -u "$path"`
46496
46497  # Now try to locate executable using which
46498  new_path=`$WHICH "$new_path" 2> /dev/null`
46499  # bat and cmd files are not always considered executable in cygwin causing which
46500  # to not find them
46501  if test "x$new_path" = x \
46502      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46503      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46504    new_path=`$CYGPATH -u "$path"`
46505  fi
46506  if test "x$new_path" = x; then
46507    # Oops. Which didn't find the executable.
46508    # The splitting of arguments from the executable at a space might have been incorrect,
46509    # since paths with space are more likely in Windows. Give it another try with the whole
46510    # argument.
46511    path="$complete"
46512    arguments="EOL"
46513    new_path=`$CYGPATH -u "$path"`
46514    new_path=`$WHICH "$new_path" 2> /dev/null`
46515    # bat and cmd files are not always considered executable in cygwin causing which
46516    # to not find them
46517    if test "x$new_path" = x \
46518        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46519        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46520      new_path=`$CYGPATH -u "$path"`
46521    fi
46522    if test "x$new_path" = x; then
46523      # It's still not found. Now this is an unrecoverable error.
46524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46525$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46526      has_space=`$ECHO "$complete" | $GREP " "`
46527      if test "x$has_space" != x; then
46528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46530      fi
46531      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46532    fi
46533  fi
46534
46535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46538  # "foo.exe" is OK but "foo" is an error.
46539  #
46540  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46541  # It is also a way to make sure we got the proper file name for the real test later on.
46542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46543  if test "x$test_shortpath" = x; then
46544    # Short path failed, file does not exist as specified.
46545    # Try adding .exe or .cmd
46546    if test -f "${new_path}.exe"; then
46547      input_to_shortpath="${new_path}.exe"
46548    elif test -f "${new_path}.cmd"; then
46549      input_to_shortpath="${new_path}.cmd"
46550    else
46551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46552$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46553      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46554$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46555      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46556    fi
46557  else
46558    input_to_shortpath="$new_path"
46559  fi
46560
46561  # Call helper function which possibly converts this using DOS-style short mode.
46562  # If so, the updated path is stored in $new_path.
46563  new_path="$input_to_shortpath"
46564
46565  input_path="$input_to_shortpath"
46566  # Check if we need to convert this using DOS-style short mode. If the path
46567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46568  # take no chances and rewrite it.
46569  # Note: m4 eats our [], so we need to use [ and ] instead.
46570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46571  if test "x$has_forbidden_chars" != x; then
46572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46576      # Going to short mode and back again did indeed matter. Since short mode is
46577      # case insensitive, let's make it lowercase to improve readability.
46578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46579      # Now convert it back to Unix-style (cygpath)
46580      input_path=`$CYGPATH -u "$shortmode_path"`
46581      new_path="$input_path"
46582    fi
46583  fi
46584
46585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46586  if test "x$test_cygdrive_prefix" = x; then
46587    # As a simple fix, exclude /usr/bin since it's not a real path.
46588    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46590      # a path prefixed by /cygdrive for fixpath to work.
46591      new_path="$CYGWIN_ROOT_PATH$input_path"
46592    fi
46593  fi
46594
46595  # remove trailing .exe if any
46596  new_path="${new_path/%.exe/}"
46597
46598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46599
46600  # First separate the path from the arguments. This will split at the first
46601  # space.
46602  complete="$BUILD_AR"
46603  path="${complete%% *}"
46604  tmp="$complete EOL"
46605  arguments="${tmp#* }"
46606
46607  # Input might be given as Windows format, start by converting to
46608  # unix format.
46609  new_path="$path"
46610
46611  windows_path="$new_path"
46612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46613    unix_path=`$CYGPATH -u "$windows_path"`
46614    new_path="$unix_path"
46615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46617    new_path="$unix_path"
46618  fi
46619
46620
46621  # Now try to locate executable using which
46622  new_path=`$WHICH "$new_path" 2> /dev/null`
46623
46624  if test "x$new_path" = x; then
46625    # Oops. Which didn't find the executable.
46626    # The splitting of arguments from the executable at a space might have been incorrect,
46627    # since paths with space are more likely in Windows. Give it another try with the whole
46628    # argument.
46629    path="$complete"
46630    arguments="EOL"
46631    new_path="$path"
46632
46633  windows_path="$new_path"
46634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46635    unix_path=`$CYGPATH -u "$windows_path"`
46636    new_path="$unix_path"
46637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46639    new_path="$unix_path"
46640  fi
46641
46642
46643    new_path=`$WHICH "$new_path" 2> /dev/null`
46644    # bat and cmd files are not always considered executable in MSYS causing which
46645    # to not find them
46646    if test "x$new_path" = x \
46647        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46648        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46649      new_path="$path"
46650
46651  windows_path="$new_path"
46652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46653    unix_path=`$CYGPATH -u "$windows_path"`
46654    new_path="$unix_path"
46655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46657    new_path="$unix_path"
46658  fi
46659
46660    fi
46661
46662    if test "x$new_path" = x; then
46663      # It's still not found. Now this is an unrecoverable error.
46664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46665$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46666      has_space=`$ECHO "$complete" | $GREP " "`
46667      if test "x$has_space" != x; then
46668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46670      fi
46671      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46672    fi
46673  fi
46674
46675  # Now new_path has a complete unix path to the binary
46676  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46677    # Keep paths in /bin as-is, but remove trailing .exe if any
46678    new_path="${new_path/%.exe/}"
46679    # Do not save /bin paths to all_fixpath_prefixes!
46680  else
46681    # Not in mixed or Windows style, start by that.
46682    new_path=`cmd //c echo $new_path`
46683
46684  input_path="$new_path"
46685  # Check if we need to convert this using DOS-style short mode. If the path
46686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46687  # take no chances and rewrite it.
46688  # Note: m4 eats our [], so we need to use [ and ] instead.
46689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46690  if test "x$has_forbidden_chars" != x; then
46691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46693  fi
46694
46695    # Output is in $new_path
46696
46697  windows_path="$new_path"
46698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46699    unix_path=`$CYGPATH -u "$windows_path"`
46700    new_path="$unix_path"
46701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46703    new_path="$unix_path"
46704  fi
46705
46706    # remove trailing .exe if any
46707    new_path="${new_path/%.exe/}"
46708
46709    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46710    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46711  fi
46712
46713    else
46714      # We're on a unix platform. Hooray! :)
46715      # First separate the path from the arguments. This will split at the first
46716      # space.
46717      complete="$BUILD_AR"
46718      path="${complete%% *}"
46719      tmp="$complete EOL"
46720      arguments="${tmp#* }"
46721
46722      # Cannot rely on the command "which" here since it doesn't always work.
46723      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46724      if test -z "$is_absolute_path"; then
46725        # Path to executable is not absolute. Find it.
46726        IFS_save="$IFS"
46727        IFS=:
46728        for p in $PATH; do
46729          if test -f "$p/$path" && test -x "$p/$path"; then
46730            new_path="$p/$path"
46731            break
46732          fi
46733        done
46734        IFS="$IFS_save"
46735      else
46736        # This is an absolute path, we can use it without further modifications.
46737        new_path="$path"
46738      fi
46739
46740      if test "x$new_path" = x; then
46741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46742$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46743        has_space=`$ECHO "$complete" | $GREP " "`
46744        if test "x$has_space" != x; then
46745          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46746$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46747        fi
46748        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46749      fi
46750    fi
46751
46752    # Now join together the path and the arguments once again
46753    if test "x$arguments" != xEOL; then
46754      new_complete="$new_path ${arguments% *}"
46755    else
46756      new_complete="$new_path"
46757    fi
46758
46759    if test "x$complete" != "x$new_complete"; then
46760      BUILD_AR="$new_complete"
46761      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46762$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46763    fi
46764  fi
46765
46766
46767
46768  # Publish this variable in the help.
46769
46770
46771  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46772    # The variable is not set by user, try to locate tool using the code snippet
46773    for ac_prog in objcopy
46774do
46775  # Extract the first word of "$ac_prog", so it can be a program name with args.
46776set dummy $ac_prog; ac_word=$2
46777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46778$as_echo_n "checking for $ac_word... " >&6; }
46779if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46780  $as_echo_n "(cached) " >&6
46781else
46782  case $BUILD_OBJCOPY in
46783  [\\/]* | ?:[\\/]*)
46784  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46785  ;;
46786  *)
46787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46788for as_dir in $PATH
46789do
46790  IFS=$as_save_IFS
46791  test -z "$as_dir" && as_dir=.
46792    for ac_exec_ext in '' $ac_executable_extensions; do
46793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46794    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46796    break 2
46797  fi
46798done
46799  done
46800IFS=$as_save_IFS
46801
46802  ;;
46803esac
46804fi
46805BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46806if test -n "$BUILD_OBJCOPY"; then
46807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46808$as_echo "$BUILD_OBJCOPY" >&6; }
46809else
46810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46811$as_echo "no" >&6; }
46812fi
46813
46814
46815  test -n "$BUILD_OBJCOPY" && break
46816done
46817
46818  else
46819    # The variable is set, but is it from the command line or the environment?
46820
46821    # Try to remove the string !BUILD_OBJCOPY! from our list.
46822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46824      # If it failed, the variable was not from the command line. Ignore it,
46825      # but warn the user (except for BASH, which is always set by the calling BASH).
46826      if test "xBUILD_OBJCOPY" != xBASH; then
46827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46828$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46829      fi
46830      # Try to locate tool using the code snippet
46831      for ac_prog in objcopy
46832do
46833  # Extract the first word of "$ac_prog", so it can be a program name with args.
46834set dummy $ac_prog; ac_word=$2
46835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46836$as_echo_n "checking for $ac_word... " >&6; }
46837if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46838  $as_echo_n "(cached) " >&6
46839else
46840  case $BUILD_OBJCOPY in
46841  [\\/]* | ?:[\\/]*)
46842  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46843  ;;
46844  *)
46845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46846for as_dir in $PATH
46847do
46848  IFS=$as_save_IFS
46849  test -z "$as_dir" && as_dir=.
46850    for ac_exec_ext in '' $ac_executable_extensions; do
46851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46852    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46854    break 2
46855  fi
46856done
46857  done
46858IFS=$as_save_IFS
46859
46860  ;;
46861esac
46862fi
46863BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46864if test -n "$BUILD_OBJCOPY"; then
46865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46866$as_echo "$BUILD_OBJCOPY" >&6; }
46867else
46868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46869$as_echo "no" >&6; }
46870fi
46871
46872
46873  test -n "$BUILD_OBJCOPY" && break
46874done
46875
46876    else
46877      # If it succeeded, then it was overridden by the user. We will use it
46878      # for the tool.
46879
46880      # First remove it from the list of overridden variables, so we can test
46881      # for unknown variables in the end.
46882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46883
46884      # Check if we try to supply an empty value
46885      if test "x$BUILD_OBJCOPY" = x; then
46886        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46887$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46889$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46891$as_echo "disabled" >&6; }
46892      else
46893        # Check if the provided tool contains a complete path.
46894        tool_specified="$BUILD_OBJCOPY"
46895        tool_basename="${tool_specified##*/}"
46896        if test "x$tool_basename" = "x$tool_specified"; then
46897          # A command without a complete path is provided, search $PATH.
46898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46899$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46900          # Extract the first word of "$tool_basename", so it can be a program name with args.
46901set dummy $tool_basename; ac_word=$2
46902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46903$as_echo_n "checking for $ac_word... " >&6; }
46904if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46905  $as_echo_n "(cached) " >&6
46906else
46907  case $BUILD_OBJCOPY in
46908  [\\/]* | ?:[\\/]*)
46909  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46910  ;;
46911  *)
46912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46913for as_dir in $PATH
46914do
46915  IFS=$as_save_IFS
46916  test -z "$as_dir" && as_dir=.
46917    for ac_exec_ext in '' $ac_executable_extensions; do
46918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46919    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46921    break 2
46922  fi
46923done
46924  done
46925IFS=$as_save_IFS
46926
46927  ;;
46928esac
46929fi
46930BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46931if test -n "$BUILD_OBJCOPY"; then
46932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46933$as_echo "$BUILD_OBJCOPY" >&6; }
46934else
46935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46936$as_echo "no" >&6; }
46937fi
46938
46939
46940          if test "x$BUILD_OBJCOPY" = x; then
46941            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46942          fi
46943        else
46944          # Otherwise we believe it is a complete path. Use it as it is.
46945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46946$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46947          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46948$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46949          if test ! -x "$tool_specified"; then
46950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46951$as_echo "not found" >&6; }
46952            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46953          fi
46954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46955$as_echo "$tool_specified" >&6; }
46956        fi
46957      fi
46958    fi
46959
46960  fi
46961
46962
46963
46964  # Only process if variable expands to non-empty
46965
46966  if test "x$BUILD_OBJCOPY" != x; then
46967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46968
46969  # First separate the path from the arguments. This will split at the first
46970  # space.
46971  complete="$BUILD_OBJCOPY"
46972  path="${complete%% *}"
46973  tmp="$complete EOL"
46974  arguments="${tmp#* }"
46975
46976  # Input might be given as Windows format, start by converting to
46977  # unix format.
46978  new_path=`$CYGPATH -u "$path"`
46979
46980  # Now try to locate executable using which
46981  new_path=`$WHICH "$new_path" 2> /dev/null`
46982  # bat and cmd files are not always considered executable in cygwin causing which
46983  # to not find them
46984  if test "x$new_path" = x \
46985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46987    new_path=`$CYGPATH -u "$path"`
46988  fi
46989  if test "x$new_path" = x; then
46990    # Oops. Which didn't find the executable.
46991    # The splitting of arguments from the executable at a space might have been incorrect,
46992    # since paths with space are more likely in Windows. Give it another try with the whole
46993    # argument.
46994    path="$complete"
46995    arguments="EOL"
46996    new_path=`$CYGPATH -u "$path"`
46997    new_path=`$WHICH "$new_path" 2> /dev/null`
46998    # bat and cmd files are not always considered executable in cygwin causing which
46999    # to not find them
47000    if test "x$new_path" = x \
47001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47003      new_path=`$CYGPATH -u "$path"`
47004    fi
47005    if test "x$new_path" = x; then
47006      # It's still not found. Now this is an unrecoverable error.
47007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47008$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47009      has_space=`$ECHO "$complete" | $GREP " "`
47010      if test "x$has_space" != x; then
47011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47013      fi
47014      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47015    fi
47016  fi
47017
47018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47021  # "foo.exe" is OK but "foo" is an error.
47022  #
47023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47024  # It is also a way to make sure we got the proper file name for the real test later on.
47025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47026  if test "x$test_shortpath" = x; then
47027    # Short path failed, file does not exist as specified.
47028    # Try adding .exe or .cmd
47029    if test -f "${new_path}.exe"; then
47030      input_to_shortpath="${new_path}.exe"
47031    elif test -f "${new_path}.cmd"; then
47032      input_to_shortpath="${new_path}.cmd"
47033    else
47034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47035$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47038      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47039    fi
47040  else
47041    input_to_shortpath="$new_path"
47042  fi
47043
47044  # Call helper function which possibly converts this using DOS-style short mode.
47045  # If so, the updated path is stored in $new_path.
47046  new_path="$input_to_shortpath"
47047
47048  input_path="$input_to_shortpath"
47049  # Check if we need to convert this using DOS-style short mode. If the path
47050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47051  # take no chances and rewrite it.
47052  # Note: m4 eats our [], so we need to use [ and ] instead.
47053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47054  if test "x$has_forbidden_chars" != x; then
47055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47059      # Going to short mode and back again did indeed matter. Since short mode is
47060      # case insensitive, let's make it lowercase to improve readability.
47061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47062      # Now convert it back to Unix-style (cygpath)
47063      input_path=`$CYGPATH -u "$shortmode_path"`
47064      new_path="$input_path"
47065    fi
47066  fi
47067
47068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47069  if test "x$test_cygdrive_prefix" = x; then
47070    # As a simple fix, exclude /usr/bin since it's not a real path.
47071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47073      # a path prefixed by /cygdrive for fixpath to work.
47074      new_path="$CYGWIN_ROOT_PATH$input_path"
47075    fi
47076  fi
47077
47078  # remove trailing .exe if any
47079  new_path="${new_path/%.exe/}"
47080
47081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47082
47083  # First separate the path from the arguments. This will split at the first
47084  # space.
47085  complete="$BUILD_OBJCOPY"
47086  path="${complete%% *}"
47087  tmp="$complete EOL"
47088  arguments="${tmp#* }"
47089
47090  # Input might be given as Windows format, start by converting to
47091  # unix format.
47092  new_path="$path"
47093
47094  windows_path="$new_path"
47095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47096    unix_path=`$CYGPATH -u "$windows_path"`
47097    new_path="$unix_path"
47098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47100    new_path="$unix_path"
47101  fi
47102
47103
47104  # Now try to locate executable using which
47105  new_path=`$WHICH "$new_path" 2> /dev/null`
47106
47107  if test "x$new_path" = x; then
47108    # Oops. Which didn't find the executable.
47109    # The splitting of arguments from the executable at a space might have been incorrect,
47110    # since paths with space are more likely in Windows. Give it another try with the whole
47111    # argument.
47112    path="$complete"
47113    arguments="EOL"
47114    new_path="$path"
47115
47116  windows_path="$new_path"
47117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47118    unix_path=`$CYGPATH -u "$windows_path"`
47119    new_path="$unix_path"
47120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47122    new_path="$unix_path"
47123  fi
47124
47125
47126    new_path=`$WHICH "$new_path" 2> /dev/null`
47127    # bat and cmd files are not always considered executable in MSYS causing which
47128    # to not find them
47129    if test "x$new_path" = x \
47130        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47131        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47132      new_path="$path"
47133
47134  windows_path="$new_path"
47135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47136    unix_path=`$CYGPATH -u "$windows_path"`
47137    new_path="$unix_path"
47138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47140    new_path="$unix_path"
47141  fi
47142
47143    fi
47144
47145    if test "x$new_path" = x; then
47146      # It's still not found. Now this is an unrecoverable error.
47147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47148$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47149      has_space=`$ECHO "$complete" | $GREP " "`
47150      if test "x$has_space" != x; then
47151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47153      fi
47154      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47155    fi
47156  fi
47157
47158  # Now new_path has a complete unix path to the binary
47159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47160    # Keep paths in /bin as-is, but remove trailing .exe if any
47161    new_path="${new_path/%.exe/}"
47162    # Do not save /bin paths to all_fixpath_prefixes!
47163  else
47164    # Not in mixed or Windows style, start by that.
47165    new_path=`cmd //c echo $new_path`
47166
47167  input_path="$new_path"
47168  # Check if we need to convert this using DOS-style short mode. If the path
47169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47170  # take no chances and rewrite it.
47171  # Note: m4 eats our [], so we need to use [ and ] instead.
47172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47173  if test "x$has_forbidden_chars" != x; then
47174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47176  fi
47177
47178    # Output is in $new_path
47179
47180  windows_path="$new_path"
47181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47182    unix_path=`$CYGPATH -u "$windows_path"`
47183    new_path="$unix_path"
47184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47186    new_path="$unix_path"
47187  fi
47188
47189    # remove trailing .exe if any
47190    new_path="${new_path/%.exe/}"
47191
47192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47194  fi
47195
47196    else
47197      # We're on a unix platform. Hooray! :)
47198      # First separate the path from the arguments. This will split at the first
47199      # space.
47200      complete="$BUILD_OBJCOPY"
47201      path="${complete%% *}"
47202      tmp="$complete EOL"
47203      arguments="${tmp#* }"
47204
47205      # Cannot rely on the command "which" here since it doesn't always work.
47206      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47207      if test -z "$is_absolute_path"; then
47208        # Path to executable is not absolute. Find it.
47209        IFS_save="$IFS"
47210        IFS=:
47211        for p in $PATH; do
47212          if test -f "$p/$path" && test -x "$p/$path"; then
47213            new_path="$p/$path"
47214            break
47215          fi
47216        done
47217        IFS="$IFS_save"
47218      else
47219        # This is an absolute path, we can use it without further modifications.
47220        new_path="$path"
47221      fi
47222
47223      if test "x$new_path" = x; then
47224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47225$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47226        has_space=`$ECHO "$complete" | $GREP " "`
47227        if test "x$has_space" != x; then
47228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47230        fi
47231        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47232      fi
47233    fi
47234
47235    # Now join together the path and the arguments once again
47236    if test "x$arguments" != xEOL; then
47237      new_complete="$new_path ${arguments% *}"
47238    else
47239      new_complete="$new_path"
47240    fi
47241
47242    if test "x$complete" != "x$new_complete"; then
47243      BUILD_OBJCOPY="$new_complete"
47244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47245$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47246    fi
47247  fi
47248
47249
47250
47251  # Publish this variable in the help.
47252
47253
47254  if [ -z "${BUILD_STRIP+x}" ]; then
47255    # The variable is not set by user, try to locate tool using the code snippet
47256    for ac_prog in strip
47257do
47258  # Extract the first word of "$ac_prog", so it can be a program name with args.
47259set dummy $ac_prog; ac_word=$2
47260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47261$as_echo_n "checking for $ac_word... " >&6; }
47262if ${ac_cv_path_BUILD_STRIP+:} false; then :
47263  $as_echo_n "(cached) " >&6
47264else
47265  case $BUILD_STRIP in
47266  [\\/]* | ?:[\\/]*)
47267  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47268  ;;
47269  *)
47270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47271for as_dir in $PATH
47272do
47273  IFS=$as_save_IFS
47274  test -z "$as_dir" && as_dir=.
47275    for ac_exec_ext in '' $ac_executable_extensions; do
47276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47277    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47279    break 2
47280  fi
47281done
47282  done
47283IFS=$as_save_IFS
47284
47285  ;;
47286esac
47287fi
47288BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47289if test -n "$BUILD_STRIP"; then
47290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47291$as_echo "$BUILD_STRIP" >&6; }
47292else
47293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47294$as_echo "no" >&6; }
47295fi
47296
47297
47298  test -n "$BUILD_STRIP" && break
47299done
47300
47301  else
47302    # The variable is set, but is it from the command line or the environment?
47303
47304    # Try to remove the string !BUILD_STRIP! from our list.
47305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47307      # If it failed, the variable was not from the command line. Ignore it,
47308      # but warn the user (except for BASH, which is always set by the calling BASH).
47309      if test "xBUILD_STRIP" != xBASH; then
47310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47311$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47312      fi
47313      # Try to locate tool using the code snippet
47314      for ac_prog in strip
47315do
47316  # Extract the first word of "$ac_prog", so it can be a program name with args.
47317set dummy $ac_prog; ac_word=$2
47318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47319$as_echo_n "checking for $ac_word... " >&6; }
47320if ${ac_cv_path_BUILD_STRIP+:} false; then :
47321  $as_echo_n "(cached) " >&6
47322else
47323  case $BUILD_STRIP in
47324  [\\/]* | ?:[\\/]*)
47325  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47326  ;;
47327  *)
47328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47329for as_dir in $PATH
47330do
47331  IFS=$as_save_IFS
47332  test -z "$as_dir" && as_dir=.
47333    for ac_exec_ext in '' $ac_executable_extensions; do
47334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47335    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47337    break 2
47338  fi
47339done
47340  done
47341IFS=$as_save_IFS
47342
47343  ;;
47344esac
47345fi
47346BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47347if test -n "$BUILD_STRIP"; then
47348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47349$as_echo "$BUILD_STRIP" >&6; }
47350else
47351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47352$as_echo "no" >&6; }
47353fi
47354
47355
47356  test -n "$BUILD_STRIP" && break
47357done
47358
47359    else
47360      # If it succeeded, then it was overridden by the user. We will use it
47361      # for the tool.
47362
47363      # First remove it from the list of overridden variables, so we can test
47364      # for unknown variables in the end.
47365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47366
47367      # Check if we try to supply an empty value
47368      if test "x$BUILD_STRIP" = x; then
47369        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47370$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47372$as_echo_n "checking for BUILD_STRIP... " >&6; }
47373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47374$as_echo "disabled" >&6; }
47375      else
47376        # Check if the provided tool contains a complete path.
47377        tool_specified="$BUILD_STRIP"
47378        tool_basename="${tool_specified##*/}"
47379        if test "x$tool_basename" = "x$tool_specified"; then
47380          # A command without a complete path is provided, search $PATH.
47381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47382$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47383          # Extract the first word of "$tool_basename", so it can be a program name with args.
47384set dummy $tool_basename; ac_word=$2
47385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47386$as_echo_n "checking for $ac_word... " >&6; }
47387if ${ac_cv_path_BUILD_STRIP+:} false; then :
47388  $as_echo_n "(cached) " >&6
47389else
47390  case $BUILD_STRIP in
47391  [\\/]* | ?:[\\/]*)
47392  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47393  ;;
47394  *)
47395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47396for as_dir in $PATH
47397do
47398  IFS=$as_save_IFS
47399  test -z "$as_dir" && as_dir=.
47400    for ac_exec_ext in '' $ac_executable_extensions; do
47401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47402    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47404    break 2
47405  fi
47406done
47407  done
47408IFS=$as_save_IFS
47409
47410  ;;
47411esac
47412fi
47413BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47414if test -n "$BUILD_STRIP"; then
47415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47416$as_echo "$BUILD_STRIP" >&6; }
47417else
47418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47419$as_echo "no" >&6; }
47420fi
47421
47422
47423          if test "x$BUILD_STRIP" = x; then
47424            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47425          fi
47426        else
47427          # Otherwise we believe it is a complete path. Use it as it is.
47428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47429$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47430          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47431$as_echo_n "checking for BUILD_STRIP... " >&6; }
47432          if test ! -x "$tool_specified"; then
47433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47434$as_echo "not found" >&6; }
47435            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47436          fi
47437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47438$as_echo "$tool_specified" >&6; }
47439        fi
47440      fi
47441    fi
47442
47443  fi
47444
47445
47446
47447  # Only process if variable expands to non-empty
47448
47449  if test "x$BUILD_STRIP" != x; then
47450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47451
47452  # First separate the path from the arguments. This will split at the first
47453  # space.
47454  complete="$BUILD_STRIP"
47455  path="${complete%% *}"
47456  tmp="$complete EOL"
47457  arguments="${tmp#* }"
47458
47459  # Input might be given as Windows format, start by converting to
47460  # unix format.
47461  new_path=`$CYGPATH -u "$path"`
47462
47463  # Now try to locate executable using which
47464  new_path=`$WHICH "$new_path" 2> /dev/null`
47465  # bat and cmd files are not always considered executable in cygwin causing which
47466  # to not find them
47467  if test "x$new_path" = x \
47468      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47469      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47470    new_path=`$CYGPATH -u "$path"`
47471  fi
47472  if test "x$new_path" = x; then
47473    # Oops. Which didn't find the executable.
47474    # The splitting of arguments from the executable at a space might have been incorrect,
47475    # since paths with space are more likely in Windows. Give it another try with the whole
47476    # argument.
47477    path="$complete"
47478    arguments="EOL"
47479    new_path=`$CYGPATH -u "$path"`
47480    new_path=`$WHICH "$new_path" 2> /dev/null`
47481    # bat and cmd files are not always considered executable in cygwin causing which
47482    # to not find them
47483    if test "x$new_path" = x \
47484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47486      new_path=`$CYGPATH -u "$path"`
47487    fi
47488    if test "x$new_path" = x; then
47489      # It's still not found. Now this is an unrecoverable error.
47490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47491$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47492      has_space=`$ECHO "$complete" | $GREP " "`
47493      if test "x$has_space" != x; then
47494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47496      fi
47497      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47498    fi
47499  fi
47500
47501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47504  # "foo.exe" is OK but "foo" is an error.
47505  #
47506  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47507  # It is also a way to make sure we got the proper file name for the real test later on.
47508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47509  if test "x$test_shortpath" = x; then
47510    # Short path failed, file does not exist as specified.
47511    # Try adding .exe or .cmd
47512    if test -f "${new_path}.exe"; then
47513      input_to_shortpath="${new_path}.exe"
47514    elif test -f "${new_path}.cmd"; then
47515      input_to_shortpath="${new_path}.cmd"
47516    else
47517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47518$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47519      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47520$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47521      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47522    fi
47523  else
47524    input_to_shortpath="$new_path"
47525  fi
47526
47527  # Call helper function which possibly converts this using DOS-style short mode.
47528  # If so, the updated path is stored in $new_path.
47529  new_path="$input_to_shortpath"
47530
47531  input_path="$input_to_shortpath"
47532  # Check if we need to convert this using DOS-style short mode. If the path
47533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47534  # take no chances and rewrite it.
47535  # Note: m4 eats our [], so we need to use [ and ] instead.
47536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47537  if test "x$has_forbidden_chars" != x; then
47538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47542      # Going to short mode and back again did indeed matter. Since short mode is
47543      # case insensitive, let's make it lowercase to improve readability.
47544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47545      # Now convert it back to Unix-style (cygpath)
47546      input_path=`$CYGPATH -u "$shortmode_path"`
47547      new_path="$input_path"
47548    fi
47549  fi
47550
47551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47552  if test "x$test_cygdrive_prefix" = x; then
47553    # As a simple fix, exclude /usr/bin since it's not a real path.
47554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47556      # a path prefixed by /cygdrive for fixpath to work.
47557      new_path="$CYGWIN_ROOT_PATH$input_path"
47558    fi
47559  fi
47560
47561  # remove trailing .exe if any
47562  new_path="${new_path/%.exe/}"
47563
47564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47565
47566  # First separate the path from the arguments. This will split at the first
47567  # space.
47568  complete="$BUILD_STRIP"
47569  path="${complete%% *}"
47570  tmp="$complete EOL"
47571  arguments="${tmp#* }"
47572
47573  # Input might be given as Windows format, start by converting to
47574  # unix format.
47575  new_path="$path"
47576
47577  windows_path="$new_path"
47578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47579    unix_path=`$CYGPATH -u "$windows_path"`
47580    new_path="$unix_path"
47581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47583    new_path="$unix_path"
47584  fi
47585
47586
47587  # Now try to locate executable using which
47588  new_path=`$WHICH "$new_path" 2> /dev/null`
47589
47590  if test "x$new_path" = x; then
47591    # Oops. Which didn't find the executable.
47592    # The splitting of arguments from the executable at a space might have been incorrect,
47593    # since paths with space are more likely in Windows. Give it another try with the whole
47594    # argument.
47595    path="$complete"
47596    arguments="EOL"
47597    new_path="$path"
47598
47599  windows_path="$new_path"
47600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47601    unix_path=`$CYGPATH -u "$windows_path"`
47602    new_path="$unix_path"
47603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47605    new_path="$unix_path"
47606  fi
47607
47608
47609    new_path=`$WHICH "$new_path" 2> /dev/null`
47610    # bat and cmd files are not always considered executable in MSYS causing which
47611    # to not find them
47612    if test "x$new_path" = x \
47613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47615      new_path="$path"
47616
47617  windows_path="$new_path"
47618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47619    unix_path=`$CYGPATH -u "$windows_path"`
47620    new_path="$unix_path"
47621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47623    new_path="$unix_path"
47624  fi
47625
47626    fi
47627
47628    if test "x$new_path" = x; then
47629      # It's still not found. Now this is an unrecoverable error.
47630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47631$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47632      has_space=`$ECHO "$complete" | $GREP " "`
47633      if test "x$has_space" != x; then
47634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47636      fi
47637      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47638    fi
47639  fi
47640
47641  # Now new_path has a complete unix path to the binary
47642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47643    # Keep paths in /bin as-is, but remove trailing .exe if any
47644    new_path="${new_path/%.exe/}"
47645    # Do not save /bin paths to all_fixpath_prefixes!
47646  else
47647    # Not in mixed or Windows style, start by that.
47648    new_path=`cmd //c echo $new_path`
47649
47650  input_path="$new_path"
47651  # Check if we need to convert this using DOS-style short mode. If the path
47652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47653  # take no chances and rewrite it.
47654  # Note: m4 eats our [], so we need to use [ and ] instead.
47655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47656  if test "x$has_forbidden_chars" != x; then
47657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47659  fi
47660
47661    # Output is in $new_path
47662
47663  windows_path="$new_path"
47664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47665    unix_path=`$CYGPATH -u "$windows_path"`
47666    new_path="$unix_path"
47667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47669    new_path="$unix_path"
47670  fi
47671
47672    # remove trailing .exe if any
47673    new_path="${new_path/%.exe/}"
47674
47675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47677  fi
47678
47679    else
47680      # We're on a unix platform. Hooray! :)
47681      # First separate the path from the arguments. This will split at the first
47682      # space.
47683      complete="$BUILD_STRIP"
47684      path="${complete%% *}"
47685      tmp="$complete EOL"
47686      arguments="${tmp#* }"
47687
47688      # Cannot rely on the command "which" here since it doesn't always work.
47689      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47690      if test -z "$is_absolute_path"; then
47691        # Path to executable is not absolute. Find it.
47692        IFS_save="$IFS"
47693        IFS=:
47694        for p in $PATH; do
47695          if test -f "$p/$path" && test -x "$p/$path"; then
47696            new_path="$p/$path"
47697            break
47698          fi
47699        done
47700        IFS="$IFS_save"
47701      else
47702        # This is an absolute path, we can use it without further modifications.
47703        new_path="$path"
47704      fi
47705
47706      if test "x$new_path" = x; then
47707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47708$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47709        has_space=`$ECHO "$complete" | $GREP " "`
47710        if test "x$has_space" != x; then
47711          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47712$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47713        fi
47714        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47715      fi
47716    fi
47717
47718    # Now join together the path and the arguments once again
47719    if test "x$arguments" != xEOL; then
47720      new_complete="$new_path ${arguments% *}"
47721    else
47722      new_complete="$new_path"
47723    fi
47724
47725    if test "x$complete" != "x$new_complete"; then
47726      BUILD_STRIP="$new_complete"
47727      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47728$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47729    fi
47730  fi
47731
47732    # Assume the C compiler is the assembler
47733    BUILD_AS="$BUILD_CC -c"
47734    # Just like for the target compiler, use the compiler as linker
47735    BUILD_LD="$BUILD_CC"
47736    BUILD_LDCXX="$BUILD_CXX"
47737
47738    PATH="$OLDPATH"
47739
47740
47741  COMPILER=$BUILD_CC
47742  COMPILER_NAME=BuildC
47743
47744  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47745    # cc -V output typically looks like
47746    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47747    # or
47748    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47749    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47750    # Check that this is likely to be the Solaris Studio cc.
47751    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47752    if test $? -ne 0; then
47753      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47754      { $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
47755$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47756      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47757$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47758      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47759$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47760      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47761    fi
47762    # Remove usage instructions (if present), and
47763    # collapse compiler output into a single line
47764    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47765        $SED -e 's/ *[Uu]sage:.*//'`
47766    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47767        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47768  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47769    # xlc -qversion output typically looks like
47770    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47771    #     Version: 11.01.0000.0015
47772    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47773    # Check that this is likely to be the IBM XL C compiler.
47774    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47775    if test $? -ne 0; then
47776      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47777      { $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
47778$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47779      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47780$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47781      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47782$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47783      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47784    fi
47785    # Collapse compiler output into a single line
47786    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47787    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47788        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47789  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47790    # There is no specific version flag, but all output starts with a version string.
47791    # First line typically looks something like:
47792    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47793    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47794    # Check that this is likely to be Microsoft CL.EXE.
47795    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47796    if test $? -ne 0; then
47797      { $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
47798$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47799      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47800$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47801      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47802    fi
47803    # Collapse compiler output into a single line
47804    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47805    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47806        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47807  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47808    # gcc --version output typically looks like
47809    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47810    #     Copyright (C) 2013 Free Software Foundation, Inc.
47811    #     This is free software; see the source for copying conditions.  There is NO
47812    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47813    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47814    # Check that this is likely to be GCC.
47815    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47816    if test $? -ne 0; then
47817      { $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
47818$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47819      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47820$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47821      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47822    fi
47823    # Remove Copyright and legalese from version string, and
47824    # collapse into a single line
47825    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47826        $SED -e 's/ *Copyright .*//'`
47827    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47828        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47829  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47830    # clang --version output typically looks like
47831    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47832    #    clang version 3.3 (tags/RELEASE_33/final)
47833    # or
47834    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47835    #    Target: x86_64-pc-linux-gnu
47836    #    Thread model: posix
47837    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47838    # Check that this is likely to be clang
47839    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47840    if test $? -ne 0; then
47841      { $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
47842$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47843      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47844$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47845      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47846    fi
47847    # Collapse compiler output into a single line
47848    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47849    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47850        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47851  else
47852      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47853  fi
47854  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47855  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47856  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47857  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47858
47859  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47860$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47861
47862
47863  COMPILER=$BUILD_CXX
47864  COMPILER_NAME=BuildC++
47865
47866  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47867    # cc -V output typically looks like
47868    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47869    # or
47870    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47871    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47872    # Check that this is likely to be the Solaris Studio cc.
47873    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47874    if test $? -ne 0; then
47875      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47876      { $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
47877$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47878      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47879$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47880      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47881$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47882      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47883    fi
47884    # Remove usage instructions (if present), and
47885    # collapse compiler output into a single line
47886    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47887        $SED -e 's/ *[Uu]sage:.*//'`
47888    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47889        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47890  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47891    # xlc -qversion output typically looks like
47892    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47893    #     Version: 11.01.0000.0015
47894    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47895    # Check that this is likely to be the IBM XL C compiler.
47896    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47897    if test $? -ne 0; then
47898      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47899      { $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
47900$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47901      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47902$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47903      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47904$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47905      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47906    fi
47907    # Collapse compiler output into a single line
47908    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47909    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47910        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47911  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47912    # There is no specific version flag, but all output starts with a version string.
47913    # First line typically looks something like:
47914    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47915    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47916    # Check that this is likely to be Microsoft CL.EXE.
47917    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47918    if test $? -ne 0; then
47919      { $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
47920$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47922$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47924    fi
47925    # Collapse compiler output into a single line
47926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47927    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47928        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47929  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47930    # gcc --version output typically looks like
47931    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47932    #     Copyright (C) 2013 Free Software Foundation, Inc.
47933    #     This is free software; see the source for copying conditions.  There is NO
47934    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47935    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47936    # Check that this is likely to be GCC.
47937    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47938    if test $? -ne 0; then
47939      { $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
47940$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47941      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47942$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47943      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47944    fi
47945    # Remove Copyright and legalese from version string, and
47946    # collapse into a single line
47947    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47948        $SED -e 's/ *Copyright .*//'`
47949    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47950        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47951  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47952    # clang --version output typically looks like
47953    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47954    #    clang version 3.3 (tags/RELEASE_33/final)
47955    # or
47956    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47957    #    Target: x86_64-pc-linux-gnu
47958    #    Thread model: posix
47959    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47960    # Check that this is likely to be clang
47961    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47962    if test $? -ne 0; then
47963      { $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
47964$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47965      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47966$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47967      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47968    fi
47969    # Collapse compiler output into a single line
47970    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47971    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47972        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47973  else
47974      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47975  fi
47976  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47977  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47978  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47979  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47980
47981  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47982$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47983
47984
47985  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47986    { $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
47987$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47988    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47989$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47990  fi
47991
47992  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47993  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47994    { $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
47995$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;}
47996  fi
47997
47998  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47999    { $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
48000$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48001  fi
48002
48003  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48004
48005  else
48006    # If we are not cross compiling, use the normal target compilers for
48007    # building the build platform executables.
48008    BUILD_CC="$CC"
48009    BUILD_CXX="$CXX"
48010    BUILD_LD="$LD"
48011    BUILD_LDCXX="$LDCXX"
48012    BUILD_NM="$NM"
48013    BUILD_AS="$AS"
48014    BUILD_OBJCOPY="$OBJCOPY"
48015    BUILD_STRIP="$STRIP"
48016    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48017    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48018    BUILD_AR="$AR"
48019
48020
48021  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48022    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48023$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48024    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48025$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48026  fi
48027
48028  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48029  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48030    { $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
48031$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;}
48032  fi
48033
48034  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48035    { $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
48036$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48037  fi
48038
48039  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48040
48041  fi
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053
48054
48055
48056  # The package path is used only on macosx?
48057  # FIXME: clean this up, and/or move it elsewhere.
48058  PACKAGE_PATH=/opt/local
48059
48060
48061  # Check for extra potential brokenness.
48062  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48063    # On Windows, double-check that we got the right compiler.
48064    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48065    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48066    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48067      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48068        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
48069      fi
48070    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48071      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48072        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48073      fi
48074    fi
48075  fi
48076
48077  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48078    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48079    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48080    # This is later checked when setting flags.
48081
48082    # "-Og" suppported for GCC 4.8 and later
48083    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
48129
48130
48131    # Execute function body
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
48178
48179
48180    # Execute function body
48181
48182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48183$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48184  supports=yes
48185
48186  saved_cflags="$CFLAGS"
48187  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48188  ac_ext=c
48189ac_cpp='$CPP $CPPFLAGS'
48190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48192ac_compiler_gnu=$ac_cv_c_compiler_gnu
48193
48194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48195/* end confdefs.h.  */
48196int i;
48197_ACEOF
48198if ac_fn_c_try_compile "$LINENO"; then :
48199
48200else
48201  supports=no
48202fi
48203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48204  ac_ext=cpp
48205ac_cpp='$CXXCPP $CPPFLAGS'
48206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48209
48210  CFLAGS="$saved_cflags"
48211
48212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48213$as_echo "$supports" >&6; }
48214  if test "x$supports" = "xyes" ; then
48215    :
48216    C_COMP_SUPPORTS="yes"
48217  else
48218    :
48219    C_COMP_SUPPORTS="no"
48220  fi
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
48278
48279
48280    # Execute function body
48281
48282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48283$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48284  supports=yes
48285
48286  saved_cxxflags="$CXXFLAGS"
48287  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48288  ac_ext=cpp
48289ac_cpp='$CXXCPP $CPPFLAGS'
48290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48293
48294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48295/* end confdefs.h.  */
48296int i;
48297_ACEOF
48298if ac_fn_cxx_try_compile "$LINENO"; then :
48299
48300else
48301  supports=no
48302fi
48303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48304  ac_ext=cpp
48305ac_cpp='$CXXCPP $CPPFLAGS'
48306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48309
48310  CXXFLAGS="$saved_cxxflags"
48311
48312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48313$as_echo "$supports" >&6; }
48314  if test "x$supports" = "xyes" ; then
48315    :
48316    CXX_COMP_SUPPORTS="yes"
48317  else
48318    :
48319    CXX_COMP_SUPPORTS="no"
48320  fi
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48335$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48336  supports=no
48337  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48338
48339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48340$as_echo "$supports" >&6; }
48341  if test "x$supports" = "xyes" ; then
48342    :
48343    HAS_CFLAG_OPTIMIZE_DEBUG=true
48344  else
48345    :
48346    HAS_CFLAG_OPTIMIZE_DEBUG=false
48347  fi
48348
48349
48350
48351
48352
48353
48354
48355    # "-z relro" supported in GNU binutils 2.17 and later
48356    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
48402
48403
48404    # Execute function body
48405
48406  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48407$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48408  supports=yes
48409
48410  saved_ldflags="$LDFLAGS"
48411  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48412  ac_ext=c
48413ac_cpp='$CPP $CPPFLAGS'
48414ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48415ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48416ac_compiler_gnu=$ac_cv_c_compiler_gnu
48417
48418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48419/* end confdefs.h.  */
48420
48421int
48422main ()
48423{
48424
48425  ;
48426  return 0;
48427}
48428_ACEOF
48429if ac_fn_c_try_link "$LINENO"; then :
48430
48431else
48432  supports=no
48433fi
48434rm -f core conftest.err conftest.$ac_objext \
48435    conftest$ac_exeext conftest.$ac_ext
48436  ac_ext=cpp
48437ac_cpp='$CXXCPP $CPPFLAGS'
48438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48441
48442  LDFLAGS="$saved_ldflags"
48443
48444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48445$as_echo "$supports" >&6; }
48446  if test "x$supports" = "xyes" ; then
48447    :
48448    HAS_LINKER_RELRO=true
48449  else
48450    :
48451    HAS_LINKER_RELRO=false
48452  fi
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466    # "-z now" supported in GNU binutils 2.11 and later
48467    LINKER_NOW_FLAG="-Wl,-z,now"
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
48513
48514
48515    # Execute function body
48516
48517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48518$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48519  supports=yes
48520
48521  saved_ldflags="$LDFLAGS"
48522  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48523  ac_ext=c
48524ac_cpp='$CPP $CPPFLAGS'
48525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48527ac_compiler_gnu=$ac_cv_c_compiler_gnu
48528
48529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48530/* end confdefs.h.  */
48531
48532int
48533main ()
48534{
48535
48536  ;
48537  return 0;
48538}
48539_ACEOF
48540if ac_fn_c_try_link "$LINENO"; then :
48541
48542else
48543  supports=no
48544fi
48545rm -f core conftest.err conftest.$ac_objext \
48546    conftest$ac_exeext conftest.$ac_ext
48547  ac_ext=cpp
48548ac_cpp='$CXXCPP $CPPFLAGS'
48549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48552
48553  LDFLAGS="$saved_ldflags"
48554
48555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48556$as_echo "$supports" >&6; }
48557  if test "x$supports" = "xyes" ; then
48558    :
48559    HAS_LINKER_NOW=true
48560  else
48561    :
48562    HAS_LINKER_NOW=false
48563  fi
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576  fi
48577
48578  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48579  # in executable.'
48580  USING_BROKEN_SUSE_LD=no
48581  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48583$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48584    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48585    $ECHO "int main() { }" > main.c
48586    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48588$as_echo "no" >&6; }
48589      USING_BROKEN_SUSE_LD=no
48590    else
48591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48592$as_echo "yes" >&6; }
48593      USING_BROKEN_SUSE_LD=yes
48594    fi
48595    $RM version-script.map main.c a.out
48596  fi
48597
48598
48599  # Setup hotspot lecagy names for toolchains
48600  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48601  if test "x$TOOLCHAIN_TYPE" = xclang; then
48602    HOTSPOT_TOOLCHAIN_TYPE=gcc
48603  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48604    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48605  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48606    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48607  fi
48608
48609
48610
48611# Setup the JTReg Regression Test Harness.
48612
48613
48614# Check whether --with-jtreg was given.
48615if test "${with_jtreg+set}" = set; then :
48616  withval=$with_jtreg;
48617fi
48618
48619
48620  if test "x$with_jtreg" = xno; then
48621    # jtreg disabled
48622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48623$as_echo_n "checking for jtreg test harness... " >&6; }
48624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48625$as_echo "no, disabled" >&6; }
48626  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48627    # An explicit path is specified, use it.
48628    JT_HOME="$with_jtreg"
48629    if test ! -d "$JT_HOME"; then
48630      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48631    fi
48632
48633    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48634      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48635    fi
48636
48637    JTREGEXE="$JT_HOME/bin/jtreg"
48638    if test ! -x "$JTREGEXE"; then
48639      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48640    fi
48641
48642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48643$as_echo_n "checking for jtreg test harness... " >&6; }
48644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48645$as_echo "$JT_HOME" >&6; }
48646  else
48647    # Try to locate jtreg
48648    if test "x$JT_HOME" != x; then
48649      # JT_HOME set in environment, use it
48650      if test ! -d "$JT_HOME"; then
48651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48652$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48653        JT_HOME=
48654      else
48655        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48656          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48657$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48658          JT_HOME=
48659        elif test ! -x "$JT_HOME/bin/jtreg"; then
48660          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48661$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48662          JT_HOME=
48663        else
48664          JTREGEXE="$JT_HOME/bin/jtreg"
48665          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48666$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48667        fi
48668      fi
48669    fi
48670
48671    if test "x$JT_HOME" = x; then
48672      # JT_HOME is not set in environment, or was deemed invalid.
48673      # Try to find jtreg on path
48674
48675
48676  # Publish this variable in the help.
48677
48678
48679  if [ -z "${JTREGEXE+x}" ]; then
48680    # The variable is not set by user, try to locate tool using the code snippet
48681    for ac_prog in jtreg
48682do
48683  # Extract the first word of "$ac_prog", so it can be a program name with args.
48684set dummy $ac_prog; ac_word=$2
48685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48686$as_echo_n "checking for $ac_word... " >&6; }
48687if ${ac_cv_path_JTREGEXE+:} false; then :
48688  $as_echo_n "(cached) " >&6
48689else
48690  case $JTREGEXE in
48691  [\\/]* | ?:[\\/]*)
48692  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48693  ;;
48694  *)
48695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48696for as_dir in $PATH
48697do
48698  IFS=$as_save_IFS
48699  test -z "$as_dir" && as_dir=.
48700    for ac_exec_ext in '' $ac_executable_extensions; do
48701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48702    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48704    break 2
48705  fi
48706done
48707  done
48708IFS=$as_save_IFS
48709
48710  ;;
48711esac
48712fi
48713JTREGEXE=$ac_cv_path_JTREGEXE
48714if test -n "$JTREGEXE"; then
48715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48716$as_echo "$JTREGEXE" >&6; }
48717else
48718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48719$as_echo "no" >&6; }
48720fi
48721
48722
48723  test -n "$JTREGEXE" && break
48724done
48725
48726  else
48727    # The variable is set, but is it from the command line or the environment?
48728
48729    # Try to remove the string !JTREGEXE! from our list.
48730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48732      # If it failed, the variable was not from the command line. Ignore it,
48733      # but warn the user (except for BASH, which is always set by the calling BASH).
48734      if test "xJTREGEXE" != xBASH; then
48735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48736$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48737      fi
48738      # Try to locate tool using the code snippet
48739      for ac_prog in jtreg
48740do
48741  # Extract the first word of "$ac_prog", so it can be a program name with args.
48742set dummy $ac_prog; ac_word=$2
48743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48744$as_echo_n "checking for $ac_word... " >&6; }
48745if ${ac_cv_path_JTREGEXE+:} false; then :
48746  $as_echo_n "(cached) " >&6
48747else
48748  case $JTREGEXE in
48749  [\\/]* | ?:[\\/]*)
48750  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48751  ;;
48752  *)
48753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48754for as_dir in $PATH
48755do
48756  IFS=$as_save_IFS
48757  test -z "$as_dir" && as_dir=.
48758    for ac_exec_ext in '' $ac_executable_extensions; do
48759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48760    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48762    break 2
48763  fi
48764done
48765  done
48766IFS=$as_save_IFS
48767
48768  ;;
48769esac
48770fi
48771JTREGEXE=$ac_cv_path_JTREGEXE
48772if test -n "$JTREGEXE"; then
48773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48774$as_echo "$JTREGEXE" >&6; }
48775else
48776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48777$as_echo "no" >&6; }
48778fi
48779
48780
48781  test -n "$JTREGEXE" && break
48782done
48783
48784    else
48785      # If it succeeded, then it was overridden by the user. We will use it
48786      # for the tool.
48787
48788      # First remove it from the list of overridden variables, so we can test
48789      # for unknown variables in the end.
48790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48791
48792      # Check if we try to supply an empty value
48793      if test "x$JTREGEXE" = x; then
48794        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48795$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48797$as_echo_n "checking for JTREGEXE... " >&6; }
48798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48799$as_echo "disabled" >&6; }
48800      else
48801        # Check if the provided tool contains a complete path.
48802        tool_specified="$JTREGEXE"
48803        tool_basename="${tool_specified##*/}"
48804        if test "x$tool_basename" = "x$tool_specified"; then
48805          # A command without a complete path is provided, search $PATH.
48806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48807$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48808          # Extract the first word of "$tool_basename", so it can be a program name with args.
48809set dummy $tool_basename; ac_word=$2
48810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48811$as_echo_n "checking for $ac_word... " >&6; }
48812if ${ac_cv_path_JTREGEXE+:} false; then :
48813  $as_echo_n "(cached) " >&6
48814else
48815  case $JTREGEXE in
48816  [\\/]* | ?:[\\/]*)
48817  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48818  ;;
48819  *)
48820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48821for as_dir in $PATH
48822do
48823  IFS=$as_save_IFS
48824  test -z "$as_dir" && as_dir=.
48825    for ac_exec_ext in '' $ac_executable_extensions; do
48826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48827    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48829    break 2
48830  fi
48831done
48832  done
48833IFS=$as_save_IFS
48834
48835  ;;
48836esac
48837fi
48838JTREGEXE=$ac_cv_path_JTREGEXE
48839if test -n "$JTREGEXE"; then
48840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48841$as_echo "$JTREGEXE" >&6; }
48842else
48843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48844$as_echo "no" >&6; }
48845fi
48846
48847
48848          if test "x$JTREGEXE" = x; then
48849            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48850          fi
48851        else
48852          # Otherwise we believe it is a complete path. Use it as it is.
48853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48854$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48856$as_echo_n "checking for JTREGEXE... " >&6; }
48857          if test ! -x "$tool_specified"; then
48858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48859$as_echo "not found" >&6; }
48860            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48861          fi
48862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48863$as_echo "$tool_specified" >&6; }
48864        fi
48865      fi
48866    fi
48867
48868  fi
48869
48870
48871      if test "x$JTREGEXE" != x; then
48872        # That's good, now try to derive JT_HOME
48873        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
48874        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48875          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
48876$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
48877          JT_HOME=
48878          JTREGEXE=
48879        else
48880          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
48881$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
48882        fi
48883      fi
48884    fi
48885
48886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48887$as_echo_n "checking for jtreg test harness... " >&6; }
48888    if test "x$JT_HOME" != x; then
48889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48890$as_echo "$JT_HOME" >&6; }
48891    else
48892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
48893$as_echo "no, not found" >&6; }
48894
48895      if test "x$with_jtreg" = xyes; then
48896        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
48897      fi
48898    fi
48899  fi
48900
48901
48902  # Only process if variable expands to non-empty
48903
48904  if test "x$JTREGEXE" != x; then
48905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48906
48907  # First separate the path from the arguments. This will split at the first
48908  # space.
48909  complete="$JTREGEXE"
48910  path="${complete%% *}"
48911  tmp="$complete EOL"
48912  arguments="${tmp#* }"
48913
48914  # Input might be given as Windows format, start by converting to
48915  # unix format.
48916  new_path=`$CYGPATH -u "$path"`
48917
48918  # Now try to locate executable using which
48919  new_path=`$WHICH "$new_path" 2> /dev/null`
48920  # bat and cmd files are not always considered executable in cygwin causing which
48921  # to not find them
48922  if test "x$new_path" = x \
48923      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48924      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48925    new_path=`$CYGPATH -u "$path"`
48926  fi
48927  if test "x$new_path" = x; then
48928    # Oops. Which didn't find the executable.
48929    # The splitting of arguments from the executable at a space might have been incorrect,
48930    # since paths with space are more likely in Windows. Give it another try with the whole
48931    # argument.
48932    path="$complete"
48933    arguments="EOL"
48934    new_path=`$CYGPATH -u "$path"`
48935    new_path=`$WHICH "$new_path" 2> /dev/null`
48936    # bat and cmd files are not always considered executable in cygwin causing which
48937    # to not find them
48938    if test "x$new_path" = x \
48939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48941      new_path=`$CYGPATH -u "$path"`
48942    fi
48943    if test "x$new_path" = x; then
48944      # It's still not found. Now this is an unrecoverable error.
48945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
48946$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
48947      has_space=`$ECHO "$complete" | $GREP " "`
48948      if test "x$has_space" != x; then
48949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48951      fi
48952      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
48953    fi
48954  fi
48955
48956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48959  # "foo.exe" is OK but "foo" is an error.
48960  #
48961  # This test is therefore slightly more accurate than "test -f" to check for file presence.
48962  # It is also a way to make sure we got the proper file name for the real test later on.
48963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48964  if test "x$test_shortpath" = x; then
48965    # Short path failed, file does not exist as specified.
48966    # Try adding .exe or .cmd
48967    if test -f "${new_path}.exe"; then
48968      input_to_shortpath="${new_path}.exe"
48969    elif test -f "${new_path}.cmd"; then
48970      input_to_shortpath="${new_path}.cmd"
48971    else
48972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
48973$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
48974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
48975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
48976      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
48977    fi
48978  else
48979    input_to_shortpath="$new_path"
48980  fi
48981
48982  # Call helper function which possibly converts this using DOS-style short mode.
48983  # If so, the updated path is stored in $new_path.
48984  new_path="$input_to_shortpath"
48985
48986  input_path="$input_to_shortpath"
48987  # Check if we need to convert this using DOS-style short mode. If the path
48988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48989  # take no chances and rewrite it.
48990  # Note: m4 eats our [], so we need to use [ and ] instead.
48991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48992  if test "x$has_forbidden_chars" != x; then
48993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48997      # Going to short mode and back again did indeed matter. Since short mode is
48998      # case insensitive, let's make it lowercase to improve readability.
48999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49000      # Now convert it back to Unix-style (cygpath)
49001      input_path=`$CYGPATH -u "$shortmode_path"`
49002      new_path="$input_path"
49003    fi
49004  fi
49005
49006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49007  if test "x$test_cygdrive_prefix" = x; then
49008    # As a simple fix, exclude /usr/bin since it's not a real path.
49009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49011      # a path prefixed by /cygdrive for fixpath to work.
49012      new_path="$CYGWIN_ROOT_PATH$input_path"
49013    fi
49014  fi
49015
49016  # remove trailing .exe if any
49017  new_path="${new_path/%.exe/}"
49018
49019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49020
49021  # First separate the path from the arguments. This will split at the first
49022  # space.
49023  complete="$JTREGEXE"
49024  path="${complete%% *}"
49025  tmp="$complete EOL"
49026  arguments="${tmp#* }"
49027
49028  # Input might be given as Windows format, start by converting to
49029  # unix format.
49030  new_path="$path"
49031
49032  windows_path="$new_path"
49033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49034    unix_path=`$CYGPATH -u "$windows_path"`
49035    new_path="$unix_path"
49036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49038    new_path="$unix_path"
49039  fi
49040
49041
49042  # Now try to locate executable using which
49043  new_path=`$WHICH "$new_path" 2> /dev/null`
49044
49045  if test "x$new_path" = x; then
49046    # Oops. Which didn't find the executable.
49047    # The splitting of arguments from the executable at a space might have been incorrect,
49048    # since paths with space are more likely in Windows. Give it another try with the whole
49049    # argument.
49050    path="$complete"
49051    arguments="EOL"
49052    new_path="$path"
49053
49054  windows_path="$new_path"
49055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49056    unix_path=`$CYGPATH -u "$windows_path"`
49057    new_path="$unix_path"
49058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49060    new_path="$unix_path"
49061  fi
49062
49063
49064    new_path=`$WHICH "$new_path" 2> /dev/null`
49065    # bat and cmd files are not always considered executable in MSYS causing which
49066    # to not find them
49067    if test "x$new_path" = x \
49068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49070      new_path="$path"
49071
49072  windows_path="$new_path"
49073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49074    unix_path=`$CYGPATH -u "$windows_path"`
49075    new_path="$unix_path"
49076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49078    new_path="$unix_path"
49079  fi
49080
49081    fi
49082
49083    if test "x$new_path" = x; then
49084      # It's still not found. Now this is an unrecoverable error.
49085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49086$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49087      has_space=`$ECHO "$complete" | $GREP " "`
49088      if test "x$has_space" != x; then
49089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49091      fi
49092      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49093    fi
49094  fi
49095
49096  # Now new_path has a complete unix path to the binary
49097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49098    # Keep paths in /bin as-is, but remove trailing .exe if any
49099    new_path="${new_path/%.exe/}"
49100    # Do not save /bin paths to all_fixpath_prefixes!
49101  else
49102    # Not in mixed or Windows style, start by that.
49103    new_path=`cmd //c echo $new_path`
49104
49105  input_path="$new_path"
49106  # Check if we need to convert this using DOS-style short mode. If the path
49107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49108  # take no chances and rewrite it.
49109  # Note: m4 eats our [], so we need to use [ and ] instead.
49110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49111  if test "x$has_forbidden_chars" != x; then
49112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49114  fi
49115
49116    # Output is in $new_path
49117
49118  windows_path="$new_path"
49119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49120    unix_path=`$CYGPATH -u "$windows_path"`
49121    new_path="$unix_path"
49122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49124    new_path="$unix_path"
49125  fi
49126
49127    # remove trailing .exe if any
49128    new_path="${new_path/%.exe/}"
49129
49130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49132  fi
49133
49134    else
49135      # We're on a unix platform. Hooray! :)
49136      # First separate the path from the arguments. This will split at the first
49137      # space.
49138      complete="$JTREGEXE"
49139      path="${complete%% *}"
49140      tmp="$complete EOL"
49141      arguments="${tmp#* }"
49142
49143      # Cannot rely on the command "which" here since it doesn't always work.
49144      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49145      if test -z "$is_absolute_path"; then
49146        # Path to executable is not absolute. Find it.
49147        IFS_save="$IFS"
49148        IFS=:
49149        for p in $PATH; do
49150          if test -f "$p/$path" && test -x "$p/$path"; then
49151            new_path="$p/$path"
49152            break
49153          fi
49154        done
49155        IFS="$IFS_save"
49156      else
49157        # This is an absolute path, we can use it without further modifications.
49158        new_path="$path"
49159      fi
49160
49161      if test "x$new_path" = x; then
49162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49163$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49164        has_space=`$ECHO "$complete" | $GREP " "`
49165        if test "x$has_space" != x; then
49166          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49168        fi
49169        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49170      fi
49171    fi
49172
49173    # Now join together the path and the arguments once again
49174    if test "x$arguments" != xEOL; then
49175      new_complete="$new_path ${arguments% *}"
49176    else
49177      new_complete="$new_path"
49178    fi
49179
49180    if test "x$complete" != "x$new_complete"; then
49181      JTREGEXE="$new_complete"
49182      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49183$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49184    fi
49185  fi
49186
49187
49188  # Only process if variable expands to non-empty
49189
49190  if test "x$JT_HOME" != x; then
49191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49192
49193  # Input might be given as Windows format, start by converting to
49194  # unix format.
49195  path="$JT_HOME"
49196  new_path=`$CYGPATH -u "$path"`
49197
49198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49201  # "foo.exe" is OK but "foo" is an error.
49202  #
49203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49204  # It is also a way to make sure we got the proper file name for the real test later on.
49205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49206  if test "x$test_shortpath" = x; then
49207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49208$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49209    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49210  fi
49211
49212  # Call helper function which possibly converts this using DOS-style short mode.
49213  # If so, the updated path is stored in $new_path.
49214
49215  input_path="$new_path"
49216  # Check if we need to convert this using DOS-style short mode. If the path
49217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49218  # take no chances and rewrite it.
49219  # Note: m4 eats our [], so we need to use [ and ] instead.
49220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49221  if test "x$has_forbidden_chars" != x; then
49222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49226      # Going to short mode and back again did indeed matter. Since short mode is
49227      # case insensitive, let's make it lowercase to improve readability.
49228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49229      # Now convert it back to Unix-style (cygpath)
49230      input_path=`$CYGPATH -u "$shortmode_path"`
49231      new_path="$input_path"
49232    fi
49233  fi
49234
49235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49236  if test "x$test_cygdrive_prefix" = x; then
49237    # As a simple fix, exclude /usr/bin since it's not a real path.
49238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49240      # a path prefixed by /cygdrive for fixpath to work.
49241      new_path="$CYGWIN_ROOT_PATH$input_path"
49242    fi
49243  fi
49244
49245
49246  if test "x$path" != "x$new_path"; then
49247    JT_HOME="$new_path"
49248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49249$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49250  fi
49251
49252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49253
49254  path="$JT_HOME"
49255  has_colon=`$ECHO $path | $GREP ^.:`
49256  new_path="$path"
49257  if test "x$has_colon" = x; then
49258    # Not in mixed or Windows style, start by that.
49259    new_path=`cmd //c echo $path`
49260  fi
49261
49262
49263  input_path="$new_path"
49264  # Check if we need to convert this using DOS-style short mode. If the path
49265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49266  # take no chances and rewrite it.
49267  # Note: m4 eats our [], so we need to use [ and ] instead.
49268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49269  if test "x$has_forbidden_chars" != x; then
49270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49272  fi
49273
49274
49275  windows_path="$new_path"
49276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49277    unix_path=`$CYGPATH -u "$windows_path"`
49278    new_path="$unix_path"
49279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49281    new_path="$unix_path"
49282  fi
49283
49284  if test "x$path" != "x$new_path"; then
49285    JT_HOME="$new_path"
49286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49287$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49288  fi
49289
49290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49292
49293    else
49294      # We're on a unix platform. Hooray! :)
49295      path="$JT_HOME"
49296      has_space=`$ECHO "$path" | $GREP " "`
49297      if test "x$has_space" != x; then
49298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49299$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49301      fi
49302
49303      # Use eval to expand a potential ~
49304      eval path="$path"
49305      if test ! -f "$path" && test ! -d "$path"; then
49306        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49307      fi
49308
49309      if test -d "$path"; then
49310        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49311      else
49312        dir="`$DIRNAME "$path"`"
49313        base="`$BASENAME "$path"`"
49314        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49315      fi
49316    fi
49317  fi
49318
49319
49320
49321
49322
49323
49324  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49325  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49326  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49327  #                              commands produced by the link step (currently AIX only)
49328  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49329    COMPILER_TARGET_BITS_FLAG="-q"
49330    COMPILER_COMMAND_FILE_FLAG="-f"
49331    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49332  else
49333    COMPILER_TARGET_BITS_FLAG="-m"
49334    COMPILER_COMMAND_FILE_FLAG="@"
49335    COMPILER_BINDCMD_FILE_FLAG=""
49336
49337    # The solstudio linker does not support @-files.
49338    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49339      COMPILER_COMMAND_FILE_FLAG=
49340    fi
49341
49342    # Check if @file is supported by gcc
49343    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49345$as_echo_n "checking if @file is supported by gcc... " >&6; }
49346      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49347      $ECHO "" "--version" > command.file
49348      if $CXX @command.file 2>&5 >&5; then
49349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49350$as_echo "yes" >&6; }
49351        COMPILER_COMMAND_FILE_FLAG="@"
49352      else
49353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49354$as_echo "no" >&6; }
49355        COMPILER_COMMAND_FILE_FLAG=
49356      fi
49357      $RM command.file
49358    fi
49359  fi
49360
49361
49362
49363
49364  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49365  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49366    ARFLAGS="-r"
49367  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49368    ARFLAGS="-X64"
49369  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49370    # lib.exe is used as AR to create static libraries.
49371    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49372  else
49373    ARFLAGS=""
49374  fi
49375
49376
49377  ## Setup strip.
49378  # FIXME: should this really be per platform, or should it be per toolchain type?
49379  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49380  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49381  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49382    STRIPFLAGS="-g"
49383  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49384    STRIPFLAGS="-x"
49385  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49386    STRIPFLAGS="-S"
49387  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49388    STRIPFLAGS="-X32_64"
49389  fi
49390
49391
49392
49393  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49394    CC_OUT_OPTION=-Fo
49395    EXE_OUT_OPTION=-out:
49396    LD_OUT_OPTION=-out:
49397    AR_OUT_OPTION=-out:
49398  else
49399    # The option used to specify the target .o,.a or .so file.
49400    # When compiling, how to specify the to be created object file.
49401    CC_OUT_OPTION='-o$(SPACE)'
49402    # When linking, how to specify the to be created executable.
49403    EXE_OUT_OPTION='-o$(SPACE)'
49404    # When linking, how to specify the to be created dynamically linkable library.
49405    LD_OUT_OPTION='-o$(SPACE)'
49406    # When archiving, how to specify the to be create static archive for object files.
49407    AR_OUT_OPTION='rcs$(SPACE)'
49408  fi
49409
49410
49411
49412
49413
49414  # On Windows, we need to set RC flags.
49415  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49416    RC_FLAGS="-nologo -l0x409"
49417    JVM_RCFLAGS="-nologo"
49418    if test "x$DEBUG_LEVEL" = xrelease; then
49419      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49420      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49421    fi
49422
49423    # The version variables used to create RC_FLAGS may be overridden
49424    # in a custom configure script, or possibly the command line.
49425    # Let those variables be expanded at make time in spec.gmk.
49426    # The \$ are escaped to the shell, and the $(...) variables
49427    # are evaluated by make.
49428    RC_FLAGS="$RC_FLAGS \
49429        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49430        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49431        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49432        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49433        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49434        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49435        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49436
49437    JVM_RCFLAGS="$JVM_RCFLAGS \
49438        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49439        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49440        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49441        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49442        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49443        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49444        -D\"HS_FNAME=jvm.dll\" \
49445        -D\"HS_INTERNAL_NAME=jvm\""
49446  fi
49447
49448
49449
49450  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49451    # silence copyright notice and other headers.
49452    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49453  fi
49454
49455
49456# Now we can test some aspects on the target using configure macros.
49457
49458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49459$as_echo_n "checking for ANSI C header files... " >&6; }
49460if ${ac_cv_header_stdc+:} false; then :
49461  $as_echo_n "(cached) " >&6
49462else
49463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49464/* end confdefs.h.  */
49465#include <stdlib.h>
49466#include <stdarg.h>
49467#include <string.h>
49468#include <float.h>
49469
49470int
49471main ()
49472{
49473
49474  ;
49475  return 0;
49476}
49477_ACEOF
49478if ac_fn_cxx_try_compile "$LINENO"; then :
49479  ac_cv_header_stdc=yes
49480else
49481  ac_cv_header_stdc=no
49482fi
49483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49484
49485if test $ac_cv_header_stdc = yes; then
49486  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49488/* end confdefs.h.  */
49489#include <string.h>
49490
49491_ACEOF
49492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49493  $EGREP "memchr" >/dev/null 2>&1; then :
49494
49495else
49496  ac_cv_header_stdc=no
49497fi
49498rm -f conftest*
49499
49500fi
49501
49502if test $ac_cv_header_stdc = yes; then
49503  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49505/* end confdefs.h.  */
49506#include <stdlib.h>
49507
49508_ACEOF
49509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49510  $EGREP "free" >/dev/null 2>&1; then :
49511
49512else
49513  ac_cv_header_stdc=no
49514fi
49515rm -f conftest*
49516
49517fi
49518
49519if test $ac_cv_header_stdc = yes; then
49520  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49521  if test "$cross_compiling" = yes; then :
49522  :
49523else
49524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49525/* end confdefs.h.  */
49526#include <ctype.h>
49527#include <stdlib.h>
49528#if ((' ' & 0x0FF) == 0x020)
49529# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49530# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49531#else
49532# define ISLOWER(c) \
49533		   (('a' <= (c) && (c) <= 'i') \
49534		     || ('j' <= (c) && (c) <= 'r') \
49535		     || ('s' <= (c) && (c) <= 'z'))
49536# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49537#endif
49538
49539#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49540int
49541main ()
49542{
49543  int i;
49544  for (i = 0; i < 256; i++)
49545    if (XOR (islower (i), ISLOWER (i))
49546	|| toupper (i) != TOUPPER (i))
49547      return 2;
49548  return 0;
49549}
49550_ACEOF
49551if ac_fn_cxx_try_run "$LINENO"; then :
49552
49553else
49554  ac_cv_header_stdc=no
49555fi
49556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49557  conftest.$ac_objext conftest.beam conftest.$ac_ext
49558fi
49559
49560fi
49561fi
49562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49563$as_echo "$ac_cv_header_stdc" >&6; }
49564if test $ac_cv_header_stdc = yes; then
49565
49566$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49567
49568fi
49569
49570# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49571for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49572		  inttypes.h stdint.h unistd.h
49573do :
49574  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49575ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49576"
49577if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49578  cat >>confdefs.h <<_ACEOF
49579#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49580_ACEOF
49581
49582fi
49583
49584done
49585
49586
49587
49588  ###############################################################################
49589  #
49590  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49591  # (The JVM can use 32 or 64 bit Java pointers but that decision
49592  # is made at runtime.)
49593  #
49594
49595  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49596    # Always specify -m flag on Solaris
49597    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49598
49599  # When we add flags to the "official" CFLAGS etc, we need to
49600  # keep track of these additions in ADDED_CFLAGS etc. These
49601  # will later be checked to make sure only controlled additions
49602  # have been made to CFLAGS etc.
49603  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49604  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49605  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49606
49607  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49608  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49609  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49610
49611  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49612  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49613  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49614
49615  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49616  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49617  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49618
49619  elif test "x$COMPILE_TYPE" = xreduced; then
49620    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49621      # Specify -m if running reduced on unix platforms
49622
49623  # When we add flags to the "official" CFLAGS etc, we need to
49624  # keep track of these additions in ADDED_CFLAGS etc. These
49625  # will later be checked to make sure only controlled additions
49626  # have been made to CFLAGS etc.
49627  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49628  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49629  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49630
49631  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49632  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49633  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49634
49635  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49636  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49637  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49638
49639  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49640  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49641  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49642
49643    fi
49644  fi
49645  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49646    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49647    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49648    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49649  fi
49650
49651  # Make compilation sanity check
49652  for ac_header in stdio.h
49653do :
49654  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49655if test "x$ac_cv_header_stdio_h" = xyes; then :
49656  cat >>confdefs.h <<_ACEOF
49657#define HAVE_STDIO_H 1
49658_ACEOF
49659
49660else
49661
49662    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49663$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49664    if test "x$COMPILE_TYPE" = xreduced; then
49665
49666  # Print a helpful message on how to acquire the necessary build dependency.
49667  # reduced is the help tag: freetype, cups, alsa etc
49668  MISSING_DEPENDENCY=reduced
49669
49670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49671    cygwin_help $MISSING_DEPENDENCY
49672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49673    msys_help $MISSING_DEPENDENCY
49674  else
49675    PKGHANDLER_COMMAND=
49676
49677    case $PKGHANDLER in
49678      apt-get)
49679        apt_help     $MISSING_DEPENDENCY ;;
49680      yum)
49681        yum_help     $MISSING_DEPENDENCY ;;
49682      brew)
49683        brew_help    $MISSING_DEPENDENCY ;;
49684      port)
49685        port_help    $MISSING_DEPENDENCY ;;
49686      pkgutil)
49687        pkgutil_help $MISSING_DEPENDENCY ;;
49688      pkgadd)
49689        pkgadd_help  $MISSING_DEPENDENCY ;;
49690    esac
49691
49692    if test "x$PKGHANDLER_COMMAND" != x; then
49693      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49694    fi
49695  fi
49696
49697      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49698$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49699    elif test "x$COMPILE_TYPE" = xcross; then
49700      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49701$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49702    fi
49703    as_fn_error $? "Cannot continue." "$LINENO" 5
49704
49705fi
49706
49707done
49708
49709
49710  # The cast to long int works around a bug in the HP C Compiler
49711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49713# This bug is HP SR number 8606223364.
49714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49715$as_echo_n "checking size of int *... " >&6; }
49716if ${ac_cv_sizeof_int_p+:} false; then :
49717  $as_echo_n "(cached) " >&6
49718else
49719  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49720
49721else
49722  if test "$ac_cv_type_int_p" = yes; then
49723     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49725as_fn_error 77 "cannot compute sizeof (int *)
49726See \`config.log' for more details" "$LINENO" 5; }
49727   else
49728     ac_cv_sizeof_int_p=0
49729   fi
49730fi
49731
49732fi
49733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49734$as_echo "$ac_cv_sizeof_int_p" >&6; }
49735
49736
49737
49738cat >>confdefs.h <<_ACEOF
49739#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49740_ACEOF
49741
49742
49743
49744  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49745  if test "x$ac_cv_sizeof_int_p" = x; then
49746    # The test failed, lets stick to the assumed value.
49747    { $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
49748$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49749  else
49750    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49751
49752    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49753      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49754      # Let's try to implicitely set the compilers target architecture and retry the test
49755      { $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
49756$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;}
49757      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49758$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49759
49760  # When we add flags to the "official" CFLAGS etc, we need to
49761  # keep track of these additions in ADDED_CFLAGS etc. These
49762  # will later be checked to make sure only controlled additions
49763  # have been made to CFLAGS etc.
49764  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49765  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49766  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49767
49768  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49769  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49770  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49771
49772  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49773  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49774  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49775
49776  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49777  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49778  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49779
49780
49781      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49782      unset ac_cv_sizeof_int_p
49783      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49784      cat >>confdefs.h <<_ACEOF
49785#undef SIZEOF_INT_P
49786_ACEOF
49787
49788      # The cast to long int works around a bug in the HP C Compiler
49789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49791# This bug is HP SR number 8606223364.
49792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49793$as_echo_n "checking size of int *... " >&6; }
49794if ${ac_cv_sizeof_int_p+:} false; then :
49795  $as_echo_n "(cached) " >&6
49796else
49797  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49798
49799else
49800  if test "$ac_cv_type_int_p" = yes; then
49801     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49803as_fn_error 77 "cannot compute sizeof (int *)
49804See \`config.log' for more details" "$LINENO" 5; }
49805   else
49806     ac_cv_sizeof_int_p=0
49807   fi
49808fi
49809
49810fi
49811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49812$as_echo "$ac_cv_sizeof_int_p" >&6; }
49813
49814
49815
49816cat >>confdefs.h <<_ACEOF
49817#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49818_ACEOF
49819
49820
49821
49822      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49823
49824      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49825        { $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
49826$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;}
49827        if test "x$COMPILE_TYPE" = xreduced; then
49828
49829  # Print a helpful message on how to acquire the necessary build dependency.
49830  # reduced is the help tag: freetype, cups, alsa etc
49831  MISSING_DEPENDENCY=reduced
49832
49833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49834    cygwin_help $MISSING_DEPENDENCY
49835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49836    msys_help $MISSING_DEPENDENCY
49837  else
49838    PKGHANDLER_COMMAND=
49839
49840    case $PKGHANDLER in
49841      apt-get)
49842        apt_help     $MISSING_DEPENDENCY ;;
49843      yum)
49844        yum_help     $MISSING_DEPENDENCY ;;
49845      brew)
49846        brew_help    $MISSING_DEPENDENCY ;;
49847      port)
49848        port_help    $MISSING_DEPENDENCY ;;
49849      pkgutil)
49850        pkgutil_help $MISSING_DEPENDENCY ;;
49851      pkgadd)
49852        pkgadd_help  $MISSING_DEPENDENCY ;;
49853    esac
49854
49855    if test "x$PKGHANDLER_COMMAND" != x; then
49856      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49857    fi
49858  fi
49859
49860          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49861$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49862        elif test "x$COMPILE_TYPE" = xcross; then
49863          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49864$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49865        fi
49866        as_fn_error $? "Cannot continue." "$LINENO" 5
49867      fi
49868    fi
49869  fi
49870
49871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49872$as_echo_n "checking for target address size... " >&6; }
49873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49874$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49875
49876
49877  ###############################################################################
49878  #
49879  # Is the target little of big endian?
49880  #
49881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49882$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49883if ${ac_cv_c_bigendian+:} false; then :
49884  $as_echo_n "(cached) " >&6
49885else
49886  ac_cv_c_bigendian=unknown
49887    # See if we're dealing with a universal compiler.
49888    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49889/* end confdefs.h.  */
49890#ifndef __APPLE_CC__
49891	       not a universal capable compiler
49892	     #endif
49893	     typedef int dummy;
49894
49895_ACEOF
49896if ac_fn_cxx_try_compile "$LINENO"; then :
49897
49898	# Check for potential -arch flags.  It is not universal unless
49899	# there are at least two -arch flags with different values.
49900	ac_arch=
49901	ac_prev=
49902	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49903	 if test -n "$ac_prev"; then
49904	   case $ac_word in
49905	     i?86 | x86_64 | ppc | ppc64)
49906	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49907		 ac_arch=$ac_word
49908	       else
49909		 ac_cv_c_bigendian=universal
49910		 break
49911	       fi
49912	       ;;
49913	   esac
49914	   ac_prev=
49915	 elif test "x$ac_word" = "x-arch"; then
49916	   ac_prev=arch
49917	 fi
49918       done
49919fi
49920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49921    if test $ac_cv_c_bigendian = unknown; then
49922      # See if sys/param.h defines the BYTE_ORDER macro.
49923      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49924/* end confdefs.h.  */
49925#include <sys/types.h>
49926	     #include <sys/param.h>
49927
49928int
49929main ()
49930{
49931#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49932		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49933		     && LITTLE_ENDIAN)
49934	      bogus endian macros
49935	     #endif
49936
49937  ;
49938  return 0;
49939}
49940_ACEOF
49941if ac_fn_cxx_try_compile "$LINENO"; then :
49942  # It does; now see whether it defined to BIG_ENDIAN or not.
49943	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49944/* end confdefs.h.  */
49945#include <sys/types.h>
49946		#include <sys/param.h>
49947
49948int
49949main ()
49950{
49951#if BYTE_ORDER != BIG_ENDIAN
49952		 not big endian
49953		#endif
49954
49955  ;
49956  return 0;
49957}
49958_ACEOF
49959if ac_fn_cxx_try_compile "$LINENO"; then :
49960  ac_cv_c_bigendian=yes
49961else
49962  ac_cv_c_bigendian=no
49963fi
49964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49965fi
49966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49967    fi
49968    if test $ac_cv_c_bigendian = unknown; then
49969      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49970      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49971/* end confdefs.h.  */
49972#include <limits.h>
49973
49974int
49975main ()
49976{
49977#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49978	      bogus endian macros
49979	     #endif
49980
49981  ;
49982  return 0;
49983}
49984_ACEOF
49985if ac_fn_cxx_try_compile "$LINENO"; then :
49986  # It does; now see whether it defined to _BIG_ENDIAN or not.
49987	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49988/* end confdefs.h.  */
49989#include <limits.h>
49990
49991int
49992main ()
49993{
49994#ifndef _BIG_ENDIAN
49995		 not big endian
49996		#endif
49997
49998  ;
49999  return 0;
50000}
50001_ACEOF
50002if ac_fn_cxx_try_compile "$LINENO"; then :
50003  ac_cv_c_bigendian=yes
50004else
50005  ac_cv_c_bigendian=no
50006fi
50007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50008fi
50009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50010    fi
50011    if test $ac_cv_c_bigendian = unknown; then
50012      # Compile a test program.
50013      if test "$cross_compiling" = yes; then :
50014  # Try to guess by grepping values from an object file.
50015	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50016/* end confdefs.h.  */
50017short int ascii_mm[] =
50018		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50019		short int ascii_ii[] =
50020		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50021		int use_ascii (int i) {
50022		  return ascii_mm[i] + ascii_ii[i];
50023		}
50024		short int ebcdic_ii[] =
50025		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50026		short int ebcdic_mm[] =
50027		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50028		int use_ebcdic (int i) {
50029		  return ebcdic_mm[i] + ebcdic_ii[i];
50030		}
50031		extern int foo;
50032
50033int
50034main ()
50035{
50036return use_ascii (foo) == use_ebcdic (foo);
50037  ;
50038  return 0;
50039}
50040_ACEOF
50041if ac_fn_cxx_try_compile "$LINENO"; then :
50042  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50043	      ac_cv_c_bigendian=yes
50044	    fi
50045	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50046	      if test "$ac_cv_c_bigendian" = unknown; then
50047		ac_cv_c_bigendian=no
50048	      else
50049		# finding both strings is unlikely to happen, but who knows?
50050		ac_cv_c_bigendian=unknown
50051	      fi
50052	    fi
50053fi
50054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50055else
50056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50057/* end confdefs.h.  */
50058$ac_includes_default
50059int
50060main ()
50061{
50062
50063	     /* Are we little or big endian?  From Harbison&Steele.  */
50064	     union
50065	     {
50066	       long int l;
50067	       char c[sizeof (long int)];
50068	     } u;
50069	     u.l = 1;
50070	     return u.c[sizeof (long int) - 1] == 1;
50071
50072  ;
50073  return 0;
50074}
50075_ACEOF
50076if ac_fn_cxx_try_run "$LINENO"; then :
50077  ac_cv_c_bigendian=no
50078else
50079  ac_cv_c_bigendian=yes
50080fi
50081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50082  conftest.$ac_objext conftest.beam conftest.$ac_ext
50083fi
50084
50085    fi
50086fi
50087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50088$as_echo "$ac_cv_c_bigendian" >&6; }
50089 case $ac_cv_c_bigendian in #(
50090   yes)
50091     ENDIAN="big";; #(
50092   no)
50093     ENDIAN="little" ;; #(
50094   universal)
50095     ENDIAN="universal_endianness"
50096     ;; #(
50097   *)
50098     ENDIAN="unknown" ;;
50099 esac
50100
50101
50102  if test "x$ENDIAN" = xuniversal_endianness; then
50103    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50104  fi
50105  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50106    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
50107  fi
50108
50109
50110# Configure flags for the tools
50111
50112  ###############################################################################
50113  #
50114  # How to compile shared libraries.
50115  #
50116
50117  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50118    PICFLAG="-fPIC"
50119    C_FLAG_REORDER=''
50120    CXX_FLAG_REORDER=''
50121
50122    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50123      # Linking is different on MacOSX
50124      if test "x$STATIC_BUILD" = xtrue; then
50125        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50126      else
50127        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50128        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50129      fi
50130      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50131      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50132      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50133      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50134    else
50135      # Default works for linux, might work on other platforms as well.
50136      SHARED_LIBRARY_FLAGS='-shared'
50137      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50138      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50139      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50140      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50141    fi
50142  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50143    C_FLAG_REORDER=''
50144    CXX_FLAG_REORDER=''
50145
50146    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50147      # Linking is different on MacOSX
50148      PICFLAG=''
50149      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50150      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50151      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50152      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50153      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50154
50155      if test "x$STATIC_BUILD" = xfalse; then
50156        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50157      fi
50158    else
50159      # Default works for linux, might work on other platforms as well.
50160      PICFLAG='-fPIC'
50161      SHARED_LIBRARY_FLAGS='-shared'
50162      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50163      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50164      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50165
50166      # arm specific settings
50167      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50168        # '-Wl,-z,origin' isn't used on arm.
50169        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50170      else
50171        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50172      fi
50173
50174    fi
50175  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50176    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50177      PICFLAG="-xcode=pic32"
50178    else
50179      PICFLAG="-KPIC"
50180    fi
50181    C_FLAG_REORDER='-xF'
50182    CXX_FLAG_REORDER='-xF'
50183    SHARED_LIBRARY_FLAGS="-G"
50184    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50185    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50186    SET_SHARED_LIBRARY_NAME='-h $1'
50187    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50188  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50189    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50190    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50191    # will have to patch this single instruction with a call to some out-of-order code which
50192    # does the load from the TOC. This is of course slow. But in that case we also would have
50193    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50194    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50195    # can be patched directly by the linker and does not require a jump to out-of-order code.
50196    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50197    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50198    # loads for accessing a global variable). But there are rumors that this may be seen as a
50199    # 'performance feature' because of improved code locality of the symbols used in a
50200    # compilation unit.
50201    PICFLAG="-qpic"
50202    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50203    C_FLAG_REORDER=''
50204    CXX_FLAG_REORDER=''
50205    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50206    SET_EXECUTABLE_ORIGIN=""
50207    SET_SHARED_LIBRARY_ORIGIN=''
50208    SET_SHARED_LIBRARY_NAME=''
50209    SET_SHARED_LIBRARY_MAPFILE=''
50210  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50211    PICFLAG=""
50212    C_FLAG_REORDER=''
50213    CXX_FLAG_REORDER=''
50214    SHARED_LIBRARY_FLAGS="-dll"
50215    SET_EXECUTABLE_ORIGIN=''
50216    SET_SHARED_LIBRARY_ORIGIN=''
50217    SET_SHARED_LIBRARY_NAME=''
50218    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50219  fi
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229  # The (cross) compiler is now configured, we can now test capabilities
50230  # of the target platform.
50231
50232
50233
50234  ###############################################################################
50235  #
50236  # Setup the opt flags for different compilers
50237  # and different operating systems.
50238  #
50239
50240  # FIXME: this was indirectly the old default, but just inherited.
50241  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50242  #   C_FLAG_DEPS="-MMD -MF"
50243  # fi
50244
50245  # Generate make dependency files
50246  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50247    C_FLAG_DEPS="-MMD -MF"
50248  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50249    C_FLAG_DEPS="-MMD -MF"
50250  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50251    C_FLAG_DEPS="-xMMD -xMF"
50252  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50253    C_FLAG_DEPS="-qmakedep=gcc -MF"
50254  fi
50255  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50256
50257
50258
50259  # Debug symbols
50260  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50261    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50262      # reduce from default "-g2" option to save space
50263      CFLAGS_DEBUG_SYMBOLS="-g1"
50264      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50265    else
50266      CFLAGS_DEBUG_SYMBOLS="-g"
50267      CXXFLAGS_DEBUG_SYMBOLS="-g"
50268    fi
50269  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50270    CFLAGS_DEBUG_SYMBOLS="-g"
50271    CXXFLAGS_DEBUG_SYMBOLS="-g"
50272  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50273    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50274    # -g0 enables debug symbols without disabling inlining.
50275    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50276  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50277    CFLAGS_DEBUG_SYMBOLS="-g"
50278    CXXFLAGS_DEBUG_SYMBOLS="-g"
50279  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50280    CFLAGS_DEBUG_SYMBOLS="-Zi"
50281    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50282  fi
50283
50284
50285
50286  # Debug symbols for JVM_CFLAGS
50287  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50288    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50289    if test "x$DEBUG_LEVEL" = xslowdebug; then
50290      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50291    else
50292      # -g0 does not disable inlining, which -g does.
50293      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50294    fi
50295  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50296    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50297  else
50298    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50299  fi
50300
50301
50302  # bounds, memory and behavior checking options
50303  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50304    case $DEBUG_LEVEL in
50305    release )
50306      # no adjustment
50307      ;;
50308    fastdebug )
50309      # no adjustment
50310      ;;
50311    slowdebug )
50312      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50313      # get's added conditionally on whether we produce debug symbols or not.
50314      # This is most likely not really correct.
50315
50316      # Add runtime stack smashing and undefined behavior checks.
50317      # Not all versions of gcc support -fstack-protector
50318      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361    # Execute function body
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410    # Execute function body
50411
50412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50413$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50414  supports=yes
50415
50416  saved_cflags="$CFLAGS"
50417  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50418  ac_ext=c
50419ac_cpp='$CPP $CPPFLAGS'
50420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50422ac_compiler_gnu=$ac_cv_c_compiler_gnu
50423
50424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50425/* end confdefs.h.  */
50426int i;
50427_ACEOF
50428if ac_fn_c_try_compile "$LINENO"; then :
50429
50430else
50431  supports=no
50432fi
50433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50434  ac_ext=cpp
50435ac_cpp='$CXXCPP $CPPFLAGS'
50436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50439
50440  CFLAGS="$saved_cflags"
50441
50442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50443$as_echo "$supports" >&6; }
50444  if test "x$supports" = "xyes" ; then
50445    :
50446    C_COMP_SUPPORTS="yes"
50447  else
50448    :
50449    C_COMP_SUPPORTS="no"
50450  fi
50451
50452
50453
50454
50455
50456
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
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510    # Execute function body
50511
50512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50513$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50514  supports=yes
50515
50516  saved_cxxflags="$CXXFLAGS"
50517  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50518  ac_ext=cpp
50519ac_cpp='$CXXCPP $CPPFLAGS'
50520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50523
50524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50525/* end confdefs.h.  */
50526int i;
50527_ACEOF
50528if ac_fn_cxx_try_compile "$LINENO"; then :
50529
50530else
50531  supports=no
50532fi
50533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50534  ac_ext=cpp
50535ac_cpp='$CXXCPP $CPPFLAGS'
50536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50539
50540  CXXFLAGS="$saved_cxxflags"
50541
50542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50543$as_echo "$supports" >&6; }
50544  if test "x$supports" = "xyes" ; then
50545    :
50546    CXX_COMP_SUPPORTS="yes"
50547  else
50548    :
50549    CXX_COMP_SUPPORTS="no"
50550  fi
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50565$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50566  supports=no
50567  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50568
50569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50570$as_echo "$supports" >&6; }
50571  if test "x$supports" = "xyes" ; then
50572    :
50573
50574  else
50575    :
50576    STACK_PROTECTOR_CFLAG=""
50577  fi
50578
50579
50580
50581
50582
50583
50584
50585      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50586      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50587      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50588        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50589      fi
50590      ;;
50591    esac
50592  fi
50593
50594  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50595    if test "x$DEBUG_LEVEL" != xrelease; then
50596      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50597        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50598      fi
50599    fi
50600  fi
50601
50602  # Optimization levels
50603  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50604    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50605
50606    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50607      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50608      C_O_FLAG_HIGHEST_JVM="-xO4"
50609      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50610      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50611      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50612      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50613      C_O_FLAG_DEBUG_JVM=""
50614      C_O_FLAG_NONE="-xregs=no%frameptr"
50615      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50616      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50617      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50618      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50619      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50620      CXX_O_FLAG_DEBUG_JVM=""
50621      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50622      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50623        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50624        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50625      fi
50626    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50627      C_O_FLAG_HIGHEST_JVM="-xO4"
50628      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50629      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50630      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50631      C_O_FLAG_DEBUG=""
50632      C_O_FLAG_DEBUG_JVM=""
50633      C_O_FLAG_NONE=""
50634      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50635      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50636      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50637      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50638      CXX_O_FLAG_DEBUG=""
50639      CXX_O_FLAG_DEBUG_JVM=""
50640      CXX_O_FLAG_NONE=""
50641    fi
50642  else
50643    # The remaining toolchains share opt flags between CC and CXX;
50644    # setup for C and duplicate afterwards.
50645    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50646      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50647        # On MacOSX we optimize for size, something
50648        # we should do for all platforms?
50649        C_O_FLAG_HIGHEST_JVM="-Os"
50650        C_O_FLAG_HIGHEST="-Os"
50651        C_O_FLAG_HI="-Os"
50652        C_O_FLAG_NORM="-Os"
50653        C_O_FLAG_SIZE="-Os"
50654      else
50655        C_O_FLAG_HIGHEST_JVM="-O3"
50656        C_O_FLAG_HIGHEST="-O3"
50657        C_O_FLAG_HI="-O3"
50658        C_O_FLAG_NORM="-O2"
50659        C_O_FLAG_SIZE="-Os"
50660      fi
50661      C_O_FLAG_DEBUG="-O0"
50662      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50663        C_O_FLAG_DEBUG_JVM=""
50664      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50665        C_O_FLAG_DEBUG_JVM="-O0"
50666      fi
50667      C_O_FLAG_NONE="-O0"
50668    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50669      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50670        # On MacOSX we optimize for size, something
50671        # we should do for all platforms?
50672        C_O_FLAG_HIGHEST_JVM="-Os"
50673        C_O_FLAG_HIGHEST="-Os"
50674        C_O_FLAG_HI="-Os"
50675        C_O_FLAG_NORM="-Os"
50676        C_O_FLAG_SIZE="-Os"
50677      else
50678        C_O_FLAG_HIGHEST_JVM="-O3"
50679        C_O_FLAG_HIGHEST="-O3"
50680        C_O_FLAG_HI="-O3"
50681        C_O_FLAG_NORM="-O2"
50682        C_O_FLAG_SIZE="-Os"
50683      fi
50684      C_O_FLAG_DEBUG="-O0"
50685      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50686        C_O_FLAG_DEBUG_JVM=""
50687      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50688        C_O_FLAG_DEBUG_JVM="-O0"
50689      fi
50690      C_O_FLAG_NONE="-O0"
50691    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50692      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50693      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50694      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50695      C_O_FLAG_NORM="-O2"
50696      C_O_FLAG_DEBUG="-qnoopt"
50697      # FIXME: Value below not verified.
50698      C_O_FLAG_DEBUG_JVM=""
50699      C_O_FLAG_NONE="-qnoopt"
50700    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50701      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50702      C_O_FLAG_HIGHEST="-O2"
50703      C_O_FLAG_HI="-O1"
50704      C_O_FLAG_NORM="-O1"
50705      C_O_FLAG_DEBUG="-Od"
50706      C_O_FLAG_DEBUG_JVM=""
50707      C_O_FLAG_NONE="-Od"
50708      C_O_FLAG_SIZE="-Os"
50709    fi
50710    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50711    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50712    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50713    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50714    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50715    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50716    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50717    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50718  fi
50719
50720  # Adjust optimization flags according to debug level.
50721  case $DEBUG_LEVEL in
50722    release )
50723      # no adjustment
50724      ;;
50725    fastdebug )
50726      # Not quite so much optimization
50727      C_O_FLAG_HI="$C_O_FLAG_NORM"
50728      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50729      ;;
50730    slowdebug )
50731      # Disable optimization
50732      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50733      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50734      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50735      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50736      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50737      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50738      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50739      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50740      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50741      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50742      ;;
50743  esac
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764# Check whether --with-abi-profile was given.
50765if test "${with_abi_profile+set}" = set; then :
50766  withval=$with_abi_profile;
50767fi
50768
50769
50770  if test "x$with_abi_profile" != x; then
50771    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50772        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50773      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50774    fi
50775
50776    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50778$as_echo_n "checking for ABI profle... " >&6; }
50779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50780$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50781
50782    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50783      ARM_FLOAT_TYPE=vfp-sflt
50784      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50785    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50786      ARM_FLOAT_TYPE=vfp-hflt
50787      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50788    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50789      ARM_FLOAT_TYPE=sflt
50790      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50791    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50792      ARM_FLOAT_TYPE=vfp-sflt
50793      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50794    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50795      ARM_FLOAT_TYPE=vfp-hflt
50796      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50797    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50798      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50799      ARM_FLOAT_TYPE=
50800      ARM_ARCH_TYPE_FLAGS=
50801    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50802      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50803      ARM_FLOAT_TYPE=
50804      ARM_ARCH_TYPE_FLAGS=
50805    else
50806      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50807    fi
50808
50809    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50810      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50811    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50812      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50813    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50814      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50815    fi
50816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50817$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50819$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50820
50821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50822$as_echo_n "checking for arch type flags... " >&6; }
50823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50824$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50825
50826    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50827    # autoconf target triplet.
50828     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50829    # Sanity check that it is a known ABI.
50830    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50831        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50832        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50833          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50834$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50835    fi
50836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50837$as_echo_n "checking for ABI property name... " >&6; }
50838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50839$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50840
50841
50842    # Pass these on to the open part of configure as if they were set using
50843    # --with-extra-c[xx]flags.
50844    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50845    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50846    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50847    # FIXME: This should not really be set using extra_cflags.
50848    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50849        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50850        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50851    fi
50852    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50853    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50854    # And pass the architecture flags to the linker as well
50855    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50856  fi
50857
50858  # When building with an abi profile, the name of that profile is appended on the
50859  # bundle platform, which is used in bundle names.
50860  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50861    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50862  fi
50863
50864
50865  # Special extras...
50866  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50867    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50868      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50869      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50870    fi
50871    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50872    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50873  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50874    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50875    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50876  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50877    CXXSTD_CXXFLAG="-std=gnu++98"
50878
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920    # Execute function body
50921
50922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50923$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50924  supports=yes
50925
50926  saved_cxxflags="$CXXFLAGS"
50927  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50928  ac_ext=cpp
50929ac_cpp='$CXXCPP $CPPFLAGS'
50930ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50931ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50932ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50933
50934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50935/* end confdefs.h.  */
50936int i;
50937_ACEOF
50938if ac_fn_cxx_try_compile "$LINENO"; then :
50939
50940else
50941  supports=no
50942fi
50943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50944  ac_ext=cpp
50945ac_cpp='$CXXCPP $CPPFLAGS'
50946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50949
50950  CXXFLAGS="$saved_cxxflags"
50951
50952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50953$as_echo "$supports" >&6; }
50954  if test "x$supports" = "xyes" ; then
50955    :
50956
50957  else
50958    :
50959    CXXSTD_CXXFLAG=""
50960  fi
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50974    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50975
50976  fi
50977  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50978    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50979    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50980  fi
50981
50982  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50983  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50984  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50985
50986  ###############################################################################
50987  #
50988  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50989  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50990  #
50991
50992  # Setup compiler/platform specific flags into
50993  #    CFLAGS_JDK    - C Compiler flags
50994  #    CXXFLAGS_JDK  - C++ Compiler flags
50995  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50996  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50997    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50998    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50999    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51000    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51001      # Force compatibility with i586 on 32 bit intel platforms.
51002      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51003      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51004    fi
51005    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51006        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51007    case $OPENJDK_TARGET_CPU_ARCH in
51008      arm )
51009        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51010        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51011        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51012        ;;
51013      ppc )
51014        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51015        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51016        ;;
51017      s390 )
51018        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51019        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51020        ;;
51021      * )
51022        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51023        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51024        ;;
51025    esac
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080    # Execute function body
51081
51082  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51083  REFERENCE_VERSION=6
51084
51085  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51086    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51087  fi
51088
51089  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51090    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51091  fi
51092
51093  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51094  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51095
51096  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51097    :
51098
51099  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51100  # runs afoul of the more aggressive versions of these optimisations.
51101  # Notably, value range propagation now assumes that the this pointer of C++
51102  # member functions is non-null.
51103  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51104        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51105        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51106$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51107  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51108  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51109
51110  else
51111    :
51112
51113  fi
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51129    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51130
51131    # Restrict the debug information created by Clang to avoid
51132    # too big object files and speed the build up a little bit
51133    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51134    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51135    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51136      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51137        # Force compatibility with i586 on 32 bit intel platforms.
51138        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51139        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51140      fi
51141      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51142      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51143          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51144      case $OPENJDK_TARGET_CPU_ARCH in
51145        ppc )
51146          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51147          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51148          ;;
51149        * )
51150          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51151          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51152          ;;
51153      esac
51154    fi
51155  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51156    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51157    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51158    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51159      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51160    fi
51161
51162    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51163    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51164  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51165    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51166    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51167    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51168  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51169    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51170        -MD -Zc:wchar_t- -W3 -wd4800 \
51171        -DWIN32_LEAN_AND_MEAN \
51172        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51173        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51174        -DWIN32 -DIAL"
51175    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51176      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51177    else
51178      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51179    fi
51180    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51181    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51182    # studio.
51183    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51184      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51185      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51186      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51187    fi
51188  fi
51189
51190  ###############################################################################
51191
51192  # Adjust flags according to debug level.
51193  case $DEBUG_LEVEL in
51194    fastdebug | slowdebug )
51195      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51196      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51197      ;;
51198    release )
51199      ;;
51200    * )
51201      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51202      ;;
51203  esac
51204
51205  # Set some common defines. These works for all compilers, but assume
51206  # -D is universally accepted.
51207
51208  # Setup endianness
51209  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51210    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51211    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51212    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51213    #   Note: -Dmacro         is the same as    #define macro 1
51214    #         -Dmacro=        is the same as    #define macro
51215    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51216      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51217    else
51218      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51219    fi
51220  else
51221    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51222    # are defined in the system?
51223    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51224      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51225    else
51226      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51227    fi
51228  fi
51229
51230  # Setup target OS define. Use OS target name but in upper case.
51231  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51232  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51233
51234  # Setup target CPU
51235  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51236      $OPENJDK_TARGET_ADD_LP64 \
51237      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51238
51239  # Setup debug/release defines
51240  if test "x$DEBUG_LEVEL" = xrelease; then
51241    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51242    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51243      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51244    fi
51245  else
51246    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51247  fi
51248
51249  # Set some additional per-OS defines.
51250  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51251    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51252    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51253        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51254  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51255    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51256    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51257        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51258  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51259    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51260    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51261    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51262    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51263        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51264        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51265        -fno-omit-frame-pointer"
51266  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51267    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51268    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51269    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51270        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51271        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51272  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51273    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51274  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51275    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51276    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51277  fi
51278
51279  # Set some additional per-CPU defines.
51280  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51281    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51282  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51283    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51284  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51285    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51286      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51287      # fixes `relocation truncated to fit' error for gcc 4.1.
51288      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51289      # Use ppc64 instructions, but schedule for power5
51290      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51291    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51292      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51293    fi
51294  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51295    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51296      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51297      # Little endian machine uses ELFv2 ABI.
51298      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51299      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51300      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51301    fi
51302  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51303    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51304      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51305    fi
51306  fi
51307
51308  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51309    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51310  fi
51311
51312  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51313    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51314      # Solaris does not have _LP64=1 in the old build.
51315      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51316      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51317    fi
51318  fi
51319
51320  # Set JVM_CFLAGS warning handling
51321  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51322    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51323        -Wunused-value -Woverloaded-virtual"
51324
51325    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380    # Execute function body
51381
51382  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51383  REFERENCE_VERSION=4.8
51384
51385  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51386    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51387  fi
51388
51389  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51390    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51391  fi
51392
51393  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51394  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51395
51396  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51397    :
51398
51399            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51400            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51401
51402
51403  else
51404    :
51405
51406  fi
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421    fi
51422    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51423      # Non-zero builds have stricter warnings
51424      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51425    else
51426      if test "x$TOOLCHAIN_TYPE" = xclang; then
51427        # Some versions of llvm do not like -Wundef
51428        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51429      fi
51430    fi
51431  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51432    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51433        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51434  fi
51435
51436  # Additional macosx handling
51437  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51438    # Setting these parameters makes it an error to link to macosx APIs that are
51439    # newer than the given OS version and makes the linked binaries compatible
51440    # even if built on a newer version of the OS.
51441    # The expected format is X.Y.Z
51442    MACOSX_VERSION_MIN=10.7.0
51443
51444
51445    # The macro takes the version with no dots, ex: 1070
51446    # Let the flags variables get resolved in make for easier override on make
51447    # command line.
51448    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51449    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51450  fi
51451
51452  # Setup some hard coded includes
51453  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51454      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51455      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51456      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51457      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51458      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51459      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51460
51461  # The shared libraries are compiled using the picflag.
51462  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51463      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51464  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51465      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51466
51467  # Executable flags
51468  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51469  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51470
51471
51472
51473
51474
51475
51476  # Setup LDFLAGS et al.
51477  #
51478
51479  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51480    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51481    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51482    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51483    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51484      LDFLAGS_SAFESH="-safeseh"
51485      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51486      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51487      # NOTE: Old build added -machine. Probably not needed.
51488      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51489    else
51490      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51491    fi
51492  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51493      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51494      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51495        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51496        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51497    fi
51498  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51499    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51500    # We have previously set HAS_GNU_HASH if this is the case
51501    if test -n "$HAS_GNU_HASH"; then
51502      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51503      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51504      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51505    fi
51506      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51507        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51508    fi
51509    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51510      # And since we now know that the linker is gnu, then add -z defs, to forbid
51511      # undefined symbols in object files.
51512      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51513      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51514      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51515      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51516      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51517      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51518        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51519      fi
51520      case $DEBUG_LEVEL in
51521        release )
51522          # tell linker to optimize libraries.
51523          # Should this be supplied to the OSS linker as well?
51524          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51525          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51526          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51527          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51528            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51529          fi
51530          ;;
51531        slowdebug )
51532          # Hotspot always let the linker optimize
51533          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51534          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51535            # do relocations at load
51536            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51537            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51538            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51539          fi
51540          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51541            # mark relocations read only
51542            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51543            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51544            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51545          fi
51546          ;;
51547        fastdebug )
51548          # Hotspot always let the linker optimize
51549          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51550          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51551            # mark relocations read only
51552            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51553            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51554            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51555          fi
51556          ;;
51557        * )
51558          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51559          ;;
51560        esac
51561    fi
51562  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51563    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51564    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51565    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51566    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51567    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51568    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51569      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51570    fi
51571  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51572    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51573    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51574    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51575  fi
51576
51577  # Customize LDFLAGS for executables
51578
51579  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51580
51581  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51582    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51583      LDFLAGS_STACK_SIZE=1048576
51584    else
51585      LDFLAGS_STACK_SIZE=327680
51586    fi
51587    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51588  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51589    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51590  fi
51591
51592  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51593
51594  # Customize LDFLAGS for libs
51595  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51596
51597  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51598  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51599    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51600        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51601    JDKLIB_LIBS=""
51602  else
51603    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51604        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51605
51606    if test "xTARGET" = "xTARGET"; then
51607      # On some platforms (mac) the linker warns about non existing -L dirs.
51608      # For any of the variants server, client or minimal, the dir matches the
51609      # variant name. The "main" variant should be used for linking. For the
51610      # rest, the dir is just server.
51611      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51612          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51613        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51614            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51615      else
51616        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51617            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51618      fi
51619    elif test "xTARGET" = "xBUILD"; then
51620      # When building a buildjdk, it's always only the server variant
51621      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51622          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51623    fi
51624
51625    JDKLIB_LIBS="-ljava -ljvm"
51626    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51627      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51628    fi
51629
51630  fi
51631
51632LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51633
51634  # Set JVM_LIBS (per os)
51635  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51636    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51637  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51638    # FIXME: This hard-coded path is not really proper.
51639    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51640      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51641    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51642      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51643    fi
51644    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51645        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51646  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51647    JVM_LIBS="$JVM_LIBS -lm"
51648  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51649    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51650  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51651    JVM_LIBS="$JVM_LIBS -lm"
51652  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51653    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51654        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51655        wsock32.lib winmm.lib version.lib psapi.lib"
51656    fi
51657
51658  # Set JVM_ASFLAGS
51659  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51660    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51661      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51662    fi
51663  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51664    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51665  fi
51666
51667  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683  # Special extras...
51684  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51685    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51686      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51687      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51688    fi
51689    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51690    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51691  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51692    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51693    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51694  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51695    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738    # Execute function body
51739
51740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51741$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51742  supports=yes
51743
51744  saved_cxxflags="$CXXFLAGS"
51745  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51746  ac_ext=cpp
51747ac_cpp='$CXXCPP $CPPFLAGS'
51748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51751
51752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51753/* end confdefs.h.  */
51754int i;
51755_ACEOF
51756if ac_fn_cxx_try_compile "$LINENO"; then :
51757
51758else
51759  supports=no
51760fi
51761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51762  ac_ext=cpp
51763ac_cpp='$CXXCPP $CPPFLAGS'
51764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51767
51768  CXXFLAGS="$saved_cxxflags"
51769
51770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51771$as_echo "$supports" >&6; }
51772  if test "x$supports" = "xyes" ; then
51773    :
51774
51775  else
51776    :
51777    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51778  fi
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51792    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51793
51794  fi
51795  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51796    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51797    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51798  fi
51799
51800  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51801  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51802  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51803
51804  ###############################################################################
51805  #
51806  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51807  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51808  #
51809
51810  # Setup compiler/platform specific flags into
51811  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51812  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51813  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51814  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51815    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51816    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51817    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51818    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51819      # Force compatibility with i586 on 32 bit intel platforms.
51820      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51821      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51822    fi
51823    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51824        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51825    case $OPENJDK_BUILD_CPU_ARCH in
51826      arm )
51827        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51828        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51829        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51830        ;;
51831      ppc )
51832        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51833        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51834        ;;
51835      s390 )
51836        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51837        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51838        ;;
51839      * )
51840        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51841        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51842        ;;
51843    esac
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898    # Execute function body
51899
51900  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51901  REFERENCE_VERSION=6
51902
51903  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51904    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51905  fi
51906
51907  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51908    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51909  fi
51910
51911  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51912  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51913
51914  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51915    :
51916
51917  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51918  # runs afoul of the more aggressive versions of these optimisations.
51919  # Notably, value range propagation now assumes that the this pointer of C++
51920  # member functions is non-null.
51921  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51922        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51923        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51924$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51925  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51926  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51927
51928  else
51929    :
51930
51931  fi
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51947    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51948
51949    # Restrict the debug information created by Clang to avoid
51950    # too big object files and speed the build up a little bit
51951    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51952    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51953    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51954      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51955        # Force compatibility with i586 on 32 bit intel platforms.
51956        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51957        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51958      fi
51959      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51960      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51961          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51962      case $OPENJDK_BUILD_CPU_ARCH in
51963        ppc )
51964          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51965          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51966          ;;
51967        * )
51968          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51969          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51970          ;;
51971      esac
51972    fi
51973  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51974    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51975    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51976    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51977      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51978    fi
51979
51980    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51981    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51982  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51983    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51984    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51985    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51986  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51987    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51988        -MD -Zc:wchar_t- -W3 -wd4800 \
51989        -DWIN32_LEAN_AND_MEAN \
51990        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51991        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51992        -DWIN32 -DIAL"
51993    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51994      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51995    else
51996      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51997    fi
51998    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51999    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52000    # studio.
52001    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52002      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52003      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52004      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52005    fi
52006  fi
52007
52008  ###############################################################################
52009
52010  # Adjust flags according to debug level.
52011  case $DEBUG_LEVEL in
52012    fastdebug | slowdebug )
52013      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52014      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52015      ;;
52016    release )
52017      ;;
52018    * )
52019      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52020      ;;
52021  esac
52022
52023  # Set some common defines. These works for all compilers, but assume
52024  # -D is universally accepted.
52025
52026  # Setup endianness
52027  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52028    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52029    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52030    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52031    #   Note: -Dmacro         is the same as    #define macro 1
52032    #         -Dmacro=        is the same as    #define macro
52033    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52034      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52035    else
52036      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52037    fi
52038  else
52039    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52040    # are defined in the system?
52041    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52042      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52043    else
52044      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52045    fi
52046  fi
52047
52048  # Setup target OS define. Use OS target name but in upper case.
52049  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52050  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52051
52052  # Setup target CPU
52053  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52054      $OPENJDK_BUILD_ADD_LP64 \
52055      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52056
52057  # Setup debug/release defines
52058  if test "x$DEBUG_LEVEL" = xrelease; then
52059    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52060    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52061      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52062    fi
52063  else
52064    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52065  fi
52066
52067  # Set some additional per-OS defines.
52068  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52069    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52070    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52071        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52072  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52073    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52074    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52075        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
52076  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52077    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52078    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52079    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52080    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52081        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52082        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
52083        -fno-omit-frame-pointer"
52084  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52085    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52086    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52087    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52088        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52089        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52090  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52091    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52092  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52093    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52094    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52095  fi
52096
52097  # Set some additional per-CPU defines.
52098  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52099    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52100  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52101    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52102  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52103    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52104      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52105      # fixes `relocation truncated to fit' error for gcc 4.1.
52106      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52107      # Use ppc64 instructions, but schedule for power5
52108      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52109    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52110      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52111    fi
52112  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52113    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52114      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52115      # Little endian machine uses ELFv2 ABI.
52116      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52117      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52118      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52119    fi
52120  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52121    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52122      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52123    fi
52124  fi
52125
52126  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52127    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52128  fi
52129
52130  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52131    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52132      # Solaris does not have _LP64=1 in the old build.
52133      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52134      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52135    fi
52136  fi
52137
52138  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52139  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52140    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52141        -Wunused-value -Woverloaded-virtual"
52142
52143    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198    # Execute function body
52199
52200  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52201  REFERENCE_VERSION=4.8
52202
52203  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52204    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52205  fi
52206
52207  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52208    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52209  fi
52210
52211  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52212  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52213
52214  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52215    :
52216
52217            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52218            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52219
52220
52221  else
52222    :
52223
52224  fi
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239    fi
52240    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52241      # Non-zero builds have stricter warnings
52242      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52243    else
52244      if test "x$TOOLCHAIN_TYPE" = xclang; then
52245        # Some versions of llvm do not like -Wundef
52246        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52247      fi
52248    fi
52249  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52250    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52251        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52252  fi
52253
52254  # Additional macosx handling
52255  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52256    # Setting these parameters makes it an error to link to macosx APIs that are
52257    # newer than the given OS version and makes the linked binaries compatible
52258    # even if built on a newer version of the OS.
52259    # The expected format is X.Y.Z
52260    MACOSX_VERSION_MIN=10.7.0
52261
52262
52263    # The macro takes the version with no dots, ex: 1070
52264    # Let the flags variables get resolved in make for easier override on make
52265    # command line.
52266    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)"
52267    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52268  fi
52269
52270  # Setup some hard coded includes
52271  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52272      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52273      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52274      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52275      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52276      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52277      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52278
52279  # The shared libraries are compiled using the picflag.
52280  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52281      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52282  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52283      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52284
52285  # Executable flags
52286  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52287  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52288
52289
52290
52291
52292
52293
52294  # Setup LDFLAGS et al.
52295  #
52296
52297  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52298    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52299    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52300    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52301    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52302      LDFLAGS_SAFESH="-safeseh"
52303      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52304      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52305      # NOTE: Old build added -machine. Probably not needed.
52306      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52307    else
52308      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52309    fi
52310  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52311      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52312      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52313        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52314        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52315    fi
52316  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52317    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52318    # We have previously set HAS_GNU_HASH if this is the case
52319    if test -n "$HAS_GNU_HASH"; then
52320      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52321      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52322      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52323    fi
52324      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52325        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52326    fi
52327    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52328      # And since we now know that the linker is gnu, then add -z defs, to forbid
52329      # undefined symbols in object files.
52330      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52331      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52332      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52333      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52334      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52335      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52336        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52337      fi
52338      case $DEBUG_LEVEL in
52339        release )
52340          # tell linker to optimize libraries.
52341          # Should this be supplied to the OSS linker as well?
52342          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52343          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52344          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52345          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52346            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52347          fi
52348          ;;
52349        slowdebug )
52350          # Hotspot always let the linker optimize
52351          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52352          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52353            # do relocations at load
52354            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52355            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52356            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52357          fi
52358          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52359            # mark relocations read only
52360            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52361            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52362            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52363          fi
52364          ;;
52365        fastdebug )
52366          # Hotspot always let the linker optimize
52367          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52368          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52369            # mark relocations read only
52370            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52371            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52372            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52373          fi
52374          ;;
52375        * )
52376          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52377          ;;
52378        esac
52379    fi
52380  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52381    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52382    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52383    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52384    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52385    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52386    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52387      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52388    fi
52389  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52390    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52391    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52392    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52393  fi
52394
52395  # Customize LDFLAGS for executables
52396
52397  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52398
52399  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52400    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52401      LDFLAGS_STACK_SIZE=1048576
52402    else
52403      LDFLAGS_STACK_SIZE=327680
52404    fi
52405    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52406  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52407    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52408  fi
52409
52410  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52411
52412  # Customize LDFLAGS for libs
52413  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52414
52415  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52416  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52417    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52418        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52419    OPENJDK_BUILD_JDKLIB_LIBS=""
52420  else
52421    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52422        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52423
52424    if test "xBUILD" = "xTARGET"; then
52425      # On some platforms (mac) the linker warns about non existing -L dirs.
52426      # For any of the variants server, client or minimal, the dir matches the
52427      # variant name. The "main" variant should be used for linking. For the
52428      # rest, the dir is just server.
52429      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52430          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52431        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52432            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52433      else
52434        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52435            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52436      fi
52437    elif test "xBUILD" = "xBUILD"; then
52438      # When building a buildjdk, it's always only the server variant
52439      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52440          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52441    fi
52442
52443    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52444    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52445      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52446    fi
52447
52448  fi
52449
52450OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52451
52452  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52453  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52454    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52455  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52456    # FIXME: This hard-coded path is not really proper.
52457    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52458      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52459    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52460      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52461    fi
52462    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52463        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52464  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52465    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52466  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52467    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52468  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52469    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52470  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52471    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52472        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52473        wsock32.lib winmm.lib version.lib psapi.lib"
52474    fi
52475
52476  # Set OPENJDK_BUILD_JVM_ASFLAGS
52477  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52478    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52479      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52480    fi
52481  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52482    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52483  fi
52484
52485  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501  # Tests are only ever compiled for TARGET
52502  # Flags for compiling test libraries
52503  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52504  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52505
52506  # Flags for compiling test executables
52507  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52508  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52509
52510
52511
52512
52513
52514
52515  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52516  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52517
52518
52519
52520
52521
52522
52523  # Check that the compiler supports -mX (or -qX on AIX) flags
52524  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572    # Execute function body
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
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621    # Execute function body
52622
52623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52624$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52625  supports=yes
52626
52627  saved_cflags="$CFLAGS"
52628  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52629  ac_ext=c
52630ac_cpp='$CPP $CPPFLAGS'
52631ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52632ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52633ac_compiler_gnu=$ac_cv_c_compiler_gnu
52634
52635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52636/* end confdefs.h.  */
52637int i;
52638_ACEOF
52639if ac_fn_c_try_compile "$LINENO"; then :
52640
52641else
52642  supports=no
52643fi
52644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52645  ac_ext=cpp
52646ac_cpp='$CXXCPP $CPPFLAGS'
52647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52650
52651  CFLAGS="$saved_cflags"
52652
52653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52654$as_echo "$supports" >&6; }
52655  if test "x$supports" = "xyes" ; then
52656    :
52657    C_COMP_SUPPORTS="yes"
52658  else
52659    :
52660    C_COMP_SUPPORTS="no"
52661  fi
52662
52663
52664
52665
52666
52667
52668
52669
52670
52671
52672
52673
52674
52675
52676
52677
52678
52679
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721    # Execute function body
52722
52723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52724$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52725  supports=yes
52726
52727  saved_cxxflags="$CXXFLAGS"
52728  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52729  ac_ext=cpp
52730ac_cpp='$CXXCPP $CPPFLAGS'
52731ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52732ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52733ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52734
52735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52736/* end confdefs.h.  */
52737int i;
52738_ACEOF
52739if ac_fn_cxx_try_compile "$LINENO"; then :
52740
52741else
52742  supports=no
52743fi
52744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52745  ac_ext=cpp
52746ac_cpp='$CXXCPP $CPPFLAGS'
52747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52750
52751  CXXFLAGS="$saved_cxxflags"
52752
52753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52754$as_echo "$supports" >&6; }
52755  if test "x$supports" = "xyes" ; then
52756    :
52757    CXX_COMP_SUPPORTS="yes"
52758  else
52759    :
52760    CXX_COMP_SUPPORTS="no"
52761  fi
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52776$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52777  supports=no
52778  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52779
52780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52781$as_echo "$supports" >&6; }
52782  if test "x$supports" = "xyes" ; then
52783    :
52784    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52785  else
52786    :
52787    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52788  fi
52789
52790
52791
52792
52793
52794
52795
52796
52797  # Check whether --enable-warnings-as-errors was given.
52798if test "${enable_warnings_as_errors+set}" = set; then :
52799  enableval=$enable_warnings_as_errors;
52800fi
52801
52802
52803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52804$as_echo_n "checking if native warnings are errors... " >&6; }
52805  if test "x$enable_warnings_as_errors" = "xyes"; then
52806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52807$as_echo "yes (explicitly set)" >&6; }
52808    WARNINGS_AS_ERRORS=true
52809  elif test "x$enable_warnings_as_errors" = "xno"; then
52810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52811$as_echo "no" >&6; }
52812    WARNINGS_AS_ERRORS=false
52813  elif test "x$enable_warnings_as_errors" = "x"; then
52814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52815$as_echo "yes (default)" >&6; }
52816    WARNINGS_AS_ERRORS=true
52817  else
52818    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52819  fi
52820
52821
52822
52823  case "${TOOLCHAIN_TYPE}" in
52824    microsoft)
52825      DISABLE_WARNING_PREFIX="-wd"
52826      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52827      ;;
52828    solstudio)
52829      DISABLE_WARNING_PREFIX="-erroff="
52830      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52831      ;;
52832    gcc)
52833      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52834
52835
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    # Execute function body
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930    # Execute function body
52931
52932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52933$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52934  supports=yes
52935
52936  saved_cflags="$CFLAGS"
52937  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52938  ac_ext=c
52939ac_cpp='$CPP $CPPFLAGS'
52940ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52941ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52942ac_compiler_gnu=$ac_cv_c_compiler_gnu
52943
52944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52945/* end confdefs.h.  */
52946int i;
52947_ACEOF
52948if ac_fn_c_try_compile "$LINENO"; then :
52949
52950else
52951  supports=no
52952fi
52953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52954  ac_ext=cpp
52955ac_cpp='$CXXCPP $CPPFLAGS'
52956ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52957ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52958ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52959
52960  CFLAGS="$saved_cflags"
52961
52962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52963$as_echo "$supports" >&6; }
52964  if test "x$supports" = "xyes" ; then
52965    :
52966    C_COMP_SUPPORTS="yes"
52967  else
52968    :
52969    C_COMP_SUPPORTS="no"
52970  fi
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030    # Execute function body
53031
53032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53033$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53034  supports=yes
53035
53036  saved_cxxflags="$CXXFLAGS"
53037  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53038  ac_ext=cpp
53039ac_cpp='$CXXCPP $CPPFLAGS'
53040ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53041ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53042ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53043
53044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53045/* end confdefs.h.  */
53046int i;
53047_ACEOF
53048if ac_fn_cxx_try_compile "$LINENO"; then :
53049
53050else
53051  supports=no
53052fi
53053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53054  ac_ext=cpp
53055ac_cpp='$CXXCPP $CPPFLAGS'
53056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53059
53060  CXXFLAGS="$saved_cxxflags"
53061
53062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53063$as_echo "$supports" >&6; }
53064  if test "x$supports" = "xyes" ; then
53065    :
53066    CXX_COMP_SUPPORTS="yes"
53067  else
53068    :
53069    CXX_COMP_SUPPORTS="no"
53070  fi
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53085$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53086  supports=no
53087  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53088
53089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53090$as_echo "$supports" >&6; }
53091  if test "x$supports" = "xyes" ; then
53092    :
53093    GCC_CAN_DISABLE_WARNINGS=true
53094  else
53095    :
53096    GCC_CAN_DISABLE_WARNINGS=false
53097
53098  fi
53099
53100
53101
53102
53103
53104
53105      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53106        DISABLE_WARNING_PREFIX="-Wno-"
53107      else
53108        DISABLE_WARNING_PREFIX=
53109      fi
53110      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53111      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53112      # CFLAGS since any target specific flags will likely not work with the
53113      # build compiler
53114      CC_OLD="$CC"
53115      CXX_OLD="$CXX"
53116      CC="$BUILD_CC"
53117      CXX="$BUILD_CXX"
53118      CFLAGS_OLD="$CFLAGS"
53119      CFLAGS=""
53120
53121
53122
53123
53124
53125
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166
53167    # Execute function body
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214
53215
53216    # Execute function body
53217
53218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53219$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53220  supports=yes
53221
53222  saved_cflags="$CFLAGS"
53223  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53224  ac_ext=c
53225ac_cpp='$CPP $CPPFLAGS'
53226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53228ac_compiler_gnu=$ac_cv_c_compiler_gnu
53229
53230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53231/* end confdefs.h.  */
53232int i;
53233_ACEOF
53234if ac_fn_c_try_compile "$LINENO"; then :
53235
53236else
53237  supports=no
53238fi
53239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53240  ac_ext=cpp
53241ac_cpp='$CXXCPP $CPPFLAGS'
53242ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53243ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53244ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53245
53246  CFLAGS="$saved_cflags"
53247
53248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53249$as_echo "$supports" >&6; }
53250  if test "x$supports" = "xyes" ; then
53251    :
53252    C_COMP_SUPPORTS="yes"
53253  else
53254    :
53255    C_COMP_SUPPORTS="no"
53256  fi
53257
53258
53259
53260
53261
53262
53263
53264
53265
53266
53267
53268
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278
53279
53280
53281
53282
53283
53284
53285
53286
53287
53288
53289
53290
53291
53292
53293
53294
53295
53296
53297
53298
53299
53300
53301
53302
53303
53304
53305
53306
53307
53308
53309
53310
53311
53312
53313
53314
53315
53316    # Execute function body
53317
53318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53319$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53320  supports=yes
53321
53322  saved_cxxflags="$CXXFLAGS"
53323  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53324  ac_ext=cpp
53325ac_cpp='$CXXCPP $CPPFLAGS'
53326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53329
53330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53331/* end confdefs.h.  */
53332int i;
53333_ACEOF
53334if ac_fn_cxx_try_compile "$LINENO"; then :
53335
53336else
53337  supports=no
53338fi
53339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53340  ac_ext=cpp
53341ac_cpp='$CXXCPP $CPPFLAGS'
53342ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53343ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53344ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53345
53346  CXXFLAGS="$saved_cxxflags"
53347
53348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53349$as_echo "$supports" >&6; }
53350  if test "x$supports" = "xyes" ; then
53351    :
53352    CXX_COMP_SUPPORTS="yes"
53353  else
53354    :
53355    CXX_COMP_SUPPORTS="no"
53356  fi
53357
53358
53359
53360
53361
53362
53363
53364
53365
53366
53367
53368
53369
53370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53371$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53372  supports=no
53373  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53374
53375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53376$as_echo "$supports" >&6; }
53377  if test "x$supports" = "xyes" ; then
53378    :
53379    BUILD_CC_CAN_DISABLE_WARNINGS=true
53380  else
53381    :
53382    BUILD_CC_CAN_DISABLE_WARNINGS=false
53383
53384  fi
53385
53386
53387
53388
53389
53390
53391      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53392        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53393      else
53394        BUILD_CC_DISABLE_WARNING_PREFIX=
53395      fi
53396      CC="$CC_OLD"
53397      CXX="$CXX_OLD"
53398      CFLAGS="$CFLAGS_OLD"
53399      ;;
53400    clang)
53401      DISABLE_WARNING_PREFIX="-Wno-"
53402      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53403      ;;
53404    xlc)
53405      DISABLE_WARNING_PREFIX="-qsuppress="
53406      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53407      ;;
53408  esac
53409
53410
53411
53412
53413
53414# Setup debug symbols (need objcopy from the toolchain for that)
53415
53416  #
53417  # NATIVE_DEBUG_SYMBOLS
53418  # This must be done after the toolchain is setup, since we're looking at objcopy.
53419  #
53420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53421$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53422
53423# Check whether --with-native-debug-symbols was given.
53424if test "${with_native_debug_symbols+set}" = set; then :
53425  withval=$with_native_debug_symbols;
53426        if test "x$OPENJDK_TARGET_OS" = xaix; then
53427          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53428            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53429          fi
53430        fi
53431
53432else
53433
53434        if test "x$OPENJDK_TARGET_OS" = xaix; then
53435          # AIX doesn't support 'zipped' so use 'internal' as default
53436          with_native_debug_symbols="internal"
53437        else
53438          if test "x$STATIC_BUILD" = xtrue; then
53439            with_native_debug_symbols="none"
53440          else
53441            with_native_debug_symbols="zipped"
53442          fi
53443        fi
53444
53445fi
53446
53447  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53449$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53450
53451  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53452
53453    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53454      if test "x$OBJCOPY" = x; then
53455        # enabling of enable-debug-symbols and can't find objcopy
53456        # this is an error
53457        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53458      fi
53459    fi
53460
53461    COMPILE_WITH_DEBUG_SYMBOLS=true
53462    COPY_DEBUG_SYMBOLS=true
53463    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53464  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53465    COMPILE_WITH_DEBUG_SYMBOLS=false
53466    COPY_DEBUG_SYMBOLS=false
53467    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53468  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53469    COMPILE_WITH_DEBUG_SYMBOLS=true
53470    COPY_DEBUG_SYMBOLS=false
53471    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53472  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53473
53474    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53475      if test "x$OBJCOPY" = x; then
53476        # enabling of enable-debug-symbols and can't find objcopy
53477        # this is an error
53478        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53479      fi
53480    fi
53481
53482    COMPILE_WITH_DEBUG_SYMBOLS=true
53483    COPY_DEBUG_SYMBOLS=true
53484    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53485  else
53486    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53487  fi
53488
53489  # --enable-debug-symbols is deprecated.
53490  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53491
53492  # Check whether --enable-debug-symbols was given.
53493if test "${enable_debug_symbols+set}" = set; then :
53494  enableval=$enable_debug_symbols;
53495fi
53496
53497  if test "x$enable_debug_symbols" != x; then
53498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53499$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53500
53501    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53502      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53503$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53504    fi
53505
53506  fi
53507
53508
53509  # --enable-zip-debug-info is deprecated.
53510  # Please use --with-native-debug-symbols=zipped .
53511
53512  # Check whether --enable-zip-debug-info was given.
53513if test "${enable_zip_debug_info+set}" = set; then :
53514  enableval=$enable_zip_debug_info;
53515fi
53516
53517  if test "x$enable_zip_debug_info" != x; then
53518    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53519$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53520
53521    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53522      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53523$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53524    fi
53525
53526  fi
53527
53528
53529
53530
53531
53532
53533
53534  # Check whether --enable-native-coverage was given.
53535if test "${enable_native_coverage+set}" = set; then :
53536  enableval=$enable_native_coverage;
53537fi
53538
53539  GCOV_ENABLED="false"
53540  if test "x$enable_native_coverage" = "xyes"; then
53541    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53543$as_echo_n "checking if native coverage is enabled... " >&6; }
53544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53545$as_echo "yes" >&6; }
53546      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53547      GCOV_LDFLAGS="-fprofile-arcs"
53548      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53549      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53550      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53551      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53552      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53553      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53554      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53555      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53556      GCOV_ENABLED="true"
53557    else
53558      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53559    fi
53560  elif test "x$enable_native_coverage" = "xno"; then
53561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53562$as_echo_n "checking if native coverage is enabled... " >&6; }
53563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53564$as_echo "no" >&6; }
53565  elif test "x$enable_native_coverage" != "x"; then
53566    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53567  fi
53568
53569
53570
53571
53572# Need toolchain to setup dtrace
53573
53574  # Test for dtrace dependencies
53575  # Check whether --enable-dtrace was given.
53576if test "${enable_dtrace+set}" = set; then :
53577  enableval=$enable_dtrace;
53578fi
53579
53580
53581  DTRACE_DEP_MISSING=false
53582
53583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53584$as_echo_n "checking for dtrace tool... " >&6; }
53585  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53587$as_echo "$DTRACE" >&6; }
53588  else
53589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53590$as_echo "not found, cannot build dtrace" >&6; }
53591    DTRACE_DEP_MISSING=true
53592  fi
53593
53594  for ac_header in sys/sdt.h
53595do :
53596  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53597if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53598  cat >>confdefs.h <<_ACEOF
53599#define HAVE_SYS_SDT_H 1
53600_ACEOF
53601 DTRACE_HEADERS_OK=yes
53602else
53603  DTRACE_HEADERS_OK=no
53604fi
53605
53606done
53607
53608  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53609    DTRACE_DEP_MISSING=true
53610  fi
53611
53612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53613$as_echo_n "checking if dtrace should be built... " >&6; }
53614  if test "x$enable_dtrace" = "xyes"; then
53615    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53617$as_echo "no, missing dependencies" >&6; }
53618
53619  # Print a helpful message on how to acquire the necessary build dependency.
53620  # dtrace is the help tag: freetype, cups, alsa etc
53621  MISSING_DEPENDENCY=dtrace
53622
53623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53624    cygwin_help $MISSING_DEPENDENCY
53625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53626    msys_help $MISSING_DEPENDENCY
53627  else
53628    PKGHANDLER_COMMAND=
53629
53630    case $PKGHANDLER in
53631      apt-get)
53632        apt_help     $MISSING_DEPENDENCY ;;
53633      yum)
53634        yum_help     $MISSING_DEPENDENCY ;;
53635      brew)
53636        brew_help    $MISSING_DEPENDENCY ;;
53637      port)
53638        port_help    $MISSING_DEPENDENCY ;;
53639      pkgutil)
53640        pkgutil_help $MISSING_DEPENDENCY ;;
53641      pkgadd)
53642        pkgadd_help  $MISSING_DEPENDENCY ;;
53643    esac
53644
53645    if test "x$PKGHANDLER_COMMAND" != x; then
53646      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53647    fi
53648  fi
53649
53650      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53651    else
53652      INCLUDE_DTRACE=true
53653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53654$as_echo "yes, forced" >&6; }
53655    fi
53656  elif test "x$enable_dtrace" = "xno"; then
53657    INCLUDE_DTRACE=false
53658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53659$as_echo "no, forced" >&6; }
53660  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53661    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53662      INCLUDE_DTRACE=false
53663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53664$as_echo "no, missing dependencies" >&6; }
53665    else
53666      INCLUDE_DTRACE=true
53667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53668$as_echo "yes, dependencies present" >&6; }
53669    fi
53670  else
53671    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53672  fi
53673
53674
53675  # Check whether --enable-aot was given.
53676if test "${enable_aot+set}" = set; then :
53677  enableval=$enable_aot;
53678fi
53679
53680
53681  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53682    ENABLE_AOT="true"
53683  elif test "x$enable_aot" = "xyes"; then
53684    ENABLE_AOT="true"
53685  elif test "x$enable_aot" = "xno"; then
53686    ENABLE_AOT="false"
53687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53688$as_echo_n "checking if aot should be enabled... " >&6; }
53689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53690$as_echo "no, forced" >&6; }
53691  else
53692    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53693  fi
53694
53695  if test "x$ENABLE_AOT" = "xtrue"; then
53696    # Only enable AOT on linux-X64.
53697    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53698      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53699        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53700          ENABLE_AOT="true"
53701        else
53702          ENABLE_AOT="false"
53703          if test "x$enable_aot" = "xyes"; then
53704            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53705          fi
53706        fi
53707      else
53708        ENABLE_AOT="false"
53709        if test "x$enable_aot" = "xyes"; then
53710          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53711        fi
53712      fi
53713    else
53714      ENABLE_AOT="false"
53715      if test "x$enable_aot" = "xyes"; then
53716        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53717      fi
53718    fi
53719  fi
53720
53721
53722
53723
53724  # Check whether --enable-hotspot-gtest was given.
53725if test "${enable_hotspot_gtest+set}" = set; then :
53726  enableval=$enable_hotspot_gtest;
53727fi
53728
53729
53730  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53731    GTEST_DIR_EXISTS="true"
53732  else
53733    GTEST_DIR_EXISTS="false"
53734  fi
53735
53736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53737$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53738  if test "x$enable_hotspot_gtest" = "xyes"; then
53739    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53741$as_echo "yes, forced" >&6; }
53742      BUILD_GTEST="true"
53743    else
53744      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53745    fi
53746  elif test "x$enable_hotspot_gtest" = "xno"; then
53747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53748$as_echo "no, forced" >&6; }
53749    BUILD_GTEST="false"
53750  elif test "x$enable_hotspot_gtest" = "x"; then
53751    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53753$as_echo "yes" >&6; }
53754      BUILD_GTEST="true"
53755    else
53756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53757$as_echo "no" >&6; }
53758      BUILD_GTEST="false"
53759    fi
53760  else
53761    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53762  fi
53763
53764
53765
53766
53767###############################################################################
53768#
53769# Check dependencies for external and internal libraries.
53770#
53771###############################################################################
53772
53773# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53774
53775  # When using cygwin or msys, we need a wrapper binary that renames
53776  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53777  # @files and rewrites these too! This wrapper binary is
53778  # called fixpath.
53779  FIXPATH=
53780  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53782$as_echo_n "checking if fixpath can be created... " >&6; }
53783    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53784    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53785    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53786    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53787      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53788      FIXPATH="$FIXPATH_BIN -c"
53789    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53790      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53791      # @ was chosen as separator to minimize risk of other tools messing around with it
53792      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53793          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53794      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53795      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53796    fi
53797    FIXPATH_SRC_W="$FIXPATH_SRC"
53798    FIXPATH_BIN_W="$FIXPATH_BIN"
53799
53800  unix_path="$FIXPATH_SRC_W"
53801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53802    windows_path=`$CYGPATH -m "$unix_path"`
53803    FIXPATH_SRC_W="$windows_path"
53804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53805    windows_path=`cmd //c echo $unix_path`
53806    FIXPATH_SRC_W="$windows_path"
53807  fi
53808
53809
53810  unix_path="$FIXPATH_BIN_W"
53811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53812    windows_path=`$CYGPATH -m "$unix_path"`
53813    FIXPATH_BIN_W="$windows_path"
53814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53815    windows_path=`cmd //c echo $unix_path`
53816    FIXPATH_BIN_W="$windows_path"
53817  fi
53818
53819    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53820    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53821    cd $FIXPATH_DIR
53822    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53823    cd $CURDIR
53824
53825    if test ! -x $FIXPATH_BIN; then
53826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53827$as_echo "no" >&6; }
53828      cat $FIXPATH_DIR/fixpath1.log
53829      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53830    fi
53831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53832$as_echo "yes" >&6; }
53833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53834$as_echo_n "checking if fixpath.exe works... " >&6; }
53835    cd $FIXPATH_DIR
53836    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53837        > $FIXPATH_DIR/fixpath2.log 2>&1
53838    cd $CURDIR
53839    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53841$as_echo "no" >&6; }
53842      cat $FIXPATH_DIR/fixpath2.log
53843      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53844    fi
53845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53846$as_echo "yes" >&6; }
53847
53848    FIXPATH_DETACH_FLAG="--detach"
53849  fi
53850
53851
53852
53853
53854
53855
53856  # Check if X11 is needed
53857  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53858    # No X11 support on windows or macosx
53859    NEEDS_LIB_X11=false
53860  else
53861    # All other instances need X11, even if building headless only, libawt still
53862    # needs X11 headers.
53863    NEEDS_LIB_X11=true
53864  fi
53865
53866  # Check if cups is needed
53867  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53868    # Windows have a separate print system
53869    NEEDS_LIB_CUPS=false
53870  else
53871    NEEDS_LIB_CUPS=true
53872  fi
53873
53874  # A custom hook may have set this already
53875  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53876    NEEDS_LIB_FREETYPE=true
53877  fi
53878
53879  # Check if alsa is needed
53880  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53881    NEEDS_LIB_ALSA=true
53882  else
53883    NEEDS_LIB_ALSA=false
53884  fi
53885
53886  # Check if ffi is needed
53887  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53888    NEEDS_LIB_FFI=true
53889  else
53890    NEEDS_LIB_FFI=false
53891  fi
53892
53893
53894  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53895  # dynamic build is configured on command line.
53896
53897# Check whether --with-stdc++lib was given.
53898if test "${with_stdc__lib+set}" = set; then :
53899  withval=$with_stdc__lib;
53900        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53901                && test "x$with_stdc__lib" != xdefault; then
53902          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53903        fi
53904
53905else
53906  with_stdc__lib=default
53907
53908fi
53909
53910
53911  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53912    # Test if stdc++ can be linked statically.
53913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53914$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53915    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53916    ac_ext=cpp
53917ac_cpp='$CXXCPP $CPPFLAGS'
53918ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53919ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53920ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53921
53922    OLD_LIBS="$LIBS"
53923    LIBS="$STATIC_STDCXX_FLAGS"
53924    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53925/* end confdefs.h.  */
53926
53927int
53928main ()
53929{
53930return 0;
53931  ;
53932  return 0;
53933}
53934_ACEOF
53935if ac_fn_cxx_try_link "$LINENO"; then :
53936  has_static_libstdcxx=yes
53937else
53938  has_static_libstdcxx=no
53939fi
53940rm -f core conftest.err conftest.$ac_objext \
53941    conftest$ac_exeext conftest.$ac_ext
53942    LIBS="$OLD_LIBS"
53943    ac_ext=cpp
53944ac_cpp='$CXXCPP $CPPFLAGS'
53945ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53946ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53947ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53948
53949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53950$as_echo "$has_static_libstdcxx" >&6; }
53951
53952    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53953      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53954    fi
53955
53956    # If dynamic was requested, it's available since it would fail above otherwise.
53957    # If dynamic wasn't requested, go with static unless it isn't available.
53958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53959$as_echo_n "checking how to link with libstdc++... " >&6; }
53960    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53961        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53963$as_echo "dynamic" >&6; }
53964    else
53965      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53966      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53967      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53968      # just use the same setting as for the TARGET toolchain.
53969      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53971$as_echo "static" >&6; }
53972    fi
53973  fi
53974
53975  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53976  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53977    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53978  fi
53979
53980
53981
53982  # Setup Windows runtime dlls
53983  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53984
53985
53986# Check whether --with-msvcr-dll was given.
53987if test "${with_msvcr_dll+set}" = set; then :
53988  withval=$with_msvcr_dll;
53989fi
53990
53991
53992  if test "x$with_msvcr_dll" != x; then
53993    # If given explicitly by user, do not probe. If not present, fail directly.
53994
53995  DLL_NAME="$MSVCR_NAME"
53996  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53997  METHOD="--with-msvcr-dll"
53998  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53999    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54000$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54001
54002    # Need to check if the found msvcr is correct architecture
54003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54004$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54005    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54007      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54008      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54009      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54010        CORRECT_MSVCR_ARCH="PE32 executable"
54011      else
54012        CORRECT_MSVCR_ARCH="PE32+ executable"
54013      fi
54014    else
54015      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54016        CORRECT_MSVCR_ARCH=386
54017      else
54018        CORRECT_MSVCR_ARCH=x86-64
54019      fi
54020    fi
54021    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54023$as_echo "ok" >&6; }
54024      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54025
54026  # Only process if variable expands to non-empty
54027
54028  if test "x$MSVC_DLL" != x; then
54029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54030
54031  # Input might be given as Windows format, start by converting to
54032  # unix format.
54033  path="$MSVC_DLL"
54034  new_path=`$CYGPATH -u "$path"`
54035
54036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54039  # "foo.exe" is OK but "foo" is an error.
54040  #
54041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54042  # It is also a way to make sure we got the proper file name for the real test later on.
54043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54044  if test "x$test_shortpath" = x; then
54045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54046$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54047    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54048  fi
54049
54050  # Call helper function which possibly converts this using DOS-style short mode.
54051  # If so, the updated path is stored in $new_path.
54052
54053  input_path="$new_path"
54054  # Check if we need to convert this using DOS-style short mode. If the path
54055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54056  # take no chances and rewrite it.
54057  # Note: m4 eats our [], so we need to use [ and ] instead.
54058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54059  if test "x$has_forbidden_chars" != x; then
54060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54064      # Going to short mode and back again did indeed matter. Since short mode is
54065      # case insensitive, let's make it lowercase to improve readability.
54066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54067      # Now convert it back to Unix-style (cygpath)
54068      input_path=`$CYGPATH -u "$shortmode_path"`
54069      new_path="$input_path"
54070    fi
54071  fi
54072
54073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54074  if test "x$test_cygdrive_prefix" = x; then
54075    # As a simple fix, exclude /usr/bin since it's not a real path.
54076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54078      # a path prefixed by /cygdrive for fixpath to work.
54079      new_path="$CYGWIN_ROOT_PATH$input_path"
54080    fi
54081  fi
54082
54083
54084  if test "x$path" != "x$new_path"; then
54085    MSVC_DLL="$new_path"
54086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54087$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54088  fi
54089
54090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54091
54092  path="$MSVC_DLL"
54093  has_colon=`$ECHO $path | $GREP ^.:`
54094  new_path="$path"
54095  if test "x$has_colon" = x; then
54096    # Not in mixed or Windows style, start by that.
54097    new_path=`cmd //c echo $path`
54098  fi
54099
54100
54101  input_path="$new_path"
54102  # Check if we need to convert this using DOS-style short mode. If the path
54103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54104  # take no chances and rewrite it.
54105  # Note: m4 eats our [], so we need to use [ and ] instead.
54106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54107  if test "x$has_forbidden_chars" != x; then
54108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54110  fi
54111
54112
54113  windows_path="$new_path"
54114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54115    unix_path=`$CYGPATH -u "$windows_path"`
54116    new_path="$unix_path"
54117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54119    new_path="$unix_path"
54120  fi
54121
54122  if test "x$path" != "x$new_path"; then
54123    MSVC_DLL="$new_path"
54124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54125$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54126  fi
54127
54128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54130
54131    else
54132      # We're on a unix platform. Hooray! :)
54133      path="$MSVC_DLL"
54134      has_space=`$ECHO "$path" | $GREP " "`
54135      if test "x$has_space" != x; then
54136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54137$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54138        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54139      fi
54140
54141      # Use eval to expand a potential ~
54142      eval path="$path"
54143      if test ! -f "$path" && test ! -d "$path"; then
54144        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54145      fi
54146
54147      if test -d "$path"; then
54148        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54149      else
54150        dir="`$DIRNAME "$path"`"
54151        base="`$BASENAME "$path"`"
54152        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54153      fi
54154    fi
54155  fi
54156
54157      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54158$as_echo_n "checking for $DLL_NAME... " >&6; }
54159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54160$as_echo "$MSVC_DLL" >&6; }
54161    else
54162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54163$as_echo "incorrect, ignoring" >&6; }
54164      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54165$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54166    fi
54167  fi
54168
54169    if test "x$MSVC_DLL" = x; then
54170      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54171    fi
54172    MSVCR_DLL="$MSVC_DLL"
54173  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54174
54175  DLL_NAME="$MSVCR_NAME"
54176  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54177  METHOD="devkit"
54178  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54179    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54180$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54181
54182    # Need to check if the found msvcr is correct architecture
54183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54184$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54185    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54187      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54188      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54189      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54190        CORRECT_MSVCR_ARCH="PE32 executable"
54191      else
54192        CORRECT_MSVCR_ARCH="PE32+ executable"
54193      fi
54194    else
54195      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54196        CORRECT_MSVCR_ARCH=386
54197      else
54198        CORRECT_MSVCR_ARCH=x86-64
54199      fi
54200    fi
54201    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54203$as_echo "ok" >&6; }
54204      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54205
54206  # Only process if variable expands to non-empty
54207
54208  if test "x$MSVC_DLL" != x; then
54209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54210
54211  # Input might be given as Windows format, start by converting to
54212  # unix format.
54213  path="$MSVC_DLL"
54214  new_path=`$CYGPATH -u "$path"`
54215
54216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54219  # "foo.exe" is OK but "foo" is an error.
54220  #
54221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54222  # It is also a way to make sure we got the proper file name for the real test later on.
54223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54224  if test "x$test_shortpath" = x; then
54225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54226$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54227    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54228  fi
54229
54230  # Call helper function which possibly converts this using DOS-style short mode.
54231  # If so, the updated path is stored in $new_path.
54232
54233  input_path="$new_path"
54234  # Check if we need to convert this using DOS-style short mode. If the path
54235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54236  # take no chances and rewrite it.
54237  # Note: m4 eats our [], so we need to use [ and ] instead.
54238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54239  if test "x$has_forbidden_chars" != x; then
54240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54244      # Going to short mode and back again did indeed matter. Since short mode is
54245      # case insensitive, let's make it lowercase to improve readability.
54246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54247      # Now convert it back to Unix-style (cygpath)
54248      input_path=`$CYGPATH -u "$shortmode_path"`
54249      new_path="$input_path"
54250    fi
54251  fi
54252
54253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54254  if test "x$test_cygdrive_prefix" = x; then
54255    # As a simple fix, exclude /usr/bin since it's not a real path.
54256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54258      # a path prefixed by /cygdrive for fixpath to work.
54259      new_path="$CYGWIN_ROOT_PATH$input_path"
54260    fi
54261  fi
54262
54263
54264  if test "x$path" != "x$new_path"; then
54265    MSVC_DLL="$new_path"
54266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54267$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54268  fi
54269
54270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54271
54272  path="$MSVC_DLL"
54273  has_colon=`$ECHO $path | $GREP ^.:`
54274  new_path="$path"
54275  if test "x$has_colon" = x; then
54276    # Not in mixed or Windows style, start by that.
54277    new_path=`cmd //c echo $path`
54278  fi
54279
54280
54281  input_path="$new_path"
54282  # Check if we need to convert this using DOS-style short mode. If the path
54283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54284  # take no chances and rewrite it.
54285  # Note: m4 eats our [], so we need to use [ and ] instead.
54286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54287  if test "x$has_forbidden_chars" != x; then
54288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54290  fi
54291
54292
54293  windows_path="$new_path"
54294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54295    unix_path=`$CYGPATH -u "$windows_path"`
54296    new_path="$unix_path"
54297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54299    new_path="$unix_path"
54300  fi
54301
54302  if test "x$path" != "x$new_path"; then
54303    MSVC_DLL="$new_path"
54304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54305$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54306  fi
54307
54308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54310
54311    else
54312      # We're on a unix platform. Hooray! :)
54313      path="$MSVC_DLL"
54314      has_space=`$ECHO "$path" | $GREP " "`
54315      if test "x$has_space" != x; then
54316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54317$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54319      fi
54320
54321      # Use eval to expand a potential ~
54322      eval path="$path"
54323      if test ! -f "$path" && test ! -d "$path"; then
54324        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54325      fi
54326
54327      if test -d "$path"; then
54328        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54329      else
54330        dir="`$DIRNAME "$path"`"
54331        base="`$BASENAME "$path"`"
54332        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54333      fi
54334    fi
54335  fi
54336
54337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54338$as_echo_n "checking for $DLL_NAME... " >&6; }
54339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54340$as_echo "$MSVC_DLL" >&6; }
54341    else
54342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54343$as_echo "incorrect, ignoring" >&6; }
54344      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54345$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54346    fi
54347  fi
54348
54349    if test "x$MSVC_DLL" = x; then
54350      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54351    fi
54352    MSVCR_DLL="$MSVC_DLL"
54353  else
54354
54355  DLL_NAME="${MSVCR_NAME}"
54356  MSVC_DLL=
54357
54358  if test "x$MSVC_DLL" = x; then
54359    # Probe: Using well-known location from Visual Studio 10.0
54360    if test "x$VCINSTALLDIR" != x; then
54361      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54362
54363  windows_path="$CYGWIN_VC_INSTALL_DIR"
54364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54365    unix_path=`$CYGPATH -u "$windows_path"`
54366    CYGWIN_VC_INSTALL_DIR="$unix_path"
54367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54369    CYGWIN_VC_INSTALL_DIR="$unix_path"
54370  fi
54371
54372      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54373        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54374      else
54375        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54376      fi
54377      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54378
54379  DLL_NAME="$DLL_NAME"
54380  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54381  METHOD="well-known location in VCINSTALLDIR"
54382  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54384$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54385
54386    # Need to check if the found msvcr is correct architecture
54387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54388$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54389    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54391      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54392      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54393      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54394        CORRECT_MSVCR_ARCH="PE32 executable"
54395      else
54396        CORRECT_MSVCR_ARCH="PE32+ executable"
54397      fi
54398    else
54399      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54400        CORRECT_MSVCR_ARCH=386
54401      else
54402        CORRECT_MSVCR_ARCH=x86-64
54403      fi
54404    fi
54405    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54407$as_echo "ok" >&6; }
54408      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54409
54410  # Only process if variable expands to non-empty
54411
54412  if test "x$MSVC_DLL" != x; then
54413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54414
54415  # Input might be given as Windows format, start by converting to
54416  # unix format.
54417  path="$MSVC_DLL"
54418  new_path=`$CYGPATH -u "$path"`
54419
54420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54423  # "foo.exe" is OK but "foo" is an error.
54424  #
54425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54426  # It is also a way to make sure we got the proper file name for the real test later on.
54427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54428  if test "x$test_shortpath" = x; then
54429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54430$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54431    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54432  fi
54433
54434  # Call helper function which possibly converts this using DOS-style short mode.
54435  # If so, the updated path is stored in $new_path.
54436
54437  input_path="$new_path"
54438  # Check if we need to convert this using DOS-style short mode. If the path
54439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54440  # take no chances and rewrite it.
54441  # Note: m4 eats our [], so we need to use [ and ] instead.
54442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54443  if test "x$has_forbidden_chars" != x; then
54444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54448      # Going to short mode and back again did indeed matter. Since short mode is
54449      # case insensitive, let's make it lowercase to improve readability.
54450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54451      # Now convert it back to Unix-style (cygpath)
54452      input_path=`$CYGPATH -u "$shortmode_path"`
54453      new_path="$input_path"
54454    fi
54455  fi
54456
54457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54458  if test "x$test_cygdrive_prefix" = x; then
54459    # As a simple fix, exclude /usr/bin since it's not a real path.
54460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54462      # a path prefixed by /cygdrive for fixpath to work.
54463      new_path="$CYGWIN_ROOT_PATH$input_path"
54464    fi
54465  fi
54466
54467
54468  if test "x$path" != "x$new_path"; then
54469    MSVC_DLL="$new_path"
54470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54471$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54472  fi
54473
54474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54475
54476  path="$MSVC_DLL"
54477  has_colon=`$ECHO $path | $GREP ^.:`
54478  new_path="$path"
54479  if test "x$has_colon" = x; then
54480    # Not in mixed or Windows style, start by that.
54481    new_path=`cmd //c echo $path`
54482  fi
54483
54484
54485  input_path="$new_path"
54486  # Check if we need to convert this using DOS-style short mode. If the path
54487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54488  # take no chances and rewrite it.
54489  # Note: m4 eats our [], so we need to use [ and ] instead.
54490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54491  if test "x$has_forbidden_chars" != x; then
54492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54494  fi
54495
54496
54497  windows_path="$new_path"
54498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54499    unix_path=`$CYGPATH -u "$windows_path"`
54500    new_path="$unix_path"
54501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54503    new_path="$unix_path"
54504  fi
54505
54506  if test "x$path" != "x$new_path"; then
54507    MSVC_DLL="$new_path"
54508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54509$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54510  fi
54511
54512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54514
54515    else
54516      # We're on a unix platform. Hooray! :)
54517      path="$MSVC_DLL"
54518      has_space=`$ECHO "$path" | $GREP " "`
54519      if test "x$has_space" != x; then
54520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54521$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54522        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54523      fi
54524
54525      # Use eval to expand a potential ~
54526      eval path="$path"
54527      if test ! -f "$path" && test ! -d "$path"; then
54528        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54529      fi
54530
54531      if test -d "$path"; then
54532        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54533      else
54534        dir="`$DIRNAME "$path"`"
54535        base="`$BASENAME "$path"`"
54536        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54537      fi
54538    fi
54539  fi
54540
54541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54542$as_echo_n "checking for $DLL_NAME... " >&6; }
54543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54544$as_echo "$MSVC_DLL" >&6; }
54545    else
54546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54547$as_echo "incorrect, ignoring" >&6; }
54548      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54549$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54550    fi
54551  fi
54552
54553    fi
54554  fi
54555
54556  if test "x$MSVC_DLL" = x; then
54557    # Probe: Check in the Boot JDK directory.
54558    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54559
54560  DLL_NAME="$DLL_NAME"
54561  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54562  METHOD="well-known location in Boot JDK"
54563  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54564    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54565$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54566
54567    # Need to check if the found msvcr is correct architecture
54568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54569$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54570    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54572      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54573      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54574      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54575        CORRECT_MSVCR_ARCH="PE32 executable"
54576      else
54577        CORRECT_MSVCR_ARCH="PE32+ executable"
54578      fi
54579    else
54580      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54581        CORRECT_MSVCR_ARCH=386
54582      else
54583        CORRECT_MSVCR_ARCH=x86-64
54584      fi
54585    fi
54586    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54588$as_echo "ok" >&6; }
54589      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54590
54591  # Only process if variable expands to non-empty
54592
54593  if test "x$MSVC_DLL" != x; then
54594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54595
54596  # Input might be given as Windows format, start by converting to
54597  # unix format.
54598  path="$MSVC_DLL"
54599  new_path=`$CYGPATH -u "$path"`
54600
54601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54604  # "foo.exe" is OK but "foo" is an error.
54605  #
54606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54607  # It is also a way to make sure we got the proper file name for the real test later on.
54608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54609  if test "x$test_shortpath" = x; then
54610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54611$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54612    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54613  fi
54614
54615  # Call helper function which possibly converts this using DOS-style short mode.
54616  # If so, the updated path is stored in $new_path.
54617
54618  input_path="$new_path"
54619  # Check if we need to convert this using DOS-style short mode. If the path
54620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54621  # take no chances and rewrite it.
54622  # Note: m4 eats our [], so we need to use [ and ] instead.
54623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54624  if test "x$has_forbidden_chars" != x; then
54625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54629      # Going to short mode and back again did indeed matter. Since short mode is
54630      # case insensitive, let's make it lowercase to improve readability.
54631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54632      # Now convert it back to Unix-style (cygpath)
54633      input_path=`$CYGPATH -u "$shortmode_path"`
54634      new_path="$input_path"
54635    fi
54636  fi
54637
54638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54639  if test "x$test_cygdrive_prefix" = x; then
54640    # As a simple fix, exclude /usr/bin since it's not a real path.
54641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54643      # a path prefixed by /cygdrive for fixpath to work.
54644      new_path="$CYGWIN_ROOT_PATH$input_path"
54645    fi
54646  fi
54647
54648
54649  if test "x$path" != "x$new_path"; then
54650    MSVC_DLL="$new_path"
54651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54652$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54653  fi
54654
54655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54656
54657  path="$MSVC_DLL"
54658  has_colon=`$ECHO $path | $GREP ^.:`
54659  new_path="$path"
54660  if test "x$has_colon" = x; then
54661    # Not in mixed or Windows style, start by that.
54662    new_path=`cmd //c echo $path`
54663  fi
54664
54665
54666  input_path="$new_path"
54667  # Check if we need to convert this using DOS-style short mode. If the path
54668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54669  # take no chances and rewrite it.
54670  # Note: m4 eats our [], so we need to use [ and ] instead.
54671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54672  if test "x$has_forbidden_chars" != x; then
54673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54675  fi
54676
54677
54678  windows_path="$new_path"
54679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54680    unix_path=`$CYGPATH -u "$windows_path"`
54681    new_path="$unix_path"
54682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54684    new_path="$unix_path"
54685  fi
54686
54687  if test "x$path" != "x$new_path"; then
54688    MSVC_DLL="$new_path"
54689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54690$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54691  fi
54692
54693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54695
54696    else
54697      # We're on a unix platform. Hooray! :)
54698      path="$MSVC_DLL"
54699      has_space=`$ECHO "$path" | $GREP " "`
54700      if test "x$has_space" != x; then
54701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54702$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54704      fi
54705
54706      # Use eval to expand a potential ~
54707      eval path="$path"
54708      if test ! -f "$path" && test ! -d "$path"; then
54709        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54710      fi
54711
54712      if test -d "$path"; then
54713        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54714      else
54715        dir="`$DIRNAME "$path"`"
54716        base="`$BASENAME "$path"`"
54717        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54718      fi
54719    fi
54720  fi
54721
54722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54723$as_echo_n "checking for $DLL_NAME... " >&6; }
54724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54725$as_echo "$MSVC_DLL" >&6; }
54726    else
54727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54728$as_echo "incorrect, ignoring" >&6; }
54729      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54730$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54731    fi
54732  fi
54733
54734  fi
54735
54736  if test "x$MSVC_DLL" = x; then
54737    # Probe: Look in the Windows system32 directory
54738    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54739
54740  windows_path="$CYGWIN_SYSTEMROOT"
54741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54742    unix_path=`$CYGPATH -u "$windows_path"`
54743    CYGWIN_SYSTEMROOT="$unix_path"
54744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54746    CYGWIN_SYSTEMROOT="$unix_path"
54747  fi
54748
54749    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54750
54751  DLL_NAME="$DLL_NAME"
54752  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54753  METHOD="well-known location in SYSTEMROOT"
54754  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54756$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54757
54758    # Need to check if the found msvcr is correct architecture
54759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54760$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54761    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54763      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54764      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54765      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54766        CORRECT_MSVCR_ARCH="PE32 executable"
54767      else
54768        CORRECT_MSVCR_ARCH="PE32+ executable"
54769      fi
54770    else
54771      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54772        CORRECT_MSVCR_ARCH=386
54773      else
54774        CORRECT_MSVCR_ARCH=x86-64
54775      fi
54776    fi
54777    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54779$as_echo "ok" >&6; }
54780      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54781
54782  # Only process if variable expands to non-empty
54783
54784  if test "x$MSVC_DLL" != x; then
54785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54786
54787  # Input might be given as Windows format, start by converting to
54788  # unix format.
54789  path="$MSVC_DLL"
54790  new_path=`$CYGPATH -u "$path"`
54791
54792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54795  # "foo.exe" is OK but "foo" is an error.
54796  #
54797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54798  # It is also a way to make sure we got the proper file name for the real test later on.
54799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54800  if test "x$test_shortpath" = x; then
54801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54802$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54803    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54804  fi
54805
54806  # Call helper function which possibly converts this using DOS-style short mode.
54807  # If so, the updated path is stored in $new_path.
54808
54809  input_path="$new_path"
54810  # Check if we need to convert this using DOS-style short mode. If the path
54811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54812  # take no chances and rewrite it.
54813  # Note: m4 eats our [], so we need to use [ and ] instead.
54814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54815  if test "x$has_forbidden_chars" != x; then
54816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54820      # Going to short mode and back again did indeed matter. Since short mode is
54821      # case insensitive, let's make it lowercase to improve readability.
54822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54823      # Now convert it back to Unix-style (cygpath)
54824      input_path=`$CYGPATH -u "$shortmode_path"`
54825      new_path="$input_path"
54826    fi
54827  fi
54828
54829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54830  if test "x$test_cygdrive_prefix" = x; then
54831    # As a simple fix, exclude /usr/bin since it's not a real path.
54832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54834      # a path prefixed by /cygdrive for fixpath to work.
54835      new_path="$CYGWIN_ROOT_PATH$input_path"
54836    fi
54837  fi
54838
54839
54840  if test "x$path" != "x$new_path"; then
54841    MSVC_DLL="$new_path"
54842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54843$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54844  fi
54845
54846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54847
54848  path="$MSVC_DLL"
54849  has_colon=`$ECHO $path | $GREP ^.:`
54850  new_path="$path"
54851  if test "x$has_colon" = x; then
54852    # Not in mixed or Windows style, start by that.
54853    new_path=`cmd //c echo $path`
54854  fi
54855
54856
54857  input_path="$new_path"
54858  # Check if we need to convert this using DOS-style short mode. If the path
54859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54860  # take no chances and rewrite it.
54861  # Note: m4 eats our [], so we need to use [ and ] instead.
54862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54863  if test "x$has_forbidden_chars" != x; then
54864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54866  fi
54867
54868
54869  windows_path="$new_path"
54870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54871    unix_path=`$CYGPATH -u "$windows_path"`
54872    new_path="$unix_path"
54873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54875    new_path="$unix_path"
54876  fi
54877
54878  if test "x$path" != "x$new_path"; then
54879    MSVC_DLL="$new_path"
54880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54881$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54882  fi
54883
54884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54886
54887    else
54888      # We're on a unix platform. Hooray! :)
54889      path="$MSVC_DLL"
54890      has_space=`$ECHO "$path" | $GREP " "`
54891      if test "x$has_space" != x; then
54892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54893$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54895      fi
54896
54897      # Use eval to expand a potential ~
54898      eval path="$path"
54899      if test ! -f "$path" && test ! -d "$path"; then
54900        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54901      fi
54902
54903      if test -d "$path"; then
54904        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54905      else
54906        dir="`$DIRNAME "$path"`"
54907        base="`$BASENAME "$path"`"
54908        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54909      fi
54910    fi
54911  fi
54912
54913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54914$as_echo_n "checking for $DLL_NAME... " >&6; }
54915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54916$as_echo "$MSVC_DLL" >&6; }
54917    else
54918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54919$as_echo "incorrect, ignoring" >&6; }
54920      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54921$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54922    fi
54923  fi
54924
54925  fi
54926
54927  if test "x$MSVC_DLL" = x; then
54928    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54929    if test "x$VS100COMNTOOLS" != x; then
54930      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54931
54932  windows_path="$CYGWIN_VS_TOOLS_DIR"
54933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54934    unix_path=`$CYGPATH -u "$windows_path"`
54935    CYGWIN_VS_TOOLS_DIR="$unix_path"
54936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54938    CYGWIN_VS_TOOLS_DIR="$unix_path"
54939  fi
54940
54941      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54942        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54943	    | $GREP -i /x64/ | $HEAD --lines 1`
54944      else
54945        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54946	    | $GREP -i /x86/ | $HEAD --lines 1`
54947      fi
54948
54949  DLL_NAME="$DLL_NAME"
54950  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54951  METHOD="search of VS100COMNTOOLS"
54952  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54954$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54955
54956    # Need to check if the found msvcr is correct architecture
54957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54958$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54959    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54961      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54962      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54963      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54964        CORRECT_MSVCR_ARCH="PE32 executable"
54965      else
54966        CORRECT_MSVCR_ARCH="PE32+ executable"
54967      fi
54968    else
54969      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54970        CORRECT_MSVCR_ARCH=386
54971      else
54972        CORRECT_MSVCR_ARCH=x86-64
54973      fi
54974    fi
54975    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54977$as_echo "ok" >&6; }
54978      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54979
54980  # Only process if variable expands to non-empty
54981
54982  if test "x$MSVC_DLL" != x; then
54983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54984
54985  # Input might be given as Windows format, start by converting to
54986  # unix format.
54987  path="$MSVC_DLL"
54988  new_path=`$CYGPATH -u "$path"`
54989
54990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54993  # "foo.exe" is OK but "foo" is an error.
54994  #
54995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54996  # It is also a way to make sure we got the proper file name for the real test later on.
54997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54998  if test "x$test_shortpath" = x; then
54999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55000$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55001    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55002  fi
55003
55004  # Call helper function which possibly converts this using DOS-style short mode.
55005  # If so, the updated path is stored in $new_path.
55006
55007  input_path="$new_path"
55008  # Check if we need to convert this using DOS-style short mode. If the path
55009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55010  # take no chances and rewrite it.
55011  # Note: m4 eats our [], so we need to use [ and ] instead.
55012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55013  if test "x$has_forbidden_chars" != x; then
55014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55018      # Going to short mode and back again did indeed matter. Since short mode is
55019      # case insensitive, let's make it lowercase to improve readability.
55020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55021      # Now convert it back to Unix-style (cygpath)
55022      input_path=`$CYGPATH -u "$shortmode_path"`
55023      new_path="$input_path"
55024    fi
55025  fi
55026
55027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55028  if test "x$test_cygdrive_prefix" = x; then
55029    # As a simple fix, exclude /usr/bin since it's not a real path.
55030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55032      # a path prefixed by /cygdrive for fixpath to work.
55033      new_path="$CYGWIN_ROOT_PATH$input_path"
55034    fi
55035  fi
55036
55037
55038  if test "x$path" != "x$new_path"; then
55039    MSVC_DLL="$new_path"
55040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55041$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55042  fi
55043
55044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55045
55046  path="$MSVC_DLL"
55047  has_colon=`$ECHO $path | $GREP ^.:`
55048  new_path="$path"
55049  if test "x$has_colon" = x; then
55050    # Not in mixed or Windows style, start by that.
55051    new_path=`cmd //c echo $path`
55052  fi
55053
55054
55055  input_path="$new_path"
55056  # Check if we need to convert this using DOS-style short mode. If the path
55057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55058  # take no chances and rewrite it.
55059  # Note: m4 eats our [], so we need to use [ and ] instead.
55060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55061  if test "x$has_forbidden_chars" != x; then
55062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55064  fi
55065
55066
55067  windows_path="$new_path"
55068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55069    unix_path=`$CYGPATH -u "$windows_path"`
55070    new_path="$unix_path"
55071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55073    new_path="$unix_path"
55074  fi
55075
55076  if test "x$path" != "x$new_path"; then
55077    MSVC_DLL="$new_path"
55078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55079$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55080  fi
55081
55082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55084
55085    else
55086      # We're on a unix platform. Hooray! :)
55087      path="$MSVC_DLL"
55088      has_space=`$ECHO "$path" | $GREP " "`
55089      if test "x$has_space" != x; then
55090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55091$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55093      fi
55094
55095      # Use eval to expand a potential ~
55096      eval path="$path"
55097      if test ! -f "$path" && test ! -d "$path"; then
55098        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55099      fi
55100
55101      if test -d "$path"; then
55102        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55103      else
55104        dir="`$DIRNAME "$path"`"
55105        base="`$BASENAME "$path"`"
55106        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55107      fi
55108    fi
55109  fi
55110
55111      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55112$as_echo_n "checking for $DLL_NAME... " >&6; }
55113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55114$as_echo "$MSVC_DLL" >&6; }
55115    else
55116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55117$as_echo "incorrect, ignoring" >&6; }
55118      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55119$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55120    fi
55121  fi
55122
55123    fi
55124  fi
55125
55126  if test "x$MSVC_DLL" = x; then
55127    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55128    # (This was the original behaviour; kept since it might turn something up)
55129    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55130      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55131        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55132	    | $GREP x64 | $HEAD --lines 1`
55133      else
55134        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55135	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55136        if test "x$POSSIBLE_MSVC_DLL" = x; then
55137          # We're grasping at straws now...
55138          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55139	      | $HEAD --lines 1`
55140        fi
55141      fi
55142
55143
55144  DLL_NAME="$DLL_NAME"
55145  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55146  METHOD="search of VCINSTALLDIR"
55147  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55148    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55149$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55150
55151    # Need to check if the found msvcr is correct architecture
55152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55153$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55154    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55156      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55157      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55158      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55159        CORRECT_MSVCR_ARCH="PE32 executable"
55160      else
55161        CORRECT_MSVCR_ARCH="PE32+ executable"
55162      fi
55163    else
55164      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55165        CORRECT_MSVCR_ARCH=386
55166      else
55167        CORRECT_MSVCR_ARCH=x86-64
55168      fi
55169    fi
55170    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55172$as_echo "ok" >&6; }
55173      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55174
55175  # Only process if variable expands to non-empty
55176
55177  if test "x$MSVC_DLL" != x; then
55178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55179
55180  # Input might be given as Windows format, start by converting to
55181  # unix format.
55182  path="$MSVC_DLL"
55183  new_path=`$CYGPATH -u "$path"`
55184
55185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55188  # "foo.exe" is OK but "foo" is an error.
55189  #
55190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55191  # It is also a way to make sure we got the proper file name for the real test later on.
55192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55193  if test "x$test_shortpath" = x; then
55194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55195$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55196    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55197  fi
55198
55199  # Call helper function which possibly converts this using DOS-style short mode.
55200  # If so, the updated path is stored in $new_path.
55201
55202  input_path="$new_path"
55203  # Check if we need to convert this using DOS-style short mode. If the path
55204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55205  # take no chances and rewrite it.
55206  # Note: m4 eats our [], so we need to use [ and ] instead.
55207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55208  if test "x$has_forbidden_chars" != x; then
55209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55213      # Going to short mode and back again did indeed matter. Since short mode is
55214      # case insensitive, let's make it lowercase to improve readability.
55215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55216      # Now convert it back to Unix-style (cygpath)
55217      input_path=`$CYGPATH -u "$shortmode_path"`
55218      new_path="$input_path"
55219    fi
55220  fi
55221
55222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55223  if test "x$test_cygdrive_prefix" = x; then
55224    # As a simple fix, exclude /usr/bin since it's not a real path.
55225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55227      # a path prefixed by /cygdrive for fixpath to work.
55228      new_path="$CYGWIN_ROOT_PATH$input_path"
55229    fi
55230  fi
55231
55232
55233  if test "x$path" != "x$new_path"; then
55234    MSVC_DLL="$new_path"
55235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55236$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55237  fi
55238
55239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55240
55241  path="$MSVC_DLL"
55242  has_colon=`$ECHO $path | $GREP ^.:`
55243  new_path="$path"
55244  if test "x$has_colon" = x; then
55245    # Not in mixed or Windows style, start by that.
55246    new_path=`cmd //c echo $path`
55247  fi
55248
55249
55250  input_path="$new_path"
55251  # Check if we need to convert this using DOS-style short mode. If the path
55252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55253  # take no chances and rewrite it.
55254  # Note: m4 eats our [], so we need to use [ and ] instead.
55255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55256  if test "x$has_forbidden_chars" != x; then
55257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55259  fi
55260
55261
55262  windows_path="$new_path"
55263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55264    unix_path=`$CYGPATH -u "$windows_path"`
55265    new_path="$unix_path"
55266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55268    new_path="$unix_path"
55269  fi
55270
55271  if test "x$path" != "x$new_path"; then
55272    MSVC_DLL="$new_path"
55273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55274$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55275  fi
55276
55277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55279
55280    else
55281      # We're on a unix platform. Hooray! :)
55282      path="$MSVC_DLL"
55283      has_space=`$ECHO "$path" | $GREP " "`
55284      if test "x$has_space" != x; then
55285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55286$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55288      fi
55289
55290      # Use eval to expand a potential ~
55291      eval path="$path"
55292      if test ! -f "$path" && test ! -d "$path"; then
55293        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55294      fi
55295
55296      if test -d "$path"; then
55297        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55298      else
55299        dir="`$DIRNAME "$path"`"
55300        base="`$BASENAME "$path"`"
55301        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55302      fi
55303    fi
55304  fi
55305
55306      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55307$as_echo_n "checking for $DLL_NAME... " >&6; }
55308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55309$as_echo "$MSVC_DLL" >&6; }
55310    else
55311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55312$as_echo "incorrect, ignoring" >&6; }
55313      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55314$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55315    fi
55316  fi
55317
55318    fi
55319  fi
55320
55321  if test "x$MSVC_DLL" = x; then
55322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55323$as_echo_n "checking for $DLL_NAME... " >&6; }
55324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55325$as_echo "no" >&6; }
55326    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55327  fi
55328
55329    MSVCR_DLL="$MSVC_DLL"
55330  fi
55331
55332
55333
55334# Check whether --with-msvcp-dll was given.
55335if test "${with_msvcp_dll+set}" = set; then :
55336  withval=$with_msvcp_dll;
55337fi
55338
55339
55340  if test "x$MSVCP_NAME" != "x"; then
55341    if test "x$with_msvcp_dll" != x; then
55342      # If given explicitly by user, do not probe. If not present, fail directly.
55343
55344  DLL_NAME="$MSVCP_NAME"
55345  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55346  METHOD="--with-msvcp-dll"
55347  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55348    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55349$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55350
55351    # Need to check if the found msvcr is correct architecture
55352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55353$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55354    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55356      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55357      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55358      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55359        CORRECT_MSVCR_ARCH="PE32 executable"
55360      else
55361        CORRECT_MSVCR_ARCH="PE32+ executable"
55362      fi
55363    else
55364      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55365        CORRECT_MSVCR_ARCH=386
55366      else
55367        CORRECT_MSVCR_ARCH=x86-64
55368      fi
55369    fi
55370    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55372$as_echo "ok" >&6; }
55373      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55374
55375  # Only process if variable expands to non-empty
55376
55377  if test "x$MSVC_DLL" != x; then
55378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55379
55380  # Input might be given as Windows format, start by converting to
55381  # unix format.
55382  path="$MSVC_DLL"
55383  new_path=`$CYGPATH -u "$path"`
55384
55385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55388  # "foo.exe" is OK but "foo" is an error.
55389  #
55390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55391  # It is also a way to make sure we got the proper file name for the real test later on.
55392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55393  if test "x$test_shortpath" = x; then
55394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55395$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55396    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55397  fi
55398
55399  # Call helper function which possibly converts this using DOS-style short mode.
55400  # If so, the updated path is stored in $new_path.
55401
55402  input_path="$new_path"
55403  # Check if we need to convert this using DOS-style short mode. If the path
55404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55405  # take no chances and rewrite it.
55406  # Note: m4 eats our [], so we need to use [ and ] instead.
55407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55408  if test "x$has_forbidden_chars" != x; then
55409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55413      # Going to short mode and back again did indeed matter. Since short mode is
55414      # case insensitive, let's make it lowercase to improve readability.
55415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55416      # Now convert it back to Unix-style (cygpath)
55417      input_path=`$CYGPATH -u "$shortmode_path"`
55418      new_path="$input_path"
55419    fi
55420  fi
55421
55422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55423  if test "x$test_cygdrive_prefix" = x; then
55424    # As a simple fix, exclude /usr/bin since it's not a real path.
55425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55427      # a path prefixed by /cygdrive for fixpath to work.
55428      new_path="$CYGWIN_ROOT_PATH$input_path"
55429    fi
55430  fi
55431
55432
55433  if test "x$path" != "x$new_path"; then
55434    MSVC_DLL="$new_path"
55435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55436$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55437  fi
55438
55439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55440
55441  path="$MSVC_DLL"
55442  has_colon=`$ECHO $path | $GREP ^.:`
55443  new_path="$path"
55444  if test "x$has_colon" = x; then
55445    # Not in mixed or Windows style, start by that.
55446    new_path=`cmd //c echo $path`
55447  fi
55448
55449
55450  input_path="$new_path"
55451  # Check if we need to convert this using DOS-style short mode. If the path
55452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55453  # take no chances and rewrite it.
55454  # Note: m4 eats our [], so we need to use [ and ] instead.
55455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55456  if test "x$has_forbidden_chars" != x; then
55457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55459  fi
55460
55461
55462  windows_path="$new_path"
55463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55464    unix_path=`$CYGPATH -u "$windows_path"`
55465    new_path="$unix_path"
55466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55468    new_path="$unix_path"
55469  fi
55470
55471  if test "x$path" != "x$new_path"; then
55472    MSVC_DLL="$new_path"
55473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55474$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55475  fi
55476
55477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55479
55480    else
55481      # We're on a unix platform. Hooray! :)
55482      path="$MSVC_DLL"
55483      has_space=`$ECHO "$path" | $GREP " "`
55484      if test "x$has_space" != x; then
55485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55486$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55487        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55488      fi
55489
55490      # Use eval to expand a potential ~
55491      eval path="$path"
55492      if test ! -f "$path" && test ! -d "$path"; then
55493        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55494      fi
55495
55496      if test -d "$path"; then
55497        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55498      else
55499        dir="`$DIRNAME "$path"`"
55500        base="`$BASENAME "$path"`"
55501        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55502      fi
55503    fi
55504  fi
55505
55506      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55507$as_echo_n "checking for $DLL_NAME... " >&6; }
55508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55509$as_echo "$MSVC_DLL" >&6; }
55510    else
55511      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55512$as_echo "incorrect, ignoring" >&6; }
55513      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55514$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55515    fi
55516  fi
55517
55518      if test "x$MSVC_DLL" = x; then
55519        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55520      fi
55521      MSVCP_DLL="$MSVC_DLL"
55522    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55523
55524  DLL_NAME="$MSVCP_NAME"
55525  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55526  METHOD="devkit"
55527  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55528    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55529$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55530
55531    # Need to check if the found msvcr is correct architecture
55532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55533$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55534    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55536      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55537      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55538      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55539        CORRECT_MSVCR_ARCH="PE32 executable"
55540      else
55541        CORRECT_MSVCR_ARCH="PE32+ executable"
55542      fi
55543    else
55544      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55545        CORRECT_MSVCR_ARCH=386
55546      else
55547        CORRECT_MSVCR_ARCH=x86-64
55548      fi
55549    fi
55550    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55552$as_echo "ok" >&6; }
55553      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55554
55555  # Only process if variable expands to non-empty
55556
55557  if test "x$MSVC_DLL" != x; then
55558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55559
55560  # Input might be given as Windows format, start by converting to
55561  # unix format.
55562  path="$MSVC_DLL"
55563  new_path=`$CYGPATH -u "$path"`
55564
55565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55568  # "foo.exe" is OK but "foo" is an error.
55569  #
55570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55571  # It is also a way to make sure we got the proper file name for the real test later on.
55572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55573  if test "x$test_shortpath" = x; then
55574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55576    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55577  fi
55578
55579  # Call helper function which possibly converts this using DOS-style short mode.
55580  # If so, the updated path is stored in $new_path.
55581
55582  input_path="$new_path"
55583  # Check if we need to convert this using DOS-style short mode. If the path
55584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55585  # take no chances and rewrite it.
55586  # Note: m4 eats our [], so we need to use [ and ] instead.
55587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55588  if test "x$has_forbidden_chars" != x; then
55589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55593      # Going to short mode and back again did indeed matter. Since short mode is
55594      # case insensitive, let's make it lowercase to improve readability.
55595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55596      # Now convert it back to Unix-style (cygpath)
55597      input_path=`$CYGPATH -u "$shortmode_path"`
55598      new_path="$input_path"
55599    fi
55600  fi
55601
55602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55603  if test "x$test_cygdrive_prefix" = x; then
55604    # As a simple fix, exclude /usr/bin since it's not a real path.
55605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55607      # a path prefixed by /cygdrive for fixpath to work.
55608      new_path="$CYGWIN_ROOT_PATH$input_path"
55609    fi
55610  fi
55611
55612
55613  if test "x$path" != "x$new_path"; then
55614    MSVC_DLL="$new_path"
55615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55616$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55617  fi
55618
55619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55620
55621  path="$MSVC_DLL"
55622  has_colon=`$ECHO $path | $GREP ^.:`
55623  new_path="$path"
55624  if test "x$has_colon" = x; then
55625    # Not in mixed or Windows style, start by that.
55626    new_path=`cmd //c echo $path`
55627  fi
55628
55629
55630  input_path="$new_path"
55631  # Check if we need to convert this using DOS-style short mode. If the path
55632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55633  # take no chances and rewrite it.
55634  # Note: m4 eats our [], so we need to use [ and ] instead.
55635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55636  if test "x$has_forbidden_chars" != x; then
55637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55639  fi
55640
55641
55642  windows_path="$new_path"
55643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55644    unix_path=`$CYGPATH -u "$windows_path"`
55645    new_path="$unix_path"
55646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55648    new_path="$unix_path"
55649  fi
55650
55651  if test "x$path" != "x$new_path"; then
55652    MSVC_DLL="$new_path"
55653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55654$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55655  fi
55656
55657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55659
55660    else
55661      # We're on a unix platform. Hooray! :)
55662      path="$MSVC_DLL"
55663      has_space=`$ECHO "$path" | $GREP " "`
55664      if test "x$has_space" != x; then
55665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55666$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55668      fi
55669
55670      # Use eval to expand a potential ~
55671      eval path="$path"
55672      if test ! -f "$path" && test ! -d "$path"; then
55673        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55674      fi
55675
55676      if test -d "$path"; then
55677        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55678      else
55679        dir="`$DIRNAME "$path"`"
55680        base="`$BASENAME "$path"`"
55681        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55682      fi
55683    fi
55684  fi
55685
55686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55687$as_echo_n "checking for $DLL_NAME... " >&6; }
55688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55689$as_echo "$MSVC_DLL" >&6; }
55690    else
55691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55692$as_echo "incorrect, ignoring" >&6; }
55693      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55694$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55695    fi
55696  fi
55697
55698      if test "x$MSVC_DLL" = x; then
55699        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55700      fi
55701      MSVCP_DLL="$MSVC_DLL"
55702    else
55703
55704  DLL_NAME="${MSVCP_NAME}"
55705  MSVC_DLL=
55706
55707  if test "x$MSVC_DLL" = x; then
55708    # Probe: Using well-known location from Visual Studio 10.0
55709    if test "x$VCINSTALLDIR" != x; then
55710      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55711
55712  windows_path="$CYGWIN_VC_INSTALL_DIR"
55713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55714    unix_path=`$CYGPATH -u "$windows_path"`
55715    CYGWIN_VC_INSTALL_DIR="$unix_path"
55716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55718    CYGWIN_VC_INSTALL_DIR="$unix_path"
55719  fi
55720
55721      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55722        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55723      else
55724        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55725      fi
55726      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55727
55728  DLL_NAME="$DLL_NAME"
55729  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55730  METHOD="well-known location in VCINSTALLDIR"
55731  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55732    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55733$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55734
55735    # Need to check if the found msvcr is correct architecture
55736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55737$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55738    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55740      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55741      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55742      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55743        CORRECT_MSVCR_ARCH="PE32 executable"
55744      else
55745        CORRECT_MSVCR_ARCH="PE32+ executable"
55746      fi
55747    else
55748      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55749        CORRECT_MSVCR_ARCH=386
55750      else
55751        CORRECT_MSVCR_ARCH=x86-64
55752      fi
55753    fi
55754    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55756$as_echo "ok" >&6; }
55757      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55758
55759  # Only process if variable expands to non-empty
55760
55761  if test "x$MSVC_DLL" != x; then
55762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55763
55764  # Input might be given as Windows format, start by converting to
55765  # unix format.
55766  path="$MSVC_DLL"
55767  new_path=`$CYGPATH -u "$path"`
55768
55769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55772  # "foo.exe" is OK but "foo" is an error.
55773  #
55774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55775  # It is also a way to make sure we got the proper file name for the real test later on.
55776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55777  if test "x$test_shortpath" = x; then
55778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55779$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55780    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55781  fi
55782
55783  # Call helper function which possibly converts this using DOS-style short mode.
55784  # If so, the updated path is stored in $new_path.
55785
55786  input_path="$new_path"
55787  # Check if we need to convert this using DOS-style short mode. If the path
55788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55789  # take no chances and rewrite it.
55790  # Note: m4 eats our [], so we need to use [ and ] instead.
55791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55792  if test "x$has_forbidden_chars" != x; then
55793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55797      # Going to short mode and back again did indeed matter. Since short mode is
55798      # case insensitive, let's make it lowercase to improve readability.
55799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55800      # Now convert it back to Unix-style (cygpath)
55801      input_path=`$CYGPATH -u "$shortmode_path"`
55802      new_path="$input_path"
55803    fi
55804  fi
55805
55806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55807  if test "x$test_cygdrive_prefix" = x; then
55808    # As a simple fix, exclude /usr/bin since it's not a real path.
55809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55811      # a path prefixed by /cygdrive for fixpath to work.
55812      new_path="$CYGWIN_ROOT_PATH$input_path"
55813    fi
55814  fi
55815
55816
55817  if test "x$path" != "x$new_path"; then
55818    MSVC_DLL="$new_path"
55819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55820$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55821  fi
55822
55823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55824
55825  path="$MSVC_DLL"
55826  has_colon=`$ECHO $path | $GREP ^.:`
55827  new_path="$path"
55828  if test "x$has_colon" = x; then
55829    # Not in mixed or Windows style, start by that.
55830    new_path=`cmd //c echo $path`
55831  fi
55832
55833
55834  input_path="$new_path"
55835  # Check if we need to convert this using DOS-style short mode. If the path
55836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55837  # take no chances and rewrite it.
55838  # Note: m4 eats our [], so we need to use [ and ] instead.
55839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55840  if test "x$has_forbidden_chars" != x; then
55841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55843  fi
55844
55845
55846  windows_path="$new_path"
55847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55848    unix_path=`$CYGPATH -u "$windows_path"`
55849    new_path="$unix_path"
55850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55852    new_path="$unix_path"
55853  fi
55854
55855  if test "x$path" != "x$new_path"; then
55856    MSVC_DLL="$new_path"
55857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55858$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55859  fi
55860
55861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55863
55864    else
55865      # We're on a unix platform. Hooray! :)
55866      path="$MSVC_DLL"
55867      has_space=`$ECHO "$path" | $GREP " "`
55868      if test "x$has_space" != x; then
55869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55870$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55872      fi
55873
55874      # Use eval to expand a potential ~
55875      eval path="$path"
55876      if test ! -f "$path" && test ! -d "$path"; then
55877        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55878      fi
55879
55880      if test -d "$path"; then
55881        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55882      else
55883        dir="`$DIRNAME "$path"`"
55884        base="`$BASENAME "$path"`"
55885        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55886      fi
55887    fi
55888  fi
55889
55890      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55891$as_echo_n "checking for $DLL_NAME... " >&6; }
55892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55893$as_echo "$MSVC_DLL" >&6; }
55894    else
55895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55896$as_echo "incorrect, ignoring" >&6; }
55897      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55898$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55899    fi
55900  fi
55901
55902    fi
55903  fi
55904
55905  if test "x$MSVC_DLL" = x; then
55906    # Probe: Check in the Boot JDK directory.
55907    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55908
55909  DLL_NAME="$DLL_NAME"
55910  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55911  METHOD="well-known location in Boot JDK"
55912  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55913    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55914$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55915
55916    # Need to check if the found msvcr is correct architecture
55917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55918$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55919    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55921      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55922      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55923      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55924        CORRECT_MSVCR_ARCH="PE32 executable"
55925      else
55926        CORRECT_MSVCR_ARCH="PE32+ executable"
55927      fi
55928    else
55929      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55930        CORRECT_MSVCR_ARCH=386
55931      else
55932        CORRECT_MSVCR_ARCH=x86-64
55933      fi
55934    fi
55935    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55937$as_echo "ok" >&6; }
55938      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55939
55940  # Only process if variable expands to non-empty
55941
55942  if test "x$MSVC_DLL" != x; then
55943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55944
55945  # Input might be given as Windows format, start by converting to
55946  # unix format.
55947  path="$MSVC_DLL"
55948  new_path=`$CYGPATH -u "$path"`
55949
55950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55953  # "foo.exe" is OK but "foo" is an error.
55954  #
55955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55956  # It is also a way to make sure we got the proper file name for the real test later on.
55957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55958  if test "x$test_shortpath" = x; then
55959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55960$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55961    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55962  fi
55963
55964  # Call helper function which possibly converts this using DOS-style short mode.
55965  # If so, the updated path is stored in $new_path.
55966
55967  input_path="$new_path"
55968  # Check if we need to convert this using DOS-style short mode. If the path
55969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55970  # take no chances and rewrite it.
55971  # Note: m4 eats our [], so we need to use [ and ] instead.
55972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55973  if test "x$has_forbidden_chars" != x; then
55974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55978      # Going to short mode and back again did indeed matter. Since short mode is
55979      # case insensitive, let's make it lowercase to improve readability.
55980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55981      # Now convert it back to Unix-style (cygpath)
55982      input_path=`$CYGPATH -u "$shortmode_path"`
55983      new_path="$input_path"
55984    fi
55985  fi
55986
55987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55988  if test "x$test_cygdrive_prefix" = x; then
55989    # As a simple fix, exclude /usr/bin since it's not a real path.
55990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55992      # a path prefixed by /cygdrive for fixpath to work.
55993      new_path="$CYGWIN_ROOT_PATH$input_path"
55994    fi
55995  fi
55996
55997
55998  if test "x$path" != "x$new_path"; then
55999    MSVC_DLL="$new_path"
56000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56001$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56002  fi
56003
56004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56005
56006  path="$MSVC_DLL"
56007  has_colon=`$ECHO $path | $GREP ^.:`
56008  new_path="$path"
56009  if test "x$has_colon" = x; then
56010    # Not in mixed or Windows style, start by that.
56011    new_path=`cmd //c echo $path`
56012  fi
56013
56014
56015  input_path="$new_path"
56016  # Check if we need to convert this using DOS-style short mode. If the path
56017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56018  # take no chances and rewrite it.
56019  # Note: m4 eats our [], so we need to use [ and ] instead.
56020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56021  if test "x$has_forbidden_chars" != x; then
56022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56024  fi
56025
56026
56027  windows_path="$new_path"
56028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56029    unix_path=`$CYGPATH -u "$windows_path"`
56030    new_path="$unix_path"
56031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56033    new_path="$unix_path"
56034  fi
56035
56036  if test "x$path" != "x$new_path"; then
56037    MSVC_DLL="$new_path"
56038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56039$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56040  fi
56041
56042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56044
56045    else
56046      # We're on a unix platform. Hooray! :)
56047      path="$MSVC_DLL"
56048      has_space=`$ECHO "$path" | $GREP " "`
56049      if test "x$has_space" != x; then
56050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56051$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56052        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56053      fi
56054
56055      # Use eval to expand a potential ~
56056      eval path="$path"
56057      if test ! -f "$path" && test ! -d "$path"; then
56058        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56059      fi
56060
56061      if test -d "$path"; then
56062        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56063      else
56064        dir="`$DIRNAME "$path"`"
56065        base="`$BASENAME "$path"`"
56066        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56067      fi
56068    fi
56069  fi
56070
56071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56072$as_echo_n "checking for $DLL_NAME... " >&6; }
56073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56074$as_echo "$MSVC_DLL" >&6; }
56075    else
56076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56077$as_echo "incorrect, ignoring" >&6; }
56078      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56079$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56080    fi
56081  fi
56082
56083  fi
56084
56085  if test "x$MSVC_DLL" = x; then
56086    # Probe: Look in the Windows system32 directory
56087    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56088
56089  windows_path="$CYGWIN_SYSTEMROOT"
56090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56091    unix_path=`$CYGPATH -u "$windows_path"`
56092    CYGWIN_SYSTEMROOT="$unix_path"
56093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56095    CYGWIN_SYSTEMROOT="$unix_path"
56096  fi
56097
56098    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56099
56100  DLL_NAME="$DLL_NAME"
56101  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56102  METHOD="well-known location in SYSTEMROOT"
56103  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56104    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56105$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56106
56107    # Need to check if the found msvcr is correct architecture
56108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56109$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56110    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56112      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56113      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56114      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56115        CORRECT_MSVCR_ARCH="PE32 executable"
56116      else
56117        CORRECT_MSVCR_ARCH="PE32+ executable"
56118      fi
56119    else
56120      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56121        CORRECT_MSVCR_ARCH=386
56122      else
56123        CORRECT_MSVCR_ARCH=x86-64
56124      fi
56125    fi
56126    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56128$as_echo "ok" >&6; }
56129      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56130
56131  # Only process if variable expands to non-empty
56132
56133  if test "x$MSVC_DLL" != x; then
56134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56135
56136  # Input might be given as Windows format, start by converting to
56137  # unix format.
56138  path="$MSVC_DLL"
56139  new_path=`$CYGPATH -u "$path"`
56140
56141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56144  # "foo.exe" is OK but "foo" is an error.
56145  #
56146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56147  # It is also a way to make sure we got the proper file name for the real test later on.
56148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56149  if test "x$test_shortpath" = x; then
56150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56151$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56152    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56153  fi
56154
56155  # Call helper function which possibly converts this using DOS-style short mode.
56156  # If so, the updated path is stored in $new_path.
56157
56158  input_path="$new_path"
56159  # Check if we need to convert this using DOS-style short mode. If the path
56160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56161  # take no chances and rewrite it.
56162  # Note: m4 eats our [], so we need to use [ and ] instead.
56163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56164  if test "x$has_forbidden_chars" != x; then
56165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56169      # Going to short mode and back again did indeed matter. Since short mode is
56170      # case insensitive, let's make it lowercase to improve readability.
56171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56172      # Now convert it back to Unix-style (cygpath)
56173      input_path=`$CYGPATH -u "$shortmode_path"`
56174      new_path="$input_path"
56175    fi
56176  fi
56177
56178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56179  if test "x$test_cygdrive_prefix" = x; then
56180    # As a simple fix, exclude /usr/bin since it's not a real path.
56181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56183      # a path prefixed by /cygdrive for fixpath to work.
56184      new_path="$CYGWIN_ROOT_PATH$input_path"
56185    fi
56186  fi
56187
56188
56189  if test "x$path" != "x$new_path"; then
56190    MSVC_DLL="$new_path"
56191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56192$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56193  fi
56194
56195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56196
56197  path="$MSVC_DLL"
56198  has_colon=`$ECHO $path | $GREP ^.:`
56199  new_path="$path"
56200  if test "x$has_colon" = x; then
56201    # Not in mixed or Windows style, start by that.
56202    new_path=`cmd //c echo $path`
56203  fi
56204
56205
56206  input_path="$new_path"
56207  # Check if we need to convert this using DOS-style short mode. If the path
56208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56209  # take no chances and rewrite it.
56210  # Note: m4 eats our [], so we need to use [ and ] instead.
56211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56212  if test "x$has_forbidden_chars" != x; then
56213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56215  fi
56216
56217
56218  windows_path="$new_path"
56219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56220    unix_path=`$CYGPATH -u "$windows_path"`
56221    new_path="$unix_path"
56222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56224    new_path="$unix_path"
56225  fi
56226
56227  if test "x$path" != "x$new_path"; then
56228    MSVC_DLL="$new_path"
56229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56231  fi
56232
56233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56235
56236    else
56237      # We're on a unix platform. Hooray! :)
56238      path="$MSVC_DLL"
56239      has_space=`$ECHO "$path" | $GREP " "`
56240      if test "x$has_space" != x; then
56241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56242$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56244      fi
56245
56246      # Use eval to expand a potential ~
56247      eval path="$path"
56248      if test ! -f "$path" && test ! -d "$path"; then
56249        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56250      fi
56251
56252      if test -d "$path"; then
56253        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56254      else
56255        dir="`$DIRNAME "$path"`"
56256        base="`$BASENAME "$path"`"
56257        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56258      fi
56259    fi
56260  fi
56261
56262      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56263$as_echo_n "checking for $DLL_NAME... " >&6; }
56264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56265$as_echo "$MSVC_DLL" >&6; }
56266    else
56267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56268$as_echo "incorrect, ignoring" >&6; }
56269      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56270$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56271    fi
56272  fi
56273
56274  fi
56275
56276  if test "x$MSVC_DLL" = x; then
56277    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56278    if test "x$VS100COMNTOOLS" != x; then
56279      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56280
56281  windows_path="$CYGWIN_VS_TOOLS_DIR"
56282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56283    unix_path=`$CYGPATH -u "$windows_path"`
56284    CYGWIN_VS_TOOLS_DIR="$unix_path"
56285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56287    CYGWIN_VS_TOOLS_DIR="$unix_path"
56288  fi
56289
56290      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56291        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56292	    | $GREP -i /x64/ | $HEAD --lines 1`
56293      else
56294        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56295	    | $GREP -i /x86/ | $HEAD --lines 1`
56296      fi
56297
56298  DLL_NAME="$DLL_NAME"
56299  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56300  METHOD="search of VS100COMNTOOLS"
56301  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56302    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56303$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56304
56305    # Need to check if the found msvcr is correct architecture
56306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56307$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56308    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56310      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56311      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56312      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56313        CORRECT_MSVCR_ARCH="PE32 executable"
56314      else
56315        CORRECT_MSVCR_ARCH="PE32+ executable"
56316      fi
56317    else
56318      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56319        CORRECT_MSVCR_ARCH=386
56320      else
56321        CORRECT_MSVCR_ARCH=x86-64
56322      fi
56323    fi
56324    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56326$as_echo "ok" >&6; }
56327      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56328
56329  # Only process if variable expands to non-empty
56330
56331  if test "x$MSVC_DLL" != x; then
56332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56333
56334  # Input might be given as Windows format, start by converting to
56335  # unix format.
56336  path="$MSVC_DLL"
56337  new_path=`$CYGPATH -u "$path"`
56338
56339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56342  # "foo.exe" is OK but "foo" is an error.
56343  #
56344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56345  # It is also a way to make sure we got the proper file name for the real test later on.
56346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56347  if test "x$test_shortpath" = x; then
56348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56349$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56350    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56351  fi
56352
56353  # Call helper function which possibly converts this using DOS-style short mode.
56354  # If so, the updated path is stored in $new_path.
56355
56356  input_path="$new_path"
56357  # Check if we need to convert this using DOS-style short mode. If the path
56358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56359  # take no chances and rewrite it.
56360  # Note: m4 eats our [], so we need to use [ and ] instead.
56361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56362  if test "x$has_forbidden_chars" != x; then
56363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56367      # Going to short mode and back again did indeed matter. Since short mode is
56368      # case insensitive, let's make it lowercase to improve readability.
56369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56370      # Now convert it back to Unix-style (cygpath)
56371      input_path=`$CYGPATH -u "$shortmode_path"`
56372      new_path="$input_path"
56373    fi
56374  fi
56375
56376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56377  if test "x$test_cygdrive_prefix" = x; then
56378    # As a simple fix, exclude /usr/bin since it's not a real path.
56379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56381      # a path prefixed by /cygdrive for fixpath to work.
56382      new_path="$CYGWIN_ROOT_PATH$input_path"
56383    fi
56384  fi
56385
56386
56387  if test "x$path" != "x$new_path"; then
56388    MSVC_DLL="$new_path"
56389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56390$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56391  fi
56392
56393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56394
56395  path="$MSVC_DLL"
56396  has_colon=`$ECHO $path | $GREP ^.:`
56397  new_path="$path"
56398  if test "x$has_colon" = x; then
56399    # Not in mixed or Windows style, start by that.
56400    new_path=`cmd //c echo $path`
56401  fi
56402
56403
56404  input_path="$new_path"
56405  # Check if we need to convert this using DOS-style short mode. If the path
56406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56407  # take no chances and rewrite it.
56408  # Note: m4 eats our [], so we need to use [ and ] instead.
56409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56410  if test "x$has_forbidden_chars" != x; then
56411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56413  fi
56414
56415
56416  windows_path="$new_path"
56417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56418    unix_path=`$CYGPATH -u "$windows_path"`
56419    new_path="$unix_path"
56420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56422    new_path="$unix_path"
56423  fi
56424
56425  if test "x$path" != "x$new_path"; then
56426    MSVC_DLL="$new_path"
56427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56429  fi
56430
56431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56433
56434    else
56435      # We're on a unix platform. Hooray! :)
56436      path="$MSVC_DLL"
56437      has_space=`$ECHO "$path" | $GREP " "`
56438      if test "x$has_space" != x; then
56439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56440$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56442      fi
56443
56444      # Use eval to expand a potential ~
56445      eval path="$path"
56446      if test ! -f "$path" && test ! -d "$path"; then
56447        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56448      fi
56449
56450      if test -d "$path"; then
56451        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56452      else
56453        dir="`$DIRNAME "$path"`"
56454        base="`$BASENAME "$path"`"
56455        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56456      fi
56457    fi
56458  fi
56459
56460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56461$as_echo_n "checking for $DLL_NAME... " >&6; }
56462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56463$as_echo "$MSVC_DLL" >&6; }
56464    else
56465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56466$as_echo "incorrect, ignoring" >&6; }
56467      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56468$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56469    fi
56470  fi
56471
56472    fi
56473  fi
56474
56475  if test "x$MSVC_DLL" = x; then
56476    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56477    # (This was the original behaviour; kept since it might turn something up)
56478    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56479      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56480        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56481	    | $GREP x64 | $HEAD --lines 1`
56482      else
56483        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56484	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56485        if test "x$POSSIBLE_MSVC_DLL" = x; then
56486          # We're grasping at straws now...
56487          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56488	      | $HEAD --lines 1`
56489        fi
56490      fi
56491
56492
56493  DLL_NAME="$DLL_NAME"
56494  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56495  METHOD="search of VCINSTALLDIR"
56496  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56497    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56498$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56499
56500    # Need to check if the found msvcr is correct architecture
56501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56502$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56503    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56505      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56506      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56508        CORRECT_MSVCR_ARCH="PE32 executable"
56509      else
56510        CORRECT_MSVCR_ARCH="PE32+ executable"
56511      fi
56512    else
56513      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56514        CORRECT_MSVCR_ARCH=386
56515      else
56516        CORRECT_MSVCR_ARCH=x86-64
56517      fi
56518    fi
56519    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56521$as_echo "ok" >&6; }
56522      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56523
56524  # Only process if variable expands to non-empty
56525
56526  if test "x$MSVC_DLL" != x; then
56527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56528
56529  # Input might be given as Windows format, start by converting to
56530  # unix format.
56531  path="$MSVC_DLL"
56532  new_path=`$CYGPATH -u "$path"`
56533
56534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56537  # "foo.exe" is OK but "foo" is an error.
56538  #
56539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56540  # It is also a way to make sure we got the proper file name for the real test later on.
56541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56542  if test "x$test_shortpath" = x; then
56543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56544$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56545    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56546  fi
56547
56548  # Call helper function which possibly converts this using DOS-style short mode.
56549  # If so, the updated path is stored in $new_path.
56550
56551  input_path="$new_path"
56552  # Check if we need to convert this using DOS-style short mode. If the path
56553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56554  # take no chances and rewrite it.
56555  # Note: m4 eats our [], so we need to use [ and ] instead.
56556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56557  if test "x$has_forbidden_chars" != x; then
56558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56562      # Going to short mode and back again did indeed matter. Since short mode is
56563      # case insensitive, let's make it lowercase to improve readability.
56564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56565      # Now convert it back to Unix-style (cygpath)
56566      input_path=`$CYGPATH -u "$shortmode_path"`
56567      new_path="$input_path"
56568    fi
56569  fi
56570
56571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56572  if test "x$test_cygdrive_prefix" = x; then
56573    # As a simple fix, exclude /usr/bin since it's not a real path.
56574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56576      # a path prefixed by /cygdrive for fixpath to work.
56577      new_path="$CYGWIN_ROOT_PATH$input_path"
56578    fi
56579  fi
56580
56581
56582  if test "x$path" != "x$new_path"; then
56583    MSVC_DLL="$new_path"
56584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56585$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56586  fi
56587
56588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56589
56590  path="$MSVC_DLL"
56591  has_colon=`$ECHO $path | $GREP ^.:`
56592  new_path="$path"
56593  if test "x$has_colon" = x; then
56594    # Not in mixed or Windows style, start by that.
56595    new_path=`cmd //c echo $path`
56596  fi
56597
56598
56599  input_path="$new_path"
56600  # Check if we need to convert this using DOS-style short mode. If the path
56601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56602  # take no chances and rewrite it.
56603  # Note: m4 eats our [], so we need to use [ and ] instead.
56604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56605  if test "x$has_forbidden_chars" != x; then
56606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56608  fi
56609
56610
56611  windows_path="$new_path"
56612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56613    unix_path=`$CYGPATH -u "$windows_path"`
56614    new_path="$unix_path"
56615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56617    new_path="$unix_path"
56618  fi
56619
56620  if test "x$path" != "x$new_path"; then
56621    MSVC_DLL="$new_path"
56622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56623$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56624  fi
56625
56626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56628
56629    else
56630      # We're on a unix platform. Hooray! :)
56631      path="$MSVC_DLL"
56632      has_space=`$ECHO "$path" | $GREP " "`
56633      if test "x$has_space" != x; then
56634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56635$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56636        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56637      fi
56638
56639      # Use eval to expand a potential ~
56640      eval path="$path"
56641      if test ! -f "$path" && test ! -d "$path"; then
56642        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56643      fi
56644
56645      if test -d "$path"; then
56646        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56647      else
56648        dir="`$DIRNAME "$path"`"
56649        base="`$BASENAME "$path"`"
56650        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56651      fi
56652    fi
56653  fi
56654
56655      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56656$as_echo_n "checking for $DLL_NAME... " >&6; }
56657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56658$as_echo "$MSVC_DLL" >&6; }
56659    else
56660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56661$as_echo "incorrect, ignoring" >&6; }
56662      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56663$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56664    fi
56665  fi
56666
56667    fi
56668  fi
56669
56670  if test "x$MSVC_DLL" = x; then
56671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56672$as_echo_n "checking for $DLL_NAME... " >&6; }
56673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56674$as_echo "no" >&6; }
56675    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56676  fi
56677
56678      MSVCP_DLL="$MSVC_DLL"
56679    fi
56680
56681  fi
56682
56683  fi
56684
56685
56686  if test "x$NEEDS_LIB_X11" = xfalse; then
56687    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56688      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56689$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56690    fi
56691    X_CFLAGS=
56692    X_LIBS=
56693  else
56694
56695    if test "x${with_x}" = xno; then
56696      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56697    fi
56698
56699    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56700      # The user has specified a X11 base directory. Use it for includes and
56701      # libraries, unless explicitly overridden.
56702      if test "x$x_includes" = xNONE; then
56703        x_includes="${with_x}/include"
56704      fi
56705      if test "x$x_libraries" = xNONE; then
56706        x_libraries="${with_x}/lib"
56707      fi
56708    else
56709      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56710      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56711      # --x-libraries for the sysroot, if that seems to be correct.
56712      if test "x$SYSROOT" != "x"; then
56713        if test "x$x_includes" = xNONE; then
56714          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56715            x_includes="$SYSROOT/usr/X11R6/include"
56716          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56717            x_includes="$SYSROOT/usr/include"
56718          fi
56719        fi
56720        if test "x$x_libraries" = xNONE; then
56721          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56722            x_libraries="$SYSROOT/usr/X11R6/lib"
56723          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56724            x_libraries="$SYSROOT/usr/lib64"
56725          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56726            x_libraries="$SYSROOT/usr/lib"
56727          fi
56728        fi
56729      fi
56730    fi
56731
56732    # Now let autoconf do it's magic
56733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56734$as_echo_n "checking for X... " >&6; }
56735
56736
56737# Check whether --with-x was given.
56738if test "${with_x+set}" = set; then :
56739  withval=$with_x;
56740fi
56741
56742# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56743if test "x$with_x" = xno; then
56744  # The user explicitly disabled X.
56745  have_x=disabled
56746else
56747  case $x_includes,$x_libraries in #(
56748    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56749    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56750  $as_echo_n "(cached) " >&6
56751else
56752  # One or both of the vars are not set, and there is no cached value.
56753ac_x_includes=no ac_x_libraries=no
56754rm -f -r conftest.dir
56755if mkdir conftest.dir; then
56756  cd conftest.dir
56757  cat >Imakefile <<'_ACEOF'
56758incroot:
56759	@echo incroot='${INCROOT}'
56760usrlibdir:
56761	@echo usrlibdir='${USRLIBDIR}'
56762libdir:
56763	@echo libdir='${LIBDIR}'
56764_ACEOF
56765  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56766    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56767    for ac_var in incroot usrlibdir libdir; do
56768      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56769    done
56770    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56771    for ac_extension in a so sl dylib la dll; do
56772      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56773	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56774	ac_im_usrlibdir=$ac_im_libdir; break
56775      fi
56776    done
56777    # Screen out bogus values from the imake configuration.  They are
56778    # bogus both because they are the default anyway, and because
56779    # using them would break gcc on systems where it needs fixed includes.
56780    case $ac_im_incroot in
56781	/usr/include) ac_x_includes= ;;
56782	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56783    esac
56784    case $ac_im_usrlibdir in
56785	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56786	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56787    esac
56788  fi
56789  cd ..
56790  rm -f -r conftest.dir
56791fi
56792
56793# Standard set of common directories for X headers.
56794# Check X11 before X11Rn because it is often a symlink to the current release.
56795ac_x_header_dirs='
56796/usr/X11/include
56797/usr/X11R7/include
56798/usr/X11R6/include
56799/usr/X11R5/include
56800/usr/X11R4/include
56801
56802/usr/include/X11
56803/usr/include/X11R7
56804/usr/include/X11R6
56805/usr/include/X11R5
56806/usr/include/X11R4
56807
56808/usr/local/X11/include
56809/usr/local/X11R7/include
56810/usr/local/X11R6/include
56811/usr/local/X11R5/include
56812/usr/local/X11R4/include
56813
56814/usr/local/include/X11
56815/usr/local/include/X11R7
56816/usr/local/include/X11R6
56817/usr/local/include/X11R5
56818/usr/local/include/X11R4
56819
56820/usr/X386/include
56821/usr/x386/include
56822/usr/XFree86/include/X11
56823
56824/usr/include
56825/usr/local/include
56826/usr/unsupported/include
56827/usr/athena/include
56828/usr/local/x11r5/include
56829/usr/lpp/Xamples/include
56830
56831/usr/openwin/include
56832/usr/openwin/share/include'
56833
56834if test "$ac_x_includes" = no; then
56835  # Guess where to find include files, by looking for Xlib.h.
56836  # First, try using that file with no special directory specified.
56837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56838/* end confdefs.h.  */
56839#include <X11/Xlib.h>
56840_ACEOF
56841if ac_fn_cxx_try_cpp "$LINENO"; then :
56842  # We can compile using X headers with no special include directory.
56843ac_x_includes=
56844else
56845  for ac_dir in $ac_x_header_dirs; do
56846  if test -r "$ac_dir/X11/Xlib.h"; then
56847    ac_x_includes=$ac_dir
56848    break
56849  fi
56850done
56851fi
56852rm -f conftest.err conftest.i conftest.$ac_ext
56853fi # $ac_x_includes = no
56854
56855if test "$ac_x_libraries" = no; then
56856  # Check for the libraries.
56857  # See if we find them without any special options.
56858  # Don't add to $LIBS permanently.
56859  ac_save_LIBS=$LIBS
56860  LIBS="-lX11 $LIBS"
56861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56862/* end confdefs.h.  */
56863#include <X11/Xlib.h>
56864int
56865main ()
56866{
56867XrmInitialize ()
56868  ;
56869  return 0;
56870}
56871_ACEOF
56872if ac_fn_cxx_try_link "$LINENO"; then :
56873  LIBS=$ac_save_LIBS
56874# We can link X programs with no special library path.
56875ac_x_libraries=
56876else
56877  LIBS=$ac_save_LIBS
56878for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56879do
56880  # Don't even attempt the hair of trying to link an X program!
56881  for ac_extension in a so sl dylib la dll; do
56882    if test -r "$ac_dir/libX11.$ac_extension"; then
56883      ac_x_libraries=$ac_dir
56884      break 2
56885    fi
56886  done
56887done
56888fi
56889rm -f core conftest.err conftest.$ac_objext \
56890    conftest$ac_exeext conftest.$ac_ext
56891fi # $ac_x_libraries = no
56892
56893case $ac_x_includes,$ac_x_libraries in #(
56894  no,* | *,no | *\'*)
56895    # Didn't find X, or a directory has "'" in its name.
56896    ac_cv_have_x="have_x=no";; #(
56897  *)
56898    # Record where we found X for the cache.
56899    ac_cv_have_x="have_x=yes\
56900	ac_x_includes='$ac_x_includes'\
56901	ac_x_libraries='$ac_x_libraries'"
56902esac
56903fi
56904;; #(
56905    *) have_x=yes;;
56906  esac
56907  eval "$ac_cv_have_x"
56908fi # $with_x != no
56909
56910if test "$have_x" != yes; then
56911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56912$as_echo "$have_x" >&6; }
56913  no_x=yes
56914else
56915  # If each of the values was on the command line, it overrides each guess.
56916  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56917  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56918  # Update the cache value to reflect the command line values.
56919  ac_cv_have_x="have_x=yes\
56920	ac_x_includes='$x_includes'\
56921	ac_x_libraries='$x_libraries'"
56922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56923$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56924fi
56925
56926    if test "$no_x" = yes; then
56927  # Not all programs may use this symbol, but it does not hurt to define it.
56928
56929$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56930
56931  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56932else
56933  if test -n "$x_includes"; then
56934    X_CFLAGS="$X_CFLAGS -I$x_includes"
56935  fi
56936
56937  # It would also be nice to do this for all -L options, not just this one.
56938  if test -n "$x_libraries"; then
56939    X_LIBS="$X_LIBS -L$x_libraries"
56940    # For Solaris; some versions of Sun CC require a space after -R and
56941    # others require no space.  Words are not sufficient . . . .
56942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56943$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56944    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56945    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56946    ac_cxx_werror_flag=yes
56947    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56948/* end confdefs.h.  */
56949
56950int
56951main ()
56952{
56953
56954  ;
56955  return 0;
56956}
56957_ACEOF
56958if ac_fn_cxx_try_link "$LINENO"; then :
56959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56960$as_echo "no" >&6; }
56961       X_LIBS="$X_LIBS -R$x_libraries"
56962else
56963  LIBS="$ac_xsave_LIBS -R $x_libraries"
56964       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56965/* end confdefs.h.  */
56966
56967int
56968main ()
56969{
56970
56971  ;
56972  return 0;
56973}
56974_ACEOF
56975if ac_fn_cxx_try_link "$LINENO"; then :
56976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56977$as_echo "yes" >&6; }
56978	  X_LIBS="$X_LIBS -R $x_libraries"
56979else
56980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56981$as_echo "neither works" >&6; }
56982fi
56983rm -f core conftest.err conftest.$ac_objext \
56984    conftest$ac_exeext conftest.$ac_ext
56985fi
56986rm -f core conftest.err conftest.$ac_objext \
56987    conftest$ac_exeext conftest.$ac_ext
56988    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56989    LIBS=$ac_xsave_LIBS
56990  fi
56991
56992  # Check for system-dependent libraries X programs must link with.
56993  # Do this before checking for the system-independent R6 libraries
56994  # (-lICE), since we may need -lsocket or whatever for X linking.
56995
56996  if test "$ISC" = yes; then
56997    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56998  else
56999    # Martyn Johnson says this is needed for Ultrix, if the X
57000    # libraries were built with DECnet support.  And Karl Berry says
57001    # the Alpha needs dnet_stub (dnet does not exist).
57002    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57003    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57004/* end confdefs.h.  */
57005
57006/* Override any GCC internal prototype to avoid an error.
57007   Use char because int might match the return type of a GCC
57008   builtin and then its argument prototype would still apply.  */
57009#ifdef __cplusplus
57010extern "C"
57011#endif
57012char XOpenDisplay ();
57013int
57014main ()
57015{
57016return XOpenDisplay ();
57017  ;
57018  return 0;
57019}
57020_ACEOF
57021if ac_fn_cxx_try_link "$LINENO"; then :
57022
57023else
57024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57025$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57026if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57027  $as_echo_n "(cached) " >&6
57028else
57029  ac_check_lib_save_LIBS=$LIBS
57030LIBS="-ldnet  $LIBS"
57031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57032/* end confdefs.h.  */
57033
57034/* Override any GCC internal prototype to avoid an error.
57035   Use char because int might match the return type of a GCC
57036   builtin and then its argument prototype would still apply.  */
57037#ifdef __cplusplus
57038extern "C"
57039#endif
57040char dnet_ntoa ();
57041int
57042main ()
57043{
57044return dnet_ntoa ();
57045  ;
57046  return 0;
57047}
57048_ACEOF
57049if ac_fn_cxx_try_link "$LINENO"; then :
57050  ac_cv_lib_dnet_dnet_ntoa=yes
57051else
57052  ac_cv_lib_dnet_dnet_ntoa=no
57053fi
57054rm -f core conftest.err conftest.$ac_objext \
57055    conftest$ac_exeext conftest.$ac_ext
57056LIBS=$ac_check_lib_save_LIBS
57057fi
57058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57059$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57060if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57061  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57062fi
57063
57064    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57066$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57067if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57068  $as_echo_n "(cached) " >&6
57069else
57070  ac_check_lib_save_LIBS=$LIBS
57071LIBS="-ldnet_stub  $LIBS"
57072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57073/* end confdefs.h.  */
57074
57075/* Override any GCC internal prototype to avoid an error.
57076   Use char because int might match the return type of a GCC
57077   builtin and then its argument prototype would still apply.  */
57078#ifdef __cplusplus
57079extern "C"
57080#endif
57081char dnet_ntoa ();
57082int
57083main ()
57084{
57085return dnet_ntoa ();
57086  ;
57087  return 0;
57088}
57089_ACEOF
57090if ac_fn_cxx_try_link "$LINENO"; then :
57091  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57092else
57093  ac_cv_lib_dnet_stub_dnet_ntoa=no
57094fi
57095rm -f core conftest.err conftest.$ac_objext \
57096    conftest$ac_exeext conftest.$ac_ext
57097LIBS=$ac_check_lib_save_LIBS
57098fi
57099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57100$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57101if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57102  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57103fi
57104
57105    fi
57106fi
57107rm -f core conftest.err conftest.$ac_objext \
57108    conftest$ac_exeext conftest.$ac_ext
57109    LIBS="$ac_xsave_LIBS"
57110
57111    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57112    # to get the SysV transport functions.
57113    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57114    # needs -lnsl.
57115    # The nsl library prevents programs from opening the X display
57116    # on Irix 5.2, according to T.E. Dickey.
57117    # The functions gethostbyname, getservbyname, and inet_addr are
57118    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57119    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57120if test "x$ac_cv_func_gethostbyname" = xyes; then :
57121
57122fi
57123
57124    if test $ac_cv_func_gethostbyname = no; then
57125      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57126$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57127if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57128  $as_echo_n "(cached) " >&6
57129else
57130  ac_check_lib_save_LIBS=$LIBS
57131LIBS="-lnsl  $LIBS"
57132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57133/* end confdefs.h.  */
57134
57135/* Override any GCC internal prototype to avoid an error.
57136   Use char because int might match the return type of a GCC
57137   builtin and then its argument prototype would still apply.  */
57138#ifdef __cplusplus
57139extern "C"
57140#endif
57141char gethostbyname ();
57142int
57143main ()
57144{
57145return gethostbyname ();
57146  ;
57147  return 0;
57148}
57149_ACEOF
57150if ac_fn_cxx_try_link "$LINENO"; then :
57151  ac_cv_lib_nsl_gethostbyname=yes
57152else
57153  ac_cv_lib_nsl_gethostbyname=no
57154fi
57155rm -f core conftest.err conftest.$ac_objext \
57156    conftest$ac_exeext conftest.$ac_ext
57157LIBS=$ac_check_lib_save_LIBS
57158fi
57159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57160$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57161if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57162  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57163fi
57164
57165      if test $ac_cv_lib_nsl_gethostbyname = no; then
57166	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57167$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57168if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57169  $as_echo_n "(cached) " >&6
57170else
57171  ac_check_lib_save_LIBS=$LIBS
57172LIBS="-lbsd  $LIBS"
57173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57174/* end confdefs.h.  */
57175
57176/* Override any GCC internal prototype to avoid an error.
57177   Use char because int might match the return type of a GCC
57178   builtin and then its argument prototype would still apply.  */
57179#ifdef __cplusplus
57180extern "C"
57181#endif
57182char gethostbyname ();
57183int
57184main ()
57185{
57186return gethostbyname ();
57187  ;
57188  return 0;
57189}
57190_ACEOF
57191if ac_fn_cxx_try_link "$LINENO"; then :
57192  ac_cv_lib_bsd_gethostbyname=yes
57193else
57194  ac_cv_lib_bsd_gethostbyname=no
57195fi
57196rm -f core conftest.err conftest.$ac_objext \
57197    conftest$ac_exeext conftest.$ac_ext
57198LIBS=$ac_check_lib_save_LIBS
57199fi
57200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57201$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57202if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57203  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57204fi
57205
57206      fi
57207    fi
57208
57209    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57210    # socket/setsockopt and other routines are undefined under SCO ODT
57211    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57212    # on later versions), says Simon Leinen: it contains gethostby*
57213    # variants that don't use the name server (or something).  -lsocket
57214    # must be given before -lnsl if both are needed.  We assume that
57215    # if connect needs -lnsl, so does gethostbyname.
57216    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57217if test "x$ac_cv_func_connect" = xyes; then :
57218
57219fi
57220
57221    if test $ac_cv_func_connect = no; then
57222      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57223$as_echo_n "checking for connect in -lsocket... " >&6; }
57224if ${ac_cv_lib_socket_connect+:} false; then :
57225  $as_echo_n "(cached) " >&6
57226else
57227  ac_check_lib_save_LIBS=$LIBS
57228LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57230/* end confdefs.h.  */
57231
57232/* Override any GCC internal prototype to avoid an error.
57233   Use char because int might match the return type of a GCC
57234   builtin and then its argument prototype would still apply.  */
57235#ifdef __cplusplus
57236extern "C"
57237#endif
57238char connect ();
57239int
57240main ()
57241{
57242return connect ();
57243  ;
57244  return 0;
57245}
57246_ACEOF
57247if ac_fn_cxx_try_link "$LINENO"; then :
57248  ac_cv_lib_socket_connect=yes
57249else
57250  ac_cv_lib_socket_connect=no
57251fi
57252rm -f core conftest.err conftest.$ac_objext \
57253    conftest$ac_exeext conftest.$ac_ext
57254LIBS=$ac_check_lib_save_LIBS
57255fi
57256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57257$as_echo "$ac_cv_lib_socket_connect" >&6; }
57258if test "x$ac_cv_lib_socket_connect" = xyes; then :
57259  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57260fi
57261
57262    fi
57263
57264    # Guillermo Gomez says -lposix is necessary on A/UX.
57265    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57266if test "x$ac_cv_func_remove" = xyes; then :
57267
57268fi
57269
57270    if test $ac_cv_func_remove = no; then
57271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57272$as_echo_n "checking for remove in -lposix... " >&6; }
57273if ${ac_cv_lib_posix_remove+:} false; then :
57274  $as_echo_n "(cached) " >&6
57275else
57276  ac_check_lib_save_LIBS=$LIBS
57277LIBS="-lposix  $LIBS"
57278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57279/* end confdefs.h.  */
57280
57281/* Override any GCC internal prototype to avoid an error.
57282   Use char because int might match the return type of a GCC
57283   builtin and then its argument prototype would still apply.  */
57284#ifdef __cplusplus
57285extern "C"
57286#endif
57287char remove ();
57288int
57289main ()
57290{
57291return remove ();
57292  ;
57293  return 0;
57294}
57295_ACEOF
57296if ac_fn_cxx_try_link "$LINENO"; then :
57297  ac_cv_lib_posix_remove=yes
57298else
57299  ac_cv_lib_posix_remove=no
57300fi
57301rm -f core conftest.err conftest.$ac_objext \
57302    conftest$ac_exeext conftest.$ac_ext
57303LIBS=$ac_check_lib_save_LIBS
57304fi
57305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57306$as_echo "$ac_cv_lib_posix_remove" >&6; }
57307if test "x$ac_cv_lib_posix_remove" = xyes; then :
57308  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57309fi
57310
57311    fi
57312
57313    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57314    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57315if test "x$ac_cv_func_shmat" = xyes; then :
57316
57317fi
57318
57319    if test $ac_cv_func_shmat = no; then
57320      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57321$as_echo_n "checking for shmat in -lipc... " >&6; }
57322if ${ac_cv_lib_ipc_shmat+:} false; then :
57323  $as_echo_n "(cached) " >&6
57324else
57325  ac_check_lib_save_LIBS=$LIBS
57326LIBS="-lipc  $LIBS"
57327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57328/* end confdefs.h.  */
57329
57330/* Override any GCC internal prototype to avoid an error.
57331   Use char because int might match the return type of a GCC
57332   builtin and then its argument prototype would still apply.  */
57333#ifdef __cplusplus
57334extern "C"
57335#endif
57336char shmat ();
57337int
57338main ()
57339{
57340return shmat ();
57341  ;
57342  return 0;
57343}
57344_ACEOF
57345if ac_fn_cxx_try_link "$LINENO"; then :
57346  ac_cv_lib_ipc_shmat=yes
57347else
57348  ac_cv_lib_ipc_shmat=no
57349fi
57350rm -f core conftest.err conftest.$ac_objext \
57351    conftest$ac_exeext conftest.$ac_ext
57352LIBS=$ac_check_lib_save_LIBS
57353fi
57354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57355$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57356if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57357  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57358fi
57359
57360    fi
57361  fi
57362
57363  # Check for libraries that X11R6 Xt/Xaw programs need.
57364  ac_save_LDFLAGS=$LDFLAGS
57365  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57366  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57367  # check for ICE first), but we must link in the order -lSM -lICE or
57368  # we get undefined symbols.  So assume we have SM if we have ICE.
57369  # These have to be linked with before -lX11, unlike the other
57370  # libraries we check for below, so use a different variable.
57371  # John Interrante, Karl Berry
57372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57373$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57374if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57375  $as_echo_n "(cached) " >&6
57376else
57377  ac_check_lib_save_LIBS=$LIBS
57378LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57380/* end confdefs.h.  */
57381
57382/* Override any GCC internal prototype to avoid an error.
57383   Use char because int might match the return type of a GCC
57384   builtin and then its argument prototype would still apply.  */
57385#ifdef __cplusplus
57386extern "C"
57387#endif
57388char IceConnectionNumber ();
57389int
57390main ()
57391{
57392return IceConnectionNumber ();
57393  ;
57394  return 0;
57395}
57396_ACEOF
57397if ac_fn_cxx_try_link "$LINENO"; then :
57398  ac_cv_lib_ICE_IceConnectionNumber=yes
57399else
57400  ac_cv_lib_ICE_IceConnectionNumber=no
57401fi
57402rm -f core conftest.err conftest.$ac_objext \
57403    conftest$ac_exeext conftest.$ac_ext
57404LIBS=$ac_check_lib_save_LIBS
57405fi
57406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57407$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57408if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57409  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57410fi
57411
57412  LDFLAGS=$ac_save_LDFLAGS
57413
57414fi
57415
57416
57417    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57418    # this doesn't make sense so we remove it.
57419    if test "x$COMPILE_TYPE" = xcross; then
57420      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57421    fi
57422
57423    if test "x$no_x" = xyes; then
57424
57425  # Print a helpful message on how to acquire the necessary build dependency.
57426  # x11 is the help tag: freetype, cups, alsa etc
57427  MISSING_DEPENDENCY=x11
57428
57429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57430    cygwin_help $MISSING_DEPENDENCY
57431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57432    msys_help $MISSING_DEPENDENCY
57433  else
57434    PKGHANDLER_COMMAND=
57435
57436    case $PKGHANDLER in
57437      apt-get)
57438        apt_help     $MISSING_DEPENDENCY ;;
57439      yum)
57440        yum_help     $MISSING_DEPENDENCY ;;
57441      brew)
57442        brew_help    $MISSING_DEPENDENCY ;;
57443      port)
57444        port_help    $MISSING_DEPENDENCY ;;
57445      pkgutil)
57446        pkgutil_help $MISSING_DEPENDENCY ;;
57447      pkgadd)
57448        pkgadd_help  $MISSING_DEPENDENCY ;;
57449    esac
57450
57451    if test "x$PKGHANDLER_COMMAND" != x; then
57452      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57453    fi
57454  fi
57455
57456      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57457    fi
57458
57459    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57460      OPENWIN_HOME="/usr/openwin"
57461      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57462      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57463          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57464    fi
57465
57466    ac_ext=c
57467ac_cpp='$CPP $CPPFLAGS'
57468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57470ac_compiler_gnu=$ac_cv_c_compiler_gnu
57471
57472    OLD_CFLAGS="$CFLAGS"
57473    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57474
57475    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57476    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57477do :
57478  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57479ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57480          # include <X11/Xlib.h>
57481          # include <X11/Xutil.h>
57482
57483
57484"
57485if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57486  cat >>confdefs.h <<_ACEOF
57487#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57488_ACEOF
57489 X11_HEADERS_OK=yes
57490else
57491  X11_HEADERS_OK=no; break
57492fi
57493
57494done
57495
57496
57497    if test "x$X11_HEADERS_OK" = xno; then
57498
57499  # Print a helpful message on how to acquire the necessary build dependency.
57500  # x11 is the help tag: freetype, cups, alsa etc
57501  MISSING_DEPENDENCY=x11
57502
57503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57504    cygwin_help $MISSING_DEPENDENCY
57505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57506    msys_help $MISSING_DEPENDENCY
57507  else
57508    PKGHANDLER_COMMAND=
57509
57510    case $PKGHANDLER in
57511      apt-get)
57512        apt_help     $MISSING_DEPENDENCY ;;
57513      yum)
57514        yum_help     $MISSING_DEPENDENCY ;;
57515      brew)
57516        brew_help    $MISSING_DEPENDENCY ;;
57517      port)
57518        port_help    $MISSING_DEPENDENCY ;;
57519      pkgutil)
57520        pkgutil_help $MISSING_DEPENDENCY ;;
57521      pkgadd)
57522        pkgadd_help  $MISSING_DEPENDENCY ;;
57523    esac
57524
57525    if test "x$PKGHANDLER_COMMAND" != x; then
57526      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57527    fi
57528  fi
57529
57530      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57531    fi
57532
57533    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57534    # defined in libawt_xawt.
57535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57536$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57537    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57538/* end confdefs.h.  */
57539#include <X11/extensions/Xrender.h>
57540int
57541main ()
57542{
57543XLinearGradient x;
57544  ;
57545  return 0;
57546}
57547_ACEOF
57548if ac_fn_c_try_compile "$LINENO"; then :
57549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57550$as_echo "yes" >&6; }
57551else
57552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57553$as_echo "no" >&6; }
57554         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57555fi
57556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57557
57558    CFLAGS="$OLD_CFLAGS"
57559    ac_ext=cpp
57560ac_cpp='$CXXCPP $CPPFLAGS'
57561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57564
57565  fi # NEEDS_LIB_X11
57566
57567
57568
57569
57570
57571
57572# Check whether --with-cups was given.
57573if test "${with_cups+set}" = set; then :
57574  withval=$with_cups;
57575fi
57576
57577
57578# Check whether --with-cups-include was given.
57579if test "${with_cups_include+set}" = set; then :
57580  withval=$with_cups_include;
57581fi
57582
57583
57584  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57585    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57586        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57587      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57588$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57589    fi
57590    CUPS_CFLAGS=
57591  else
57592    CUPS_FOUND=no
57593
57594    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57595      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57596    fi
57597
57598    if test "x${with_cups}" != x; then
57599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57600$as_echo_n "checking for cups headers... " >&6; }
57601      if test -s "${with_cups}/include/cups/cups.h"; then
57602        CUPS_CFLAGS="-I${with_cups}/include"
57603        CUPS_FOUND=yes
57604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57605$as_echo "$CUPS_FOUND" >&6; }
57606      else
57607        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57608      fi
57609    fi
57610    if test "x${with_cups_include}" != x; then
57611      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57612$as_echo_n "checking for cups headers... " >&6; }
57613      if test -s "${with_cups_include}/cups/cups.h"; then
57614        CUPS_CFLAGS="-I${with_cups_include}"
57615        CUPS_FOUND=yes
57616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57617$as_echo "$CUPS_FOUND" >&6; }
57618      else
57619        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57620      fi
57621    fi
57622    if test "x$CUPS_FOUND" = xno; then
57623      # Are the cups headers installed in the default /usr/include location?
57624      for ac_header in cups/cups.h cups/ppd.h
57625do :
57626  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57627ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57628if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57629  cat >>confdefs.h <<_ACEOF
57630#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57631_ACEOF
57632
57633          CUPS_FOUND=yes
57634          CUPS_CFLAGS=
57635          DEFAULT_CUPS=yes
57636
57637fi
57638
57639done
57640
57641    fi
57642    if test "x$CUPS_FOUND" = xno; then
57643
57644  # Print a helpful message on how to acquire the necessary build dependency.
57645  # cups is the help tag: freetype, cups, alsa etc
57646  MISSING_DEPENDENCY=cups
57647
57648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57649    cygwin_help $MISSING_DEPENDENCY
57650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57651    msys_help $MISSING_DEPENDENCY
57652  else
57653    PKGHANDLER_COMMAND=
57654
57655    case $PKGHANDLER in
57656      apt-get)
57657        apt_help     $MISSING_DEPENDENCY ;;
57658      yum)
57659        yum_help     $MISSING_DEPENDENCY ;;
57660      brew)
57661        brew_help    $MISSING_DEPENDENCY ;;
57662      port)
57663        port_help    $MISSING_DEPENDENCY ;;
57664      pkgutil)
57665        pkgutil_help $MISSING_DEPENDENCY ;;
57666      pkgadd)
57667        pkgadd_help  $MISSING_DEPENDENCY ;;
57668    esac
57669
57670    if test "x$PKGHANDLER_COMMAND" != x; then
57671      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57672    fi
57673  fi
57674
57675      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57676    fi
57677  fi
57678
57679
57680
57681
57682
57683# Check whether --with-freetype was given.
57684if test "${with_freetype+set}" = set; then :
57685  withval=$with_freetype;
57686fi
57687
57688
57689# Check whether --with-freetype-include was given.
57690if test "${with_freetype_include+set}" = set; then :
57691  withval=$with_freetype_include;
57692fi
57693
57694
57695# Check whether --with-freetype-lib was given.
57696if test "${with_freetype_lib+set}" = set; then :
57697  withval=$with_freetype_lib;
57698fi
57699
57700
57701# Check whether --with-freetype-src was given.
57702if test "${with_freetype_src+set}" = set; then :
57703  withval=$with_freetype_src;
57704fi
57705
57706  # Check whether --enable-freetype-bundling was given.
57707if test "${enable_freetype_bundling+set}" = set; then :
57708  enableval=$enable_freetype_bundling;
57709fi
57710
57711
57712# Check whether --with-freetype-license was given.
57713if test "${with_freetype_license+set}" = set; then :
57714  withval=$with_freetype_license;
57715fi
57716
57717
57718  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57719  FREETYPE_BASE_NAME=freetype
57720  FREETYPE_CFLAGS=
57721  FREETYPE_LIBS=
57722  FREETYPE_BUNDLE_LIB_PATH=
57723
57724  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57725    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57726        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57727        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57728        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57729      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57730$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57731    fi
57732    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57733      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57734$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57735    fi
57736  else
57737    # freetype is needed to build; go get it!
57738
57739    BUNDLE_FREETYPE="$enable_freetype_bundling"
57740
57741    if  test "x$with_freetype_src" != x; then
57742      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57743        # Try to build freetype if --with-freetype-src was given on Windows
57744
57745  FREETYPE_SRC_PATH="$with_freetype_src"
57746  BUILD_FREETYPE=yes
57747
57748  # Check if the freetype sources are acessible..
57749  if ! test -d $FREETYPE_SRC_PATH; then
57750    { $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
57751$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57752    BUILD_FREETYPE=no
57753  fi
57754  # ..and contain a vc2010 project file
57755  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57756  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57757    { $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
57758$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57759    BUILD_FREETYPE=no
57760  fi
57761  # Now check if configure found a version of 'msbuild.exe'
57762  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57763    { $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
57764$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;}
57765    BUILD_FREETYPE=no
57766  fi
57767
57768  # Ready to go..
57769  if test "x$BUILD_FREETYPE" = xyes; then
57770    # msbuild requires trailing slashes for output directories
57771    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57772    freetype_lib_path_unix="$freetype_lib_path"
57773    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57774
57775  unix_path="$vcxproj_path"
57776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57777    windows_path=`$CYGPATH -m "$unix_path"`
57778    vcxproj_path="$windows_path"
57779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57780    windows_path=`cmd //c echo $unix_path`
57781    vcxproj_path="$windows_path"
57782  fi
57783
57784
57785  unix_path="$freetype_lib_path"
57786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57787    windows_path=`$CYGPATH -m "$unix_path"`
57788    freetype_lib_path="$windows_path"
57789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57790    windows_path=`cmd //c echo $unix_path`
57791    freetype_lib_path="$windows_path"
57792  fi
57793
57794
57795  unix_path="$freetype_obj_path"
57796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57797    windows_path=`$CYGPATH -m "$unix_path"`
57798    freetype_obj_path="$windows_path"
57799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57800    windows_path=`cmd //c echo $unix_path`
57801    freetype_obj_path="$windows_path"
57802  fi
57803
57804    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57805      freetype_platform=x64
57806    else
57807      freetype_platform=win32
57808    fi
57809
57810    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57811    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57812    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57813    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57814    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57815$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57816
57817    # First we try to build the freetype.dll
57818    $ECHO -e "@echo off\n"\
57819        "$MSBUILD $vcxproj_path "\
57820        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57821        "/p:Configuration=\"Release Multithreaded\" "\
57822        "/p:Platform=$freetype_platform "\
57823        "/p:ConfigurationType=DynamicLibrary "\
57824        "/p:TargetName=freetype "\
57825        "/p:OutDir=\"$freetype_lib_path\" "\
57826        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57827    cmd /c freetype.bat
57828
57829    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57830      # If that succeeds we also build freetype.lib
57831      $ECHO -e "@echo off\n"\
57832          "$MSBUILD $vcxproj_path "\
57833          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57834          "/p:Configuration=\"Release Multithreaded\" "\
57835          "/p:Platform=$freetype_platform "\
57836          "/p:ConfigurationType=StaticLibrary "\
57837          "/p:TargetName=freetype "\
57838          "/p:OutDir=\"$freetype_lib_path\" "\
57839          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57840      cmd /c freetype.bat
57841
57842      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57843        # Once we build both, lib and dll, set freetype lib and include path appropriately
57844        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57845        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57846        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57847$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57848      else
57849        BUILD_FREETYPE=no
57850      fi
57851    else
57852      BUILD_FREETYPE=no
57853    fi
57854  fi
57855
57856        if test "x$BUILD_FREETYPE" = xyes; then
57857          # Okay, we built it. Check that it works.
57858
57859  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57860  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57861  METHOD="--with-freetype-src"
57862
57863  # Let's start with an optimistic view of the world :-)
57864  FOUND_FREETYPE=yes
57865
57866  # First look for the canonical freetype main include file ft2build.h.
57867  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57868    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57869    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57870    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57871      # Fail.
57872      FOUND_FREETYPE=no
57873    fi
57874  fi
57875
57876  if test "x$FOUND_FREETYPE" = xyes; then
57877    # Include file found, let's continue the sanity check.
57878    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57879$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57880
57881    # Reset to default value
57882    FREETYPE_BASE_NAME=freetype
57883    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57884    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57885      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57886          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57887        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57888        # for the .6 version explicitly.
57889        FREETYPE_BASE_NAME=freetype.6
57890        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57891        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57892$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57893      else
57894        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57895$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57896        FOUND_FREETYPE=no
57897      fi
57898    else
57899      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57900        # On Windows, we will need both .lib and .dll file.
57901        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57902          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57903$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57904          FOUND_FREETYPE=no
57905        fi
57906      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57907          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57908        # Found lib in isa dir, use that instead.
57909        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57910        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57911$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57912      fi
57913    fi
57914  fi
57915
57916  if test "x$FOUND_FREETYPE" = xyes; then
57917
57918  # Only process if variable expands to non-empty
57919
57920  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57922
57923  # Input might be given as Windows format, start by converting to
57924  # unix format.
57925  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57926  new_path=`$CYGPATH -u "$path"`
57927
57928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57931  # "foo.exe" is OK but "foo" is an error.
57932  #
57933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57934  # It is also a way to make sure we got the proper file name for the real test later on.
57935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57936  if test "x$test_shortpath" = x; then
57937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57938$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57939    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57940  fi
57941
57942  # Call helper function which possibly converts this using DOS-style short mode.
57943  # If so, the updated path is stored in $new_path.
57944
57945  input_path="$new_path"
57946  # Check if we need to convert this using DOS-style short mode. If the path
57947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57948  # take no chances and rewrite it.
57949  # Note: m4 eats our [], so we need to use [ and ] instead.
57950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57951  if test "x$has_forbidden_chars" != x; then
57952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57956      # Going to short mode and back again did indeed matter. Since short mode is
57957      # case insensitive, let's make it lowercase to improve readability.
57958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57959      # Now convert it back to Unix-style (cygpath)
57960      input_path=`$CYGPATH -u "$shortmode_path"`
57961      new_path="$input_path"
57962    fi
57963  fi
57964
57965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57966  if test "x$test_cygdrive_prefix" = x; then
57967    # As a simple fix, exclude /usr/bin since it's not a real path.
57968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57970      # a path prefixed by /cygdrive for fixpath to work.
57971      new_path="$CYGWIN_ROOT_PATH$input_path"
57972    fi
57973  fi
57974
57975
57976  if test "x$path" != "x$new_path"; then
57977    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57979$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57980  fi
57981
57982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57983
57984  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57985  has_colon=`$ECHO $path | $GREP ^.:`
57986  new_path="$path"
57987  if test "x$has_colon" = x; then
57988    # Not in mixed or Windows style, start by that.
57989    new_path=`cmd //c echo $path`
57990  fi
57991
57992
57993  input_path="$new_path"
57994  # Check if we need to convert this using DOS-style short mode. If the path
57995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57996  # take no chances and rewrite it.
57997  # Note: m4 eats our [], so we need to use [ and ] instead.
57998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57999  if test "x$has_forbidden_chars" != x; then
58000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58002  fi
58003
58004
58005  windows_path="$new_path"
58006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58007    unix_path=`$CYGPATH -u "$windows_path"`
58008    new_path="$unix_path"
58009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58011    new_path="$unix_path"
58012  fi
58013
58014  if test "x$path" != "x$new_path"; then
58015    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58018  fi
58019
58020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58022
58023    else
58024      # We're on a unix platform. Hooray! :)
58025      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58026      has_space=`$ECHO "$path" | $GREP " "`
58027      if test "x$has_space" != x; then
58028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58031      fi
58032
58033      # Use eval to expand a potential ~
58034      eval path="$path"
58035      if test ! -f "$path" && test ! -d "$path"; then
58036        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58037      fi
58038
58039      if test -d "$path"; then
58040        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58041      else
58042        dir="`$DIRNAME "$path"`"
58043        base="`$BASENAME "$path"`"
58044        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58045      fi
58046    fi
58047  fi
58048
58049
58050  # Only process if variable expands to non-empty
58051
58052  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58054
58055  # Input might be given as Windows format, start by converting to
58056  # unix format.
58057  path="$POTENTIAL_FREETYPE_LIB_PATH"
58058  new_path=`$CYGPATH -u "$path"`
58059
58060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58063  # "foo.exe" is OK but "foo" is an error.
58064  #
58065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58066  # It is also a way to make sure we got the proper file name for the real test later on.
58067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58068  if test "x$test_shortpath" = x; then
58069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58071    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58072  fi
58073
58074  # Call helper function which possibly converts this using DOS-style short mode.
58075  # If so, the updated path is stored in $new_path.
58076
58077  input_path="$new_path"
58078  # Check if we need to convert this using DOS-style short mode. If the path
58079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58080  # take no chances and rewrite it.
58081  # Note: m4 eats our [], so we need to use [ and ] instead.
58082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58083  if test "x$has_forbidden_chars" != x; then
58084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58088      # Going to short mode and back again did indeed matter. Since short mode is
58089      # case insensitive, let's make it lowercase to improve readability.
58090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58091      # Now convert it back to Unix-style (cygpath)
58092      input_path=`$CYGPATH -u "$shortmode_path"`
58093      new_path="$input_path"
58094    fi
58095  fi
58096
58097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58098  if test "x$test_cygdrive_prefix" = x; then
58099    # As a simple fix, exclude /usr/bin since it's not a real path.
58100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58102      # a path prefixed by /cygdrive for fixpath to work.
58103      new_path="$CYGWIN_ROOT_PATH$input_path"
58104    fi
58105  fi
58106
58107
58108  if test "x$path" != "x$new_path"; then
58109    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58111$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58112  fi
58113
58114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58115
58116  path="$POTENTIAL_FREETYPE_LIB_PATH"
58117  has_colon=`$ECHO $path | $GREP ^.:`
58118  new_path="$path"
58119  if test "x$has_colon" = x; then
58120    # Not in mixed or Windows style, start by that.
58121    new_path=`cmd //c echo $path`
58122  fi
58123
58124
58125  input_path="$new_path"
58126  # Check if we need to convert this using DOS-style short mode. If the path
58127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58128  # take no chances and rewrite it.
58129  # Note: m4 eats our [], so we need to use [ and ] instead.
58130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58131  if test "x$has_forbidden_chars" != x; then
58132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58134  fi
58135
58136
58137  windows_path="$new_path"
58138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58139    unix_path=`$CYGPATH -u "$windows_path"`
58140    new_path="$unix_path"
58141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58143    new_path="$unix_path"
58144  fi
58145
58146  if test "x$path" != "x$new_path"; then
58147    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58150  fi
58151
58152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58154
58155    else
58156      # We're on a unix platform. Hooray! :)
58157      path="$POTENTIAL_FREETYPE_LIB_PATH"
58158      has_space=`$ECHO "$path" | $GREP " "`
58159      if test "x$has_space" != x; then
58160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58162        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58163      fi
58164
58165      # Use eval to expand a potential ~
58166      eval path="$path"
58167      if test ! -f "$path" && test ! -d "$path"; then
58168        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58169      fi
58170
58171      if test -d "$path"; then
58172        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58173      else
58174        dir="`$DIRNAME "$path"`"
58175        base="`$BASENAME "$path"`"
58176        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58177      fi
58178    fi
58179  fi
58180
58181
58182    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58184$as_echo_n "checking for freetype includes... " >&6; }
58185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58186$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58187    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58189$as_echo_n "checking for freetype libraries... " >&6; }
58190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58191$as_echo "$FREETYPE_LIB_PATH" >&6; }
58192  fi
58193
58194          if test "x$FOUND_FREETYPE" != xyes; then
58195            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58196          fi
58197        else
58198          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58199$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58200          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58201        fi
58202      else
58203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58204$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58205      fi
58206    fi
58207
58208    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58209      # User has specified settings
58210
58211      if test "x$BUNDLE_FREETYPE" = x; then
58212        # If not specified, default is to bundle freetype
58213        BUNDLE_FREETYPE=yes
58214      fi
58215
58216      if test "x$with_freetype" != x; then
58217        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58218        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58219      fi
58220
58221      # Allow --with-freetype-lib and --with-freetype-include to override
58222      if test "x$with_freetype_include" != x; then
58223        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58224      fi
58225      if test "x$with_freetype_lib" != x; then
58226        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58227      fi
58228
58229      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58230        # Okay, we got it. Check that it works.
58231
58232  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58233  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58234  METHOD="--with-freetype"
58235
58236  # Let's start with an optimistic view of the world :-)
58237  FOUND_FREETYPE=yes
58238
58239  # First look for the canonical freetype main include file ft2build.h.
58240  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58241    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58242    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58243    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58244      # Fail.
58245      FOUND_FREETYPE=no
58246    fi
58247  fi
58248
58249  if test "x$FOUND_FREETYPE" = xyes; then
58250    # Include file found, let's continue the sanity check.
58251    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58252$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58253
58254    # Reset to default value
58255    FREETYPE_BASE_NAME=freetype
58256    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58257    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58258      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58259          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58260        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58261        # for the .6 version explicitly.
58262        FREETYPE_BASE_NAME=freetype.6
58263        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58264        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58265$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58266      else
58267        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58268$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58269        FOUND_FREETYPE=no
58270      fi
58271    else
58272      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58273        # On Windows, we will need both .lib and .dll file.
58274        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58275          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58276$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58277          FOUND_FREETYPE=no
58278        fi
58279      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58280          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58281        # Found lib in isa dir, use that instead.
58282        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58283        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58284$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58285      fi
58286    fi
58287  fi
58288
58289  if test "x$FOUND_FREETYPE" = xyes; then
58290
58291  # Only process if variable expands to non-empty
58292
58293  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58295
58296  # Input might be given as Windows format, start by converting to
58297  # unix format.
58298  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58299  new_path=`$CYGPATH -u "$path"`
58300
58301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58304  # "foo.exe" is OK but "foo" is an error.
58305  #
58306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58307  # It is also a way to make sure we got the proper file name for the real test later on.
58308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58309  if test "x$test_shortpath" = x; then
58310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58312    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58313  fi
58314
58315  # Call helper function which possibly converts this using DOS-style short mode.
58316  # If so, the updated path is stored in $new_path.
58317
58318  input_path="$new_path"
58319  # Check if we need to convert this using DOS-style short mode. If the path
58320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58321  # take no chances and rewrite it.
58322  # Note: m4 eats our [], so we need to use [ and ] instead.
58323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58324  if test "x$has_forbidden_chars" != x; then
58325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58329      # Going to short mode and back again did indeed matter. Since short mode is
58330      # case insensitive, let's make it lowercase to improve readability.
58331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58332      # Now convert it back to Unix-style (cygpath)
58333      input_path=`$CYGPATH -u "$shortmode_path"`
58334      new_path="$input_path"
58335    fi
58336  fi
58337
58338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58339  if test "x$test_cygdrive_prefix" = x; then
58340    # As a simple fix, exclude /usr/bin since it's not a real path.
58341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58343      # a path prefixed by /cygdrive for fixpath to work.
58344      new_path="$CYGWIN_ROOT_PATH$input_path"
58345    fi
58346  fi
58347
58348
58349  if test "x$path" != "x$new_path"; then
58350    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58352$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58353  fi
58354
58355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58356
58357  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58358  has_colon=`$ECHO $path | $GREP ^.:`
58359  new_path="$path"
58360  if test "x$has_colon" = x; then
58361    # Not in mixed or Windows style, start by that.
58362    new_path=`cmd //c echo $path`
58363  fi
58364
58365
58366  input_path="$new_path"
58367  # Check if we need to convert this using DOS-style short mode. If the path
58368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58369  # take no chances and rewrite it.
58370  # Note: m4 eats our [], so we need to use [ and ] instead.
58371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58372  if test "x$has_forbidden_chars" != x; then
58373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58375  fi
58376
58377
58378  windows_path="$new_path"
58379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58380    unix_path=`$CYGPATH -u "$windows_path"`
58381    new_path="$unix_path"
58382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58384    new_path="$unix_path"
58385  fi
58386
58387  if test "x$path" != "x$new_path"; then
58388    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58390$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58391  fi
58392
58393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58395
58396    else
58397      # We're on a unix platform. Hooray! :)
58398      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58399      has_space=`$ECHO "$path" | $GREP " "`
58400      if test "x$has_space" != x; then
58401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58402$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58404      fi
58405
58406      # Use eval to expand a potential ~
58407      eval path="$path"
58408      if test ! -f "$path" && test ! -d "$path"; then
58409        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58410      fi
58411
58412      if test -d "$path"; then
58413        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58414      else
58415        dir="`$DIRNAME "$path"`"
58416        base="`$BASENAME "$path"`"
58417        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58418      fi
58419    fi
58420  fi
58421
58422
58423  # Only process if variable expands to non-empty
58424
58425  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58427
58428  # Input might be given as Windows format, start by converting to
58429  # unix format.
58430  path="$POTENTIAL_FREETYPE_LIB_PATH"
58431  new_path=`$CYGPATH -u "$path"`
58432
58433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58436  # "foo.exe" is OK but "foo" is an error.
58437  #
58438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58439  # It is also a way to make sure we got the proper file name for the real test later on.
58440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58441  if test "x$test_shortpath" = x; then
58442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58444    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58445  fi
58446
58447  # Call helper function which possibly converts this using DOS-style short mode.
58448  # If so, the updated path is stored in $new_path.
58449
58450  input_path="$new_path"
58451  # Check if we need to convert this using DOS-style short mode. If the path
58452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58453  # take no chances and rewrite it.
58454  # Note: m4 eats our [], so we need to use [ and ] instead.
58455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58456  if test "x$has_forbidden_chars" != x; then
58457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58461      # Going to short mode and back again did indeed matter. Since short mode is
58462      # case insensitive, let's make it lowercase to improve readability.
58463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58464      # Now convert it back to Unix-style (cygpath)
58465      input_path=`$CYGPATH -u "$shortmode_path"`
58466      new_path="$input_path"
58467    fi
58468  fi
58469
58470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58471  if test "x$test_cygdrive_prefix" = x; then
58472    # As a simple fix, exclude /usr/bin since it's not a real path.
58473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58475      # a path prefixed by /cygdrive for fixpath to work.
58476      new_path="$CYGWIN_ROOT_PATH$input_path"
58477    fi
58478  fi
58479
58480
58481  if test "x$path" != "x$new_path"; then
58482    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58485  fi
58486
58487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58488
58489  path="$POTENTIAL_FREETYPE_LIB_PATH"
58490  has_colon=`$ECHO $path | $GREP ^.:`
58491  new_path="$path"
58492  if test "x$has_colon" = x; then
58493    # Not in mixed or Windows style, start by that.
58494    new_path=`cmd //c echo $path`
58495  fi
58496
58497
58498  input_path="$new_path"
58499  # Check if we need to convert this using DOS-style short mode. If the path
58500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58501  # take no chances and rewrite it.
58502  # Note: m4 eats our [], so we need to use [ and ] instead.
58503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58504  if test "x$has_forbidden_chars" != x; then
58505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58507  fi
58508
58509
58510  windows_path="$new_path"
58511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58512    unix_path=`$CYGPATH -u "$windows_path"`
58513    new_path="$unix_path"
58514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58516    new_path="$unix_path"
58517  fi
58518
58519  if test "x$path" != "x$new_path"; then
58520    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58523  fi
58524
58525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58527
58528    else
58529      # We're on a unix platform. Hooray! :)
58530      path="$POTENTIAL_FREETYPE_LIB_PATH"
58531      has_space=`$ECHO "$path" | $GREP " "`
58532      if test "x$has_space" != x; then
58533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58536      fi
58537
58538      # Use eval to expand a potential ~
58539      eval path="$path"
58540      if test ! -f "$path" && test ! -d "$path"; then
58541        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58542      fi
58543
58544      if test -d "$path"; then
58545        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58546      else
58547        dir="`$DIRNAME "$path"`"
58548        base="`$BASENAME "$path"`"
58549        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58550      fi
58551    fi
58552  fi
58553
58554
58555    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58557$as_echo_n "checking for freetype includes... " >&6; }
58558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58559$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58560    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58562$as_echo_n "checking for freetype libraries... " >&6; }
58563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58564$as_echo "$FREETYPE_LIB_PATH" >&6; }
58565  fi
58566
58567        if test "x$FOUND_FREETYPE" != xyes; then
58568          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58569        fi
58570      else
58571        # User specified only one of lib or include. This is an error.
58572        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58573          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58574$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58575          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58576        else
58577          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58578$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58579          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58580        fi
58581      fi
58582    else
58583      # User did not specify settings, but we need freetype. Try to locate it.
58584
58585      if test "x$BUNDLE_FREETYPE" = x; then
58586        # If not specified, default is to bundle freetype only on windows
58587        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58588          BUNDLE_FREETYPE=yes
58589        else
58590          BUNDLE_FREETYPE=no
58591        fi
58592      fi
58593
58594      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58595      if test "x$SYSROOT" = x; then
58596        if test "x$FOUND_FREETYPE" != xyes; then
58597          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58598          if test "x$PKG_CONFIG" != x; then
58599
58600pkg_failed=no
58601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58602$as_echo_n "checking for FREETYPE... " >&6; }
58603
58604if test -n "$FREETYPE_CFLAGS"; then
58605    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58606 elif test -n "$PKG_CONFIG"; then
58607    if test -n "$PKG_CONFIG" && \
58608    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58609  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58610  ac_status=$?
58611  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58612  test $ac_status = 0; }; then
58613  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58614else
58615  pkg_failed=yes
58616fi
58617 else
58618    pkg_failed=untried
58619fi
58620if test -n "$FREETYPE_LIBS"; then
58621    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58622 elif test -n "$PKG_CONFIG"; then
58623    if test -n "$PKG_CONFIG" && \
58624    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58625  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58626  ac_status=$?
58627  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58628  test $ac_status = 0; }; then
58629  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58630else
58631  pkg_failed=yes
58632fi
58633 else
58634    pkg_failed=untried
58635fi
58636
58637
58638
58639if test $pkg_failed = yes; then
58640
58641if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58642        _pkg_short_errors_supported=yes
58643else
58644        _pkg_short_errors_supported=no
58645fi
58646        if test $_pkg_short_errors_supported = yes; then
58647	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58648        else
58649	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58650        fi
58651	# Put the nasty error message in config.log where it belongs
58652	echo "$FREETYPE_PKG_ERRORS" >&5
58653
58654	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58655$as_echo "no" >&6; }
58656                FOUND_FREETYPE=no
58657elif test $pkg_failed = untried; then
58658	FOUND_FREETYPE=no
58659else
58660	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58661	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58663$as_echo "yes" >&6; }
58664	FOUND_FREETYPE=yes
58665fi
58666            if test "x$FOUND_FREETYPE" = xyes; then
58667              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58668              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58669              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58670              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58671                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58672              fi
58673              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58674              if test "x$BUNDLE_FREETYPE" = xyes; then
58675                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58676$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58677                FOUND_FREETYPE=no
58678              else
58679                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58680$as_echo_n "checking for freetype... " >&6; }
58681                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58682$as_echo "yes (using pkg-config)" >&6; }
58683              fi
58684            fi
58685          fi
58686        fi
58687      fi
58688
58689      if test "x$FOUND_FREETYPE" != xyes; then
58690        # Check in well-known locations
58691        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58692          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58693
58694  windows_path="$FREETYPE_BASE_DIR"
58695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58696    unix_path=`$CYGPATH -u "$windows_path"`
58697    FREETYPE_BASE_DIR="$unix_path"
58698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58700    FREETYPE_BASE_DIR="$unix_path"
58701  fi
58702
58703
58704  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58705  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58706  METHOD="well-known location"
58707
58708  # Let's start with an optimistic view of the world :-)
58709  FOUND_FREETYPE=yes
58710
58711  # First look for the canonical freetype main include file ft2build.h.
58712  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58713    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58714    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58715    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58716      # Fail.
58717      FOUND_FREETYPE=no
58718    fi
58719  fi
58720
58721  if test "x$FOUND_FREETYPE" = xyes; then
58722    # Include file found, let's continue the sanity check.
58723    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58724$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58725
58726    # Reset to default value
58727    FREETYPE_BASE_NAME=freetype
58728    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58729    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58730      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58731          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58732        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58733        # for the .6 version explicitly.
58734        FREETYPE_BASE_NAME=freetype.6
58735        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58736        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58737$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58738      else
58739        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58740$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58741        FOUND_FREETYPE=no
58742      fi
58743    else
58744      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58745        # On Windows, we will need both .lib and .dll file.
58746        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58747          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58748$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58749          FOUND_FREETYPE=no
58750        fi
58751      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58752          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58753        # Found lib in isa dir, use that instead.
58754        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58755        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58756$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58757      fi
58758    fi
58759  fi
58760
58761  if test "x$FOUND_FREETYPE" = xyes; then
58762
58763  # Only process if variable expands to non-empty
58764
58765  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58767
58768  # Input might be given as Windows format, start by converting to
58769  # unix format.
58770  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58771  new_path=`$CYGPATH -u "$path"`
58772
58773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58776  # "foo.exe" is OK but "foo" is an error.
58777  #
58778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58779  # It is also a way to make sure we got the proper file name for the real test later on.
58780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58781  if test "x$test_shortpath" = x; then
58782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58784    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58785  fi
58786
58787  # Call helper function which possibly converts this using DOS-style short mode.
58788  # If so, the updated path is stored in $new_path.
58789
58790  input_path="$new_path"
58791  # Check if we need to convert this using DOS-style short mode. If the path
58792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58793  # take no chances and rewrite it.
58794  # Note: m4 eats our [], so we need to use [ and ] instead.
58795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58796  if test "x$has_forbidden_chars" != x; then
58797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58801      # Going to short mode and back again did indeed matter. Since short mode is
58802      # case insensitive, let's make it lowercase to improve readability.
58803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58804      # Now convert it back to Unix-style (cygpath)
58805      input_path=`$CYGPATH -u "$shortmode_path"`
58806      new_path="$input_path"
58807    fi
58808  fi
58809
58810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58811  if test "x$test_cygdrive_prefix" = x; then
58812    # As a simple fix, exclude /usr/bin since it's not a real path.
58813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58815      # a path prefixed by /cygdrive for fixpath to work.
58816      new_path="$CYGWIN_ROOT_PATH$input_path"
58817    fi
58818  fi
58819
58820
58821  if test "x$path" != "x$new_path"; then
58822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58825  fi
58826
58827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58828
58829  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58830  has_colon=`$ECHO $path | $GREP ^.:`
58831  new_path="$path"
58832  if test "x$has_colon" = x; then
58833    # Not in mixed or Windows style, start by that.
58834    new_path=`cmd //c echo $path`
58835  fi
58836
58837
58838  input_path="$new_path"
58839  # Check if we need to convert this using DOS-style short mode. If the path
58840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58841  # take no chances and rewrite it.
58842  # Note: m4 eats our [], so we need to use [ and ] instead.
58843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58844  if test "x$has_forbidden_chars" != x; then
58845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58847  fi
58848
58849
58850  windows_path="$new_path"
58851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58852    unix_path=`$CYGPATH -u "$windows_path"`
58853    new_path="$unix_path"
58854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58856    new_path="$unix_path"
58857  fi
58858
58859  if test "x$path" != "x$new_path"; then
58860    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58863  fi
58864
58865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58867
58868    else
58869      # We're on a unix platform. Hooray! :)
58870      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58871      has_space=`$ECHO "$path" | $GREP " "`
58872      if test "x$has_space" != x; then
58873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58874$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58875        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58876      fi
58877
58878      # Use eval to expand a potential ~
58879      eval path="$path"
58880      if test ! -f "$path" && test ! -d "$path"; then
58881        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58882      fi
58883
58884      if test -d "$path"; then
58885        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58886      else
58887        dir="`$DIRNAME "$path"`"
58888        base="`$BASENAME "$path"`"
58889        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58890      fi
58891    fi
58892  fi
58893
58894
58895  # Only process if variable expands to non-empty
58896
58897  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58899
58900  # Input might be given as Windows format, start by converting to
58901  # unix format.
58902  path="$POTENTIAL_FREETYPE_LIB_PATH"
58903  new_path=`$CYGPATH -u "$path"`
58904
58905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58908  # "foo.exe" is OK but "foo" is an error.
58909  #
58910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58911  # It is also a way to make sure we got the proper file name for the real test later on.
58912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58913  if test "x$test_shortpath" = x; then
58914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58915$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58916    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58917  fi
58918
58919  # Call helper function which possibly converts this using DOS-style short mode.
58920  # If so, the updated path is stored in $new_path.
58921
58922  input_path="$new_path"
58923  # Check if we need to convert this using DOS-style short mode. If the path
58924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58925  # take no chances and rewrite it.
58926  # Note: m4 eats our [], so we need to use [ and ] instead.
58927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58928  if test "x$has_forbidden_chars" != x; then
58929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58933      # Going to short mode and back again did indeed matter. Since short mode is
58934      # case insensitive, let's make it lowercase to improve readability.
58935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58936      # Now convert it back to Unix-style (cygpath)
58937      input_path=`$CYGPATH -u "$shortmode_path"`
58938      new_path="$input_path"
58939    fi
58940  fi
58941
58942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58943  if test "x$test_cygdrive_prefix" = x; then
58944    # As a simple fix, exclude /usr/bin since it's not a real path.
58945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58947      # a path prefixed by /cygdrive for fixpath to work.
58948      new_path="$CYGWIN_ROOT_PATH$input_path"
58949    fi
58950  fi
58951
58952
58953  if test "x$path" != "x$new_path"; then
58954    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58956$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58957  fi
58958
58959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58960
58961  path="$POTENTIAL_FREETYPE_LIB_PATH"
58962  has_colon=`$ECHO $path | $GREP ^.:`
58963  new_path="$path"
58964  if test "x$has_colon" = x; then
58965    # Not in mixed or Windows style, start by that.
58966    new_path=`cmd //c echo $path`
58967  fi
58968
58969
58970  input_path="$new_path"
58971  # Check if we need to convert this using DOS-style short mode. If the path
58972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58973  # take no chances and rewrite it.
58974  # Note: m4 eats our [], so we need to use [ and ] instead.
58975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58976  if test "x$has_forbidden_chars" != x; then
58977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58979  fi
58980
58981
58982  windows_path="$new_path"
58983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58984    unix_path=`$CYGPATH -u "$windows_path"`
58985    new_path="$unix_path"
58986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58988    new_path="$unix_path"
58989  fi
58990
58991  if test "x$path" != "x$new_path"; then
58992    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58994$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58995  fi
58996
58997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58999
59000    else
59001      # We're on a unix platform. Hooray! :)
59002      path="$POTENTIAL_FREETYPE_LIB_PATH"
59003      has_space=`$ECHO "$path" | $GREP " "`
59004      if test "x$has_space" != x; then
59005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59006$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59007        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59008      fi
59009
59010      # Use eval to expand a potential ~
59011      eval path="$path"
59012      if test ! -f "$path" && test ! -d "$path"; then
59013        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59014      fi
59015
59016      if test -d "$path"; then
59017        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59018      else
59019        dir="`$DIRNAME "$path"`"
59020        base="`$BASENAME "$path"`"
59021        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59022      fi
59023    fi
59024  fi
59025
59026
59027    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59029$as_echo_n "checking for freetype includes... " >&6; }
59030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59031$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59032    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59034$as_echo_n "checking for freetype libraries... " >&6; }
59035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59036$as_echo "$FREETYPE_LIB_PATH" >&6; }
59037  fi
59038
59039          if test "x$FOUND_FREETYPE" != xyes; then
59040            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59041
59042  windows_path="$FREETYPE_BASE_DIR"
59043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59044    unix_path=`$CYGPATH -u "$windows_path"`
59045    FREETYPE_BASE_DIR="$unix_path"
59046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59048    FREETYPE_BASE_DIR="$unix_path"
59049  fi
59050
59051
59052  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59053  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59054  METHOD="well-known location"
59055
59056  # Let's start with an optimistic view of the world :-)
59057  FOUND_FREETYPE=yes
59058
59059  # First look for the canonical freetype main include file ft2build.h.
59060  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59061    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59062    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59063    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59064      # Fail.
59065      FOUND_FREETYPE=no
59066    fi
59067  fi
59068
59069  if test "x$FOUND_FREETYPE" = xyes; then
59070    # Include file found, let's continue the sanity check.
59071    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59072$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59073
59074    # Reset to default value
59075    FREETYPE_BASE_NAME=freetype
59076    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59077    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59078      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59080        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59081        # for the .6 version explicitly.
59082        FREETYPE_BASE_NAME=freetype.6
59083        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59084        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59085$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59086      else
59087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59088$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59089        FOUND_FREETYPE=no
59090      fi
59091    else
59092      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59093        # On Windows, we will need both .lib and .dll file.
59094        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59095          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59096$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59097          FOUND_FREETYPE=no
59098        fi
59099      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59100          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59101        # Found lib in isa dir, use that instead.
59102        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59103        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59104$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59105      fi
59106    fi
59107  fi
59108
59109  if test "x$FOUND_FREETYPE" = xyes; then
59110
59111  # Only process if variable expands to non-empty
59112
59113  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59115
59116  # Input might be given as Windows format, start by converting to
59117  # unix format.
59118  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59119  new_path=`$CYGPATH -u "$path"`
59120
59121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59124  # "foo.exe" is OK but "foo" is an error.
59125  #
59126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59127  # It is also a way to make sure we got the proper file name for the real test later on.
59128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59129  if test "x$test_shortpath" = x; then
59130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59133  fi
59134
59135  # Call helper function which possibly converts this using DOS-style short mode.
59136  # If so, the updated path is stored in $new_path.
59137
59138  input_path="$new_path"
59139  # Check if we need to convert this using DOS-style short mode. If the path
59140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59141  # take no chances and rewrite it.
59142  # Note: m4 eats our [], so we need to use [ and ] instead.
59143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59144  if test "x$has_forbidden_chars" != x; then
59145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59149      # Going to short mode and back again did indeed matter. Since short mode is
59150      # case insensitive, let's make it lowercase to improve readability.
59151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59152      # Now convert it back to Unix-style (cygpath)
59153      input_path=`$CYGPATH -u "$shortmode_path"`
59154      new_path="$input_path"
59155    fi
59156  fi
59157
59158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59159  if test "x$test_cygdrive_prefix" = x; then
59160    # As a simple fix, exclude /usr/bin since it's not a real path.
59161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59163      # a path prefixed by /cygdrive for fixpath to work.
59164      new_path="$CYGWIN_ROOT_PATH$input_path"
59165    fi
59166  fi
59167
59168
59169  if test "x$path" != "x$new_path"; then
59170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59173  fi
59174
59175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59176
59177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59178  has_colon=`$ECHO $path | $GREP ^.:`
59179  new_path="$path"
59180  if test "x$has_colon" = x; then
59181    # Not in mixed or Windows style, start by that.
59182    new_path=`cmd //c echo $path`
59183  fi
59184
59185
59186  input_path="$new_path"
59187  # Check if we need to convert this using DOS-style short mode. If the path
59188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59189  # take no chances and rewrite it.
59190  # Note: m4 eats our [], so we need to use [ and ] instead.
59191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59192  if test "x$has_forbidden_chars" != x; then
59193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59195  fi
59196
59197
59198  windows_path="$new_path"
59199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59200    unix_path=`$CYGPATH -u "$windows_path"`
59201    new_path="$unix_path"
59202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59204    new_path="$unix_path"
59205  fi
59206
59207  if test "x$path" != "x$new_path"; then
59208    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59211  fi
59212
59213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59215
59216    else
59217      # We're on a unix platform. Hooray! :)
59218      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59219      has_space=`$ECHO "$path" | $GREP " "`
59220      if test "x$has_space" != x; then
59221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59224      fi
59225
59226      # Use eval to expand a potential ~
59227      eval path="$path"
59228      if test ! -f "$path" && test ! -d "$path"; then
59229        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59230      fi
59231
59232      if test -d "$path"; then
59233        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59234      else
59235        dir="`$DIRNAME "$path"`"
59236        base="`$BASENAME "$path"`"
59237        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59238      fi
59239    fi
59240  fi
59241
59242
59243  # Only process if variable expands to non-empty
59244
59245  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59247
59248  # Input might be given as Windows format, start by converting to
59249  # unix format.
59250  path="$POTENTIAL_FREETYPE_LIB_PATH"
59251  new_path=`$CYGPATH -u "$path"`
59252
59253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59256  # "foo.exe" is OK but "foo" is an error.
59257  #
59258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59259  # It is also a way to make sure we got the proper file name for the real test later on.
59260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59261  if test "x$test_shortpath" = x; then
59262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59265  fi
59266
59267  # Call helper function which possibly converts this using DOS-style short mode.
59268  # If so, the updated path is stored in $new_path.
59269
59270  input_path="$new_path"
59271  # Check if we need to convert this using DOS-style short mode. If the path
59272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59273  # take no chances and rewrite it.
59274  # Note: m4 eats our [], so we need to use [ and ] instead.
59275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59276  if test "x$has_forbidden_chars" != x; then
59277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59281      # Going to short mode and back again did indeed matter. Since short mode is
59282      # case insensitive, let's make it lowercase to improve readability.
59283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59284      # Now convert it back to Unix-style (cygpath)
59285      input_path=`$CYGPATH -u "$shortmode_path"`
59286      new_path="$input_path"
59287    fi
59288  fi
59289
59290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59291  if test "x$test_cygdrive_prefix" = x; then
59292    # As a simple fix, exclude /usr/bin since it's not a real path.
59293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59295      # a path prefixed by /cygdrive for fixpath to work.
59296      new_path="$CYGWIN_ROOT_PATH$input_path"
59297    fi
59298  fi
59299
59300
59301  if test "x$path" != "x$new_path"; then
59302    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59305  fi
59306
59307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59308
59309  path="$POTENTIAL_FREETYPE_LIB_PATH"
59310  has_colon=`$ECHO $path | $GREP ^.:`
59311  new_path="$path"
59312  if test "x$has_colon" = x; then
59313    # Not in mixed or Windows style, start by that.
59314    new_path=`cmd //c echo $path`
59315  fi
59316
59317
59318  input_path="$new_path"
59319  # Check if we need to convert this using DOS-style short mode. If the path
59320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59321  # take no chances and rewrite it.
59322  # Note: m4 eats our [], so we need to use [ and ] instead.
59323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59324  if test "x$has_forbidden_chars" != x; then
59325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59327  fi
59328
59329
59330  windows_path="$new_path"
59331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59332    unix_path=`$CYGPATH -u "$windows_path"`
59333    new_path="$unix_path"
59334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59336    new_path="$unix_path"
59337  fi
59338
59339  if test "x$path" != "x$new_path"; then
59340    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59343  fi
59344
59345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59347
59348    else
59349      # We're on a unix platform. Hooray! :)
59350      path="$POTENTIAL_FREETYPE_LIB_PATH"
59351      has_space=`$ECHO "$path" | $GREP " "`
59352      if test "x$has_space" != x; then
59353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59356      fi
59357
59358      # Use eval to expand a potential ~
59359      eval path="$path"
59360      if test ! -f "$path" && test ! -d "$path"; then
59361        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59362      fi
59363
59364      if test -d "$path"; then
59365        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59366      else
59367        dir="`$DIRNAME "$path"`"
59368        base="`$BASENAME "$path"`"
59369        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59370      fi
59371    fi
59372  fi
59373
59374
59375    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59377$as_echo_n "checking for freetype includes... " >&6; }
59378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59379$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59380    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59382$as_echo_n "checking for freetype libraries... " >&6; }
59383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59384$as_echo "$FREETYPE_LIB_PATH" >&6; }
59385  fi
59386
59387          fi
59388          if test "x$FOUND_FREETYPE" != xyes; then
59389            FREETYPE_BASE_DIR="$HOME/freetype"
59390
59391  windows_path="$FREETYPE_BASE_DIR"
59392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59393    unix_path=`$CYGPATH -u "$windows_path"`
59394    FREETYPE_BASE_DIR="$unix_path"
59395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59397    FREETYPE_BASE_DIR="$unix_path"
59398  fi
59399
59400            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59401
59402  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59403  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59404  METHOD="well-known location"
59405
59406  # Let's start with an optimistic view of the world :-)
59407  FOUND_FREETYPE=yes
59408
59409  # First look for the canonical freetype main include file ft2build.h.
59410  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59411    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59412    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59413    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59414      # Fail.
59415      FOUND_FREETYPE=no
59416    fi
59417  fi
59418
59419  if test "x$FOUND_FREETYPE" = xyes; then
59420    # Include file found, let's continue the sanity check.
59421    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59422$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59423
59424    # Reset to default value
59425    FREETYPE_BASE_NAME=freetype
59426    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59427    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59428      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59429          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59430        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59431        # for the .6 version explicitly.
59432        FREETYPE_BASE_NAME=freetype.6
59433        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59434        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59435$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59436      else
59437        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59438$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59439        FOUND_FREETYPE=no
59440      fi
59441    else
59442      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59443        # On Windows, we will need both .lib and .dll file.
59444        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59445          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59446$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59447          FOUND_FREETYPE=no
59448        fi
59449      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59450          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59451        # Found lib in isa dir, use that instead.
59452        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59453        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59454$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59455      fi
59456    fi
59457  fi
59458
59459  if test "x$FOUND_FREETYPE" = xyes; then
59460
59461  # Only process if variable expands to non-empty
59462
59463  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59465
59466  # Input might be given as Windows format, start by converting to
59467  # unix format.
59468  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59469  new_path=`$CYGPATH -u "$path"`
59470
59471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59474  # "foo.exe" is OK but "foo" is an error.
59475  #
59476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59477  # It is also a way to make sure we got the proper file name for the real test later on.
59478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59479  if test "x$test_shortpath" = x; then
59480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59481$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59482    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59483  fi
59484
59485  # Call helper function which possibly converts this using DOS-style short mode.
59486  # If so, the updated path is stored in $new_path.
59487
59488  input_path="$new_path"
59489  # Check if we need to convert this using DOS-style short mode. If the path
59490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59491  # take no chances and rewrite it.
59492  # Note: m4 eats our [], so we need to use [ and ] instead.
59493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59494  if test "x$has_forbidden_chars" != x; then
59495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59499      # Going to short mode and back again did indeed matter. Since short mode is
59500      # case insensitive, let's make it lowercase to improve readability.
59501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59502      # Now convert it back to Unix-style (cygpath)
59503      input_path=`$CYGPATH -u "$shortmode_path"`
59504      new_path="$input_path"
59505    fi
59506  fi
59507
59508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59509  if test "x$test_cygdrive_prefix" = x; then
59510    # As a simple fix, exclude /usr/bin since it's not a real path.
59511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59513      # a path prefixed by /cygdrive for fixpath to work.
59514      new_path="$CYGWIN_ROOT_PATH$input_path"
59515    fi
59516  fi
59517
59518
59519  if test "x$path" != "x$new_path"; then
59520    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59523  fi
59524
59525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59526
59527  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59528  has_colon=`$ECHO $path | $GREP ^.:`
59529  new_path="$path"
59530  if test "x$has_colon" = x; then
59531    # Not in mixed or Windows style, start by that.
59532    new_path=`cmd //c echo $path`
59533  fi
59534
59535
59536  input_path="$new_path"
59537  # Check if we need to convert this using DOS-style short mode. If the path
59538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59539  # take no chances and rewrite it.
59540  # Note: m4 eats our [], so we need to use [ and ] instead.
59541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59542  if test "x$has_forbidden_chars" != x; then
59543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59545  fi
59546
59547
59548  windows_path="$new_path"
59549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59550    unix_path=`$CYGPATH -u "$windows_path"`
59551    new_path="$unix_path"
59552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59554    new_path="$unix_path"
59555  fi
59556
59557  if test "x$path" != "x$new_path"; then
59558    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59560$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59561  fi
59562
59563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59565
59566    else
59567      # We're on a unix platform. Hooray! :)
59568      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59569      has_space=`$ECHO "$path" | $GREP " "`
59570      if test "x$has_space" != x; then
59571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59572$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59574      fi
59575
59576      # Use eval to expand a potential ~
59577      eval path="$path"
59578      if test ! -f "$path" && test ! -d "$path"; then
59579        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59580      fi
59581
59582      if test -d "$path"; then
59583        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59584      else
59585        dir="`$DIRNAME "$path"`"
59586        base="`$BASENAME "$path"`"
59587        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59588      fi
59589    fi
59590  fi
59591
59592
59593  # Only process if variable expands to non-empty
59594
59595  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59597
59598  # Input might be given as Windows format, start by converting to
59599  # unix format.
59600  path="$POTENTIAL_FREETYPE_LIB_PATH"
59601  new_path=`$CYGPATH -u "$path"`
59602
59603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59606  # "foo.exe" is OK but "foo" is an error.
59607  #
59608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59609  # It is also a way to make sure we got the proper file name for the real test later on.
59610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59611  if test "x$test_shortpath" = x; then
59612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59614    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59615  fi
59616
59617  # Call helper function which possibly converts this using DOS-style short mode.
59618  # If so, the updated path is stored in $new_path.
59619
59620  input_path="$new_path"
59621  # Check if we need to convert this using DOS-style short mode. If the path
59622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59623  # take no chances and rewrite it.
59624  # Note: m4 eats our [], so we need to use [ and ] instead.
59625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59626  if test "x$has_forbidden_chars" != x; then
59627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59631      # Going to short mode and back again did indeed matter. Since short mode is
59632      # case insensitive, let's make it lowercase to improve readability.
59633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59634      # Now convert it back to Unix-style (cygpath)
59635      input_path=`$CYGPATH -u "$shortmode_path"`
59636      new_path="$input_path"
59637    fi
59638  fi
59639
59640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59641  if test "x$test_cygdrive_prefix" = x; then
59642    # As a simple fix, exclude /usr/bin since it's not a real path.
59643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59645      # a path prefixed by /cygdrive for fixpath to work.
59646      new_path="$CYGWIN_ROOT_PATH$input_path"
59647    fi
59648  fi
59649
59650
59651  if test "x$path" != "x$new_path"; then
59652    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59655  fi
59656
59657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59658
59659  path="$POTENTIAL_FREETYPE_LIB_PATH"
59660  has_colon=`$ECHO $path | $GREP ^.:`
59661  new_path="$path"
59662  if test "x$has_colon" = x; then
59663    # Not in mixed or Windows style, start by that.
59664    new_path=`cmd //c echo $path`
59665  fi
59666
59667
59668  input_path="$new_path"
59669  # Check if we need to convert this using DOS-style short mode. If the path
59670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59671  # take no chances and rewrite it.
59672  # Note: m4 eats our [], so we need to use [ and ] instead.
59673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59674  if test "x$has_forbidden_chars" != x; then
59675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59677  fi
59678
59679
59680  windows_path="$new_path"
59681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59682    unix_path=`$CYGPATH -u "$windows_path"`
59683    new_path="$unix_path"
59684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59686    new_path="$unix_path"
59687  fi
59688
59689  if test "x$path" != "x$new_path"; then
59690    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59692$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59693  fi
59694
59695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59697
59698    else
59699      # We're on a unix platform. Hooray! :)
59700      path="$POTENTIAL_FREETYPE_LIB_PATH"
59701      has_space=`$ECHO "$path" | $GREP " "`
59702      if test "x$has_space" != x; then
59703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59706      fi
59707
59708      # Use eval to expand a potential ~
59709      eval path="$path"
59710      if test ! -f "$path" && test ! -d "$path"; then
59711        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59712      fi
59713
59714      if test -d "$path"; then
59715        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59716      else
59717        dir="`$DIRNAME "$path"`"
59718        base="`$BASENAME "$path"`"
59719        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59720      fi
59721    fi
59722  fi
59723
59724
59725    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59727$as_echo_n "checking for freetype includes... " >&6; }
59728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59729$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59730    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59732$as_echo_n "checking for freetype libraries... " >&6; }
59733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59734$as_echo "$FREETYPE_LIB_PATH" >&6; }
59735  fi
59736
59737            else
59738
59739  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59740  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59741  METHOD="well-known location"
59742
59743  # Let's start with an optimistic view of the world :-)
59744  FOUND_FREETYPE=yes
59745
59746  # First look for the canonical freetype main include file ft2build.h.
59747  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59748    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59749    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59750    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59751      # Fail.
59752      FOUND_FREETYPE=no
59753    fi
59754  fi
59755
59756  if test "x$FOUND_FREETYPE" = xyes; then
59757    # Include file found, let's continue the sanity check.
59758    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59759$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59760
59761    # Reset to default value
59762    FREETYPE_BASE_NAME=freetype
59763    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59764    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59765      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59766          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59767        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59768        # for the .6 version explicitly.
59769        FREETYPE_BASE_NAME=freetype.6
59770        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59771        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59772$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59773      else
59774        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59775$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59776        FOUND_FREETYPE=no
59777      fi
59778    else
59779      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59780        # On Windows, we will need both .lib and .dll file.
59781        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59782          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59783$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59784          FOUND_FREETYPE=no
59785        fi
59786      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59787          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59788        # Found lib in isa dir, use that instead.
59789        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59790        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59791$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59792      fi
59793    fi
59794  fi
59795
59796  if test "x$FOUND_FREETYPE" = xyes; then
59797
59798  # Only process if variable expands to non-empty
59799
59800  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59802
59803  # Input might be given as Windows format, start by converting to
59804  # unix format.
59805  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59806  new_path=`$CYGPATH -u "$path"`
59807
59808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59811  # "foo.exe" is OK but "foo" is an error.
59812  #
59813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59814  # It is also a way to make sure we got the proper file name for the real test later on.
59815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59816  if test "x$test_shortpath" = x; then
59817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59818$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59819    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59820  fi
59821
59822  # Call helper function which possibly converts this using DOS-style short mode.
59823  # If so, the updated path is stored in $new_path.
59824
59825  input_path="$new_path"
59826  # Check if we need to convert this using DOS-style short mode. If the path
59827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59828  # take no chances and rewrite it.
59829  # Note: m4 eats our [], so we need to use [ and ] instead.
59830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59831  if test "x$has_forbidden_chars" != x; then
59832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59836      # Going to short mode and back again did indeed matter. Since short mode is
59837      # case insensitive, let's make it lowercase to improve readability.
59838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59839      # Now convert it back to Unix-style (cygpath)
59840      input_path=`$CYGPATH -u "$shortmode_path"`
59841      new_path="$input_path"
59842    fi
59843  fi
59844
59845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59846  if test "x$test_cygdrive_prefix" = x; then
59847    # As a simple fix, exclude /usr/bin since it's not a real path.
59848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59850      # a path prefixed by /cygdrive for fixpath to work.
59851      new_path="$CYGWIN_ROOT_PATH$input_path"
59852    fi
59853  fi
59854
59855
59856  if test "x$path" != "x$new_path"; then
59857    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59859$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59860  fi
59861
59862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59863
59864  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59865  has_colon=`$ECHO $path | $GREP ^.:`
59866  new_path="$path"
59867  if test "x$has_colon" = x; then
59868    # Not in mixed or Windows style, start by that.
59869    new_path=`cmd //c echo $path`
59870  fi
59871
59872
59873  input_path="$new_path"
59874  # Check if we need to convert this using DOS-style short mode. If the path
59875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59876  # take no chances and rewrite it.
59877  # Note: m4 eats our [], so we need to use [ and ] instead.
59878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59879  if test "x$has_forbidden_chars" != x; then
59880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59882  fi
59883
59884
59885  windows_path="$new_path"
59886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59887    unix_path=`$CYGPATH -u "$windows_path"`
59888    new_path="$unix_path"
59889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59891    new_path="$unix_path"
59892  fi
59893
59894  if test "x$path" != "x$new_path"; then
59895    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59898  fi
59899
59900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59902
59903    else
59904      # We're on a unix platform. Hooray! :)
59905      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59906      has_space=`$ECHO "$path" | $GREP " "`
59907      if test "x$has_space" != x; then
59908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59911      fi
59912
59913      # Use eval to expand a potential ~
59914      eval path="$path"
59915      if test ! -f "$path" && test ! -d "$path"; then
59916        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59917      fi
59918
59919      if test -d "$path"; then
59920        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59921      else
59922        dir="`$DIRNAME "$path"`"
59923        base="`$BASENAME "$path"`"
59924        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59925      fi
59926    fi
59927  fi
59928
59929
59930  # Only process if variable expands to non-empty
59931
59932  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59934
59935  # Input might be given as Windows format, start by converting to
59936  # unix format.
59937  path="$POTENTIAL_FREETYPE_LIB_PATH"
59938  new_path=`$CYGPATH -u "$path"`
59939
59940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59943  # "foo.exe" is OK but "foo" is an error.
59944  #
59945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59946  # It is also a way to make sure we got the proper file name for the real test later on.
59947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59948  if test "x$test_shortpath" = x; then
59949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59951    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59952  fi
59953
59954  # Call helper function which possibly converts this using DOS-style short mode.
59955  # If so, the updated path is stored in $new_path.
59956
59957  input_path="$new_path"
59958  # Check if we need to convert this using DOS-style short mode. If the path
59959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59960  # take no chances and rewrite it.
59961  # Note: m4 eats our [], so we need to use [ and ] instead.
59962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59963  if test "x$has_forbidden_chars" != x; then
59964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59968      # Going to short mode and back again did indeed matter. Since short mode is
59969      # case insensitive, let's make it lowercase to improve readability.
59970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59971      # Now convert it back to Unix-style (cygpath)
59972      input_path=`$CYGPATH -u "$shortmode_path"`
59973      new_path="$input_path"
59974    fi
59975  fi
59976
59977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59978  if test "x$test_cygdrive_prefix" = x; then
59979    # As a simple fix, exclude /usr/bin since it's not a real path.
59980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59982      # a path prefixed by /cygdrive for fixpath to work.
59983      new_path="$CYGWIN_ROOT_PATH$input_path"
59984    fi
59985  fi
59986
59987
59988  if test "x$path" != "x$new_path"; then
59989    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59992  fi
59993
59994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59995
59996  path="$POTENTIAL_FREETYPE_LIB_PATH"
59997  has_colon=`$ECHO $path | $GREP ^.:`
59998  new_path="$path"
59999  if test "x$has_colon" = x; then
60000    # Not in mixed or Windows style, start by that.
60001    new_path=`cmd //c echo $path`
60002  fi
60003
60004
60005  input_path="$new_path"
60006  # Check if we need to convert this using DOS-style short mode. If the path
60007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60008  # take no chances and rewrite it.
60009  # Note: m4 eats our [], so we need to use [ and ] instead.
60010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60011  if test "x$has_forbidden_chars" != x; then
60012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60014  fi
60015
60016
60017  windows_path="$new_path"
60018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60019    unix_path=`$CYGPATH -u "$windows_path"`
60020    new_path="$unix_path"
60021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60023    new_path="$unix_path"
60024  fi
60025
60026  if test "x$path" != "x$new_path"; then
60027    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60030  fi
60031
60032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60034
60035    else
60036      # We're on a unix platform. Hooray! :)
60037      path="$POTENTIAL_FREETYPE_LIB_PATH"
60038      has_space=`$ECHO "$path" | $GREP " "`
60039      if test "x$has_space" != x; then
60040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60043      fi
60044
60045      # Use eval to expand a potential ~
60046      eval path="$path"
60047      if test ! -f "$path" && test ! -d "$path"; then
60048        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60049      fi
60050
60051      if test -d "$path"; then
60052        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60053      else
60054        dir="`$DIRNAME "$path"`"
60055        base="`$BASENAME "$path"`"
60056        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60057      fi
60058    fi
60059  fi
60060
60061
60062    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60064$as_echo_n "checking for freetype includes... " >&6; }
60065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60066$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60067    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60069$as_echo_n "checking for freetype libraries... " >&6; }
60070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60071$as_echo "$FREETYPE_LIB_PATH" >&6; }
60072  fi
60073
60074            fi
60075            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60076                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60077              # Source is available, as a last resort try to build freetype in default location
60078
60079  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60080  BUILD_FREETYPE=yes
60081
60082  # Check if the freetype sources are acessible..
60083  if ! test -d $FREETYPE_SRC_PATH; then
60084    { $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
60085$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60086    BUILD_FREETYPE=no
60087  fi
60088  # ..and contain a vc2010 project file
60089  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60090  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60091    { $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
60092$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60093    BUILD_FREETYPE=no
60094  fi
60095  # Now check if configure found a version of 'msbuild.exe'
60096  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60097    { $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
60098$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;}
60099    BUILD_FREETYPE=no
60100  fi
60101
60102  # Ready to go..
60103  if test "x$BUILD_FREETYPE" = xyes; then
60104    # msbuild requires trailing slashes for output directories
60105    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60106    freetype_lib_path_unix="$freetype_lib_path"
60107    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60108
60109  unix_path="$vcxproj_path"
60110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60111    windows_path=`$CYGPATH -m "$unix_path"`
60112    vcxproj_path="$windows_path"
60113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60114    windows_path=`cmd //c echo $unix_path`
60115    vcxproj_path="$windows_path"
60116  fi
60117
60118
60119  unix_path="$freetype_lib_path"
60120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60121    windows_path=`$CYGPATH -m "$unix_path"`
60122    freetype_lib_path="$windows_path"
60123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60124    windows_path=`cmd //c echo $unix_path`
60125    freetype_lib_path="$windows_path"
60126  fi
60127
60128
60129  unix_path="$freetype_obj_path"
60130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60131    windows_path=`$CYGPATH -m "$unix_path"`
60132    freetype_obj_path="$windows_path"
60133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60134    windows_path=`cmd //c echo $unix_path`
60135    freetype_obj_path="$windows_path"
60136  fi
60137
60138    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60139      freetype_platform=x64
60140    else
60141      freetype_platform=win32
60142    fi
60143
60144    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60145    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60146    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60147    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60148    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60149$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60150
60151    # First we try to build the freetype.dll
60152    $ECHO -e "@echo off\n"\
60153        "$MSBUILD $vcxproj_path "\
60154        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60155        "/p:Configuration=\"Release Multithreaded\" "\
60156        "/p:Platform=$freetype_platform "\
60157        "/p:ConfigurationType=DynamicLibrary "\
60158        "/p:TargetName=freetype "\
60159        "/p:OutDir=\"$freetype_lib_path\" "\
60160        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60161    cmd /c freetype.bat
60162
60163    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60164      # If that succeeds we also build freetype.lib
60165      $ECHO -e "@echo off\n"\
60166          "$MSBUILD $vcxproj_path "\
60167          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60168          "/p:Configuration=\"Release Multithreaded\" "\
60169          "/p:Platform=$freetype_platform "\
60170          "/p:ConfigurationType=StaticLibrary "\
60171          "/p:TargetName=freetype "\
60172          "/p:OutDir=\"$freetype_lib_path\" "\
60173          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60174      cmd /c freetype.bat
60175
60176      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60177        # Once we build both, lib and dll, set freetype lib and include path appropriately
60178        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60179        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60180        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60181$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60182      else
60183        BUILD_FREETYPE=no
60184      fi
60185    else
60186      BUILD_FREETYPE=no
60187    fi
60188  fi
60189
60190              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60191
60192  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60193  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60194  METHOD="well-known location"
60195
60196  # Let's start with an optimistic view of the world :-)
60197  FOUND_FREETYPE=yes
60198
60199  # First look for the canonical freetype main include file ft2build.h.
60200  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60201    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60202    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60203    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60204      # Fail.
60205      FOUND_FREETYPE=no
60206    fi
60207  fi
60208
60209  if test "x$FOUND_FREETYPE" = xyes; then
60210    # Include file found, let's continue the sanity check.
60211    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60212$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60213
60214    # Reset to default value
60215    FREETYPE_BASE_NAME=freetype
60216    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60217    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60218      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60219          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60220        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60221        # for the .6 version explicitly.
60222        FREETYPE_BASE_NAME=freetype.6
60223        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60224        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60225$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60226      else
60227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60228$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60229        FOUND_FREETYPE=no
60230      fi
60231    else
60232      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60233        # On Windows, we will need both .lib and .dll file.
60234        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60235          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60237          FOUND_FREETYPE=no
60238        fi
60239      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60240          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60241        # Found lib in isa dir, use that instead.
60242        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60243        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60244$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60245      fi
60246    fi
60247  fi
60248
60249  if test "x$FOUND_FREETYPE" = xyes; then
60250
60251  # Only process if variable expands to non-empty
60252
60253  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60255
60256  # Input might be given as Windows format, start by converting to
60257  # unix format.
60258  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60259  new_path=`$CYGPATH -u "$path"`
60260
60261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60264  # "foo.exe" is OK but "foo" is an error.
60265  #
60266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60267  # It is also a way to make sure we got the proper file name for the real test later on.
60268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60269  if test "x$test_shortpath" = x; then
60270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60272    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60273  fi
60274
60275  # Call helper function which possibly converts this using DOS-style short mode.
60276  # If so, the updated path is stored in $new_path.
60277
60278  input_path="$new_path"
60279  # Check if we need to convert this using DOS-style short mode. If the path
60280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60281  # take no chances and rewrite it.
60282  # Note: m4 eats our [], so we need to use [ and ] instead.
60283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60284  if test "x$has_forbidden_chars" != x; then
60285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60289      # Going to short mode and back again did indeed matter. Since short mode is
60290      # case insensitive, let's make it lowercase to improve readability.
60291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60292      # Now convert it back to Unix-style (cygpath)
60293      input_path=`$CYGPATH -u "$shortmode_path"`
60294      new_path="$input_path"
60295    fi
60296  fi
60297
60298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60299  if test "x$test_cygdrive_prefix" = x; then
60300    # As a simple fix, exclude /usr/bin since it's not a real path.
60301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60303      # a path prefixed by /cygdrive for fixpath to work.
60304      new_path="$CYGWIN_ROOT_PATH$input_path"
60305    fi
60306  fi
60307
60308
60309  if test "x$path" != "x$new_path"; then
60310    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60313  fi
60314
60315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60316
60317  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60318  has_colon=`$ECHO $path | $GREP ^.:`
60319  new_path="$path"
60320  if test "x$has_colon" = x; then
60321    # Not in mixed or Windows style, start by that.
60322    new_path=`cmd //c echo $path`
60323  fi
60324
60325
60326  input_path="$new_path"
60327  # Check if we need to convert this using DOS-style short mode. If the path
60328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60329  # take no chances and rewrite it.
60330  # Note: m4 eats our [], so we need to use [ and ] instead.
60331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60332  if test "x$has_forbidden_chars" != x; then
60333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60335  fi
60336
60337
60338  windows_path="$new_path"
60339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60340    unix_path=`$CYGPATH -u "$windows_path"`
60341    new_path="$unix_path"
60342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60344    new_path="$unix_path"
60345  fi
60346
60347  if test "x$path" != "x$new_path"; then
60348    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60351  fi
60352
60353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60355
60356    else
60357      # We're on a unix platform. Hooray! :)
60358      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60359      has_space=`$ECHO "$path" | $GREP " "`
60360      if test "x$has_space" != x; then
60361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60362$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60364      fi
60365
60366      # Use eval to expand a potential ~
60367      eval path="$path"
60368      if test ! -f "$path" && test ! -d "$path"; then
60369        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60370      fi
60371
60372      if test -d "$path"; then
60373        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60374      else
60375        dir="`$DIRNAME "$path"`"
60376        base="`$BASENAME "$path"`"
60377        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60378      fi
60379    fi
60380  fi
60381
60382
60383  # Only process if variable expands to non-empty
60384
60385  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60387
60388  # Input might be given as Windows format, start by converting to
60389  # unix format.
60390  path="$POTENTIAL_FREETYPE_LIB_PATH"
60391  new_path=`$CYGPATH -u "$path"`
60392
60393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60396  # "foo.exe" is OK but "foo" is an error.
60397  #
60398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60399  # It is also a way to make sure we got the proper file name for the real test later on.
60400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60401  if test "x$test_shortpath" = x; then
60402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60405  fi
60406
60407  # Call helper function which possibly converts this using DOS-style short mode.
60408  # If so, the updated path is stored in $new_path.
60409
60410  input_path="$new_path"
60411  # Check if we need to convert this using DOS-style short mode. If the path
60412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60413  # take no chances and rewrite it.
60414  # Note: m4 eats our [], so we need to use [ and ] instead.
60415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60416  if test "x$has_forbidden_chars" != x; then
60417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60421      # Going to short mode and back again did indeed matter. Since short mode is
60422      # case insensitive, let's make it lowercase to improve readability.
60423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60424      # Now convert it back to Unix-style (cygpath)
60425      input_path=`$CYGPATH -u "$shortmode_path"`
60426      new_path="$input_path"
60427    fi
60428  fi
60429
60430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60431  if test "x$test_cygdrive_prefix" = x; then
60432    # As a simple fix, exclude /usr/bin since it's not a real path.
60433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60435      # a path prefixed by /cygdrive for fixpath to work.
60436      new_path="$CYGWIN_ROOT_PATH$input_path"
60437    fi
60438  fi
60439
60440
60441  if test "x$path" != "x$new_path"; then
60442    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60445  fi
60446
60447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60448
60449  path="$POTENTIAL_FREETYPE_LIB_PATH"
60450  has_colon=`$ECHO $path | $GREP ^.:`
60451  new_path="$path"
60452  if test "x$has_colon" = x; then
60453    # Not in mixed or Windows style, start by that.
60454    new_path=`cmd //c echo $path`
60455  fi
60456
60457
60458  input_path="$new_path"
60459  # Check if we need to convert this using DOS-style short mode. If the path
60460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60461  # take no chances and rewrite it.
60462  # Note: m4 eats our [], so we need to use [ and ] instead.
60463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60464  if test "x$has_forbidden_chars" != x; then
60465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60467  fi
60468
60469
60470  windows_path="$new_path"
60471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60472    unix_path=`$CYGPATH -u "$windows_path"`
60473    new_path="$unix_path"
60474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60476    new_path="$unix_path"
60477  fi
60478
60479  if test "x$path" != "x$new_path"; then
60480    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60483  fi
60484
60485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60487
60488    else
60489      # We're on a unix platform. Hooray! :)
60490      path="$POTENTIAL_FREETYPE_LIB_PATH"
60491      has_space=`$ECHO "$path" | $GREP " "`
60492      if test "x$has_space" != x; then
60493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60496      fi
60497
60498      # Use eval to expand a potential ~
60499      eval path="$path"
60500      if test ! -f "$path" && test ! -d "$path"; then
60501        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60502      fi
60503
60504      if test -d "$path"; then
60505        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60506      else
60507        dir="`$DIRNAME "$path"`"
60508        base="`$BASENAME "$path"`"
60509        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60510      fi
60511    fi
60512  fi
60513
60514
60515    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60517$as_echo_n "checking for freetype includes... " >&6; }
60518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60519$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60520    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60522$as_echo_n "checking for freetype libraries... " >&6; }
60523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60524$as_echo "$FREETYPE_LIB_PATH" >&6; }
60525  fi
60526
60527              else
60528
60529  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60530  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60531  METHOD="well-known location"
60532
60533  # Let's start with an optimistic view of the world :-)
60534  FOUND_FREETYPE=yes
60535
60536  # First look for the canonical freetype main include file ft2build.h.
60537  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60538    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60539    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60540    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60541      # Fail.
60542      FOUND_FREETYPE=no
60543    fi
60544  fi
60545
60546  if test "x$FOUND_FREETYPE" = xyes; then
60547    # Include file found, let's continue the sanity check.
60548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60549$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60550
60551    # Reset to default value
60552    FREETYPE_BASE_NAME=freetype
60553    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60554    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60555      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60556          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60557        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60558        # for the .6 version explicitly.
60559        FREETYPE_BASE_NAME=freetype.6
60560        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60561        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60562$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60563      else
60564        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60565$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60566        FOUND_FREETYPE=no
60567      fi
60568    else
60569      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60570        # On Windows, we will need both .lib and .dll file.
60571        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60572          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60573$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60574          FOUND_FREETYPE=no
60575        fi
60576      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60577          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60578        # Found lib in isa dir, use that instead.
60579        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60580        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60581$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60582      fi
60583    fi
60584  fi
60585
60586  if test "x$FOUND_FREETYPE" = xyes; then
60587
60588  # Only process if variable expands to non-empty
60589
60590  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60592
60593  # Input might be given as Windows format, start by converting to
60594  # unix format.
60595  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60596  new_path=`$CYGPATH -u "$path"`
60597
60598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60601  # "foo.exe" is OK but "foo" is an error.
60602  #
60603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60604  # It is also a way to make sure we got the proper file name for the real test later on.
60605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60606  if test "x$test_shortpath" = x; then
60607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60609    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60610  fi
60611
60612  # Call helper function which possibly converts this using DOS-style short mode.
60613  # If so, the updated path is stored in $new_path.
60614
60615  input_path="$new_path"
60616  # Check if we need to convert this using DOS-style short mode. If the path
60617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60618  # take no chances and rewrite it.
60619  # Note: m4 eats our [], so we need to use [ and ] instead.
60620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60621  if test "x$has_forbidden_chars" != x; then
60622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60626      # Going to short mode and back again did indeed matter. Since short mode is
60627      # case insensitive, let's make it lowercase to improve readability.
60628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60629      # Now convert it back to Unix-style (cygpath)
60630      input_path=`$CYGPATH -u "$shortmode_path"`
60631      new_path="$input_path"
60632    fi
60633  fi
60634
60635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60636  if test "x$test_cygdrive_prefix" = x; then
60637    # As a simple fix, exclude /usr/bin since it's not a real path.
60638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60640      # a path prefixed by /cygdrive for fixpath to work.
60641      new_path="$CYGWIN_ROOT_PATH$input_path"
60642    fi
60643  fi
60644
60645
60646  if test "x$path" != "x$new_path"; then
60647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60650  fi
60651
60652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60653
60654  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60655  has_colon=`$ECHO $path | $GREP ^.:`
60656  new_path="$path"
60657  if test "x$has_colon" = x; then
60658    # Not in mixed or Windows style, start by that.
60659    new_path=`cmd //c echo $path`
60660  fi
60661
60662
60663  input_path="$new_path"
60664  # Check if we need to convert this using DOS-style short mode. If the path
60665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60666  # take no chances and rewrite it.
60667  # Note: m4 eats our [], so we need to use [ and ] instead.
60668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60669  if test "x$has_forbidden_chars" != x; then
60670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60672  fi
60673
60674
60675  windows_path="$new_path"
60676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60677    unix_path=`$CYGPATH -u "$windows_path"`
60678    new_path="$unix_path"
60679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60681    new_path="$unix_path"
60682  fi
60683
60684  if test "x$path" != "x$new_path"; then
60685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60688  fi
60689
60690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60692
60693    else
60694      # We're on a unix platform. Hooray! :)
60695      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60696      has_space=`$ECHO "$path" | $GREP " "`
60697      if test "x$has_space" != x; then
60698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60701      fi
60702
60703      # Use eval to expand a potential ~
60704      eval path="$path"
60705      if test ! -f "$path" && test ! -d "$path"; then
60706        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60707      fi
60708
60709      if test -d "$path"; then
60710        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60711      else
60712        dir="`$DIRNAME "$path"`"
60713        base="`$BASENAME "$path"`"
60714        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60715      fi
60716    fi
60717  fi
60718
60719
60720  # Only process if variable expands to non-empty
60721
60722  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60724
60725  # Input might be given as Windows format, start by converting to
60726  # unix format.
60727  path="$POTENTIAL_FREETYPE_LIB_PATH"
60728  new_path=`$CYGPATH -u "$path"`
60729
60730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60733  # "foo.exe" is OK but "foo" is an error.
60734  #
60735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60736  # It is also a way to make sure we got the proper file name for the real test later on.
60737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60738  if test "x$test_shortpath" = x; then
60739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60740$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60741    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60742  fi
60743
60744  # Call helper function which possibly converts this using DOS-style short mode.
60745  # If so, the updated path is stored in $new_path.
60746
60747  input_path="$new_path"
60748  # Check if we need to convert this using DOS-style short mode. If the path
60749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60750  # take no chances and rewrite it.
60751  # Note: m4 eats our [], so we need to use [ and ] instead.
60752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60753  if test "x$has_forbidden_chars" != x; then
60754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60758      # Going to short mode and back again did indeed matter. Since short mode is
60759      # case insensitive, let's make it lowercase to improve readability.
60760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60761      # Now convert it back to Unix-style (cygpath)
60762      input_path=`$CYGPATH -u "$shortmode_path"`
60763      new_path="$input_path"
60764    fi
60765  fi
60766
60767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60768  if test "x$test_cygdrive_prefix" = x; then
60769    # As a simple fix, exclude /usr/bin since it's not a real path.
60770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60772      # a path prefixed by /cygdrive for fixpath to work.
60773      new_path="$CYGWIN_ROOT_PATH$input_path"
60774    fi
60775  fi
60776
60777
60778  if test "x$path" != "x$new_path"; then
60779    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60781$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60782  fi
60783
60784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60785
60786  path="$POTENTIAL_FREETYPE_LIB_PATH"
60787  has_colon=`$ECHO $path | $GREP ^.:`
60788  new_path="$path"
60789  if test "x$has_colon" = x; then
60790    # Not in mixed or Windows style, start by that.
60791    new_path=`cmd //c echo $path`
60792  fi
60793
60794
60795  input_path="$new_path"
60796  # Check if we need to convert this using DOS-style short mode. If the path
60797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60798  # take no chances and rewrite it.
60799  # Note: m4 eats our [], so we need to use [ and ] instead.
60800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60801  if test "x$has_forbidden_chars" != x; then
60802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60804  fi
60805
60806
60807  windows_path="$new_path"
60808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60809    unix_path=`$CYGPATH -u "$windows_path"`
60810    new_path="$unix_path"
60811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60813    new_path="$unix_path"
60814  fi
60815
60816  if test "x$path" != "x$new_path"; then
60817    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60819$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60820  fi
60821
60822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60824
60825    else
60826      # We're on a unix platform. Hooray! :)
60827      path="$POTENTIAL_FREETYPE_LIB_PATH"
60828      has_space=`$ECHO "$path" | $GREP " "`
60829      if test "x$has_space" != x; then
60830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60833      fi
60834
60835      # Use eval to expand a potential ~
60836      eval path="$path"
60837      if test ! -f "$path" && test ! -d "$path"; then
60838        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60839      fi
60840
60841      if test -d "$path"; then
60842        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60843      else
60844        dir="`$DIRNAME "$path"`"
60845        base="`$BASENAME "$path"`"
60846        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60847      fi
60848    fi
60849  fi
60850
60851
60852    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60854$as_echo_n "checking for freetype includes... " >&6; }
60855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60856$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60857    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60859$as_echo_n "checking for freetype libraries... " >&6; }
60860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60861$as_echo "$FREETYPE_LIB_PATH" >&6; }
60862  fi
60863
60864              fi
60865            fi
60866          fi
60867        else
60868          FREETYPE_BASE_DIR="$SYSROOT/usr"
60869
60870  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60871  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60872  METHOD="well-known location"
60873
60874  # Let's start with an optimistic view of the world :-)
60875  FOUND_FREETYPE=yes
60876
60877  # First look for the canonical freetype main include file ft2build.h.
60878  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60879    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60880    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60881    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60882      # Fail.
60883      FOUND_FREETYPE=no
60884    fi
60885  fi
60886
60887  if test "x$FOUND_FREETYPE" = xyes; then
60888    # Include file found, let's continue the sanity check.
60889    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60890$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60891
60892    # Reset to default value
60893    FREETYPE_BASE_NAME=freetype
60894    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60895    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60896      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60897          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60898        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60899        # for the .6 version explicitly.
60900        FREETYPE_BASE_NAME=freetype.6
60901        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60902        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60903$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60904      else
60905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60906$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60907        FOUND_FREETYPE=no
60908      fi
60909    else
60910      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60911        # On Windows, we will need both .lib and .dll file.
60912        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60913          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60914$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60915          FOUND_FREETYPE=no
60916        fi
60917      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60918          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60919        # Found lib in isa dir, use that instead.
60920        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60921        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60922$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60923      fi
60924    fi
60925  fi
60926
60927  if test "x$FOUND_FREETYPE" = xyes; then
60928
60929  # Only process if variable expands to non-empty
60930
60931  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60933
60934  # Input might be given as Windows format, start by converting to
60935  # unix format.
60936  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60937  new_path=`$CYGPATH -u "$path"`
60938
60939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60942  # "foo.exe" is OK but "foo" is an error.
60943  #
60944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60945  # It is also a way to make sure we got the proper file name for the real test later on.
60946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60947  if test "x$test_shortpath" = x; then
60948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60950    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60951  fi
60952
60953  # Call helper function which possibly converts this using DOS-style short mode.
60954  # If so, the updated path is stored in $new_path.
60955
60956  input_path="$new_path"
60957  # Check if we need to convert this using DOS-style short mode. If the path
60958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60959  # take no chances and rewrite it.
60960  # Note: m4 eats our [], so we need to use [ and ] instead.
60961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60962  if test "x$has_forbidden_chars" != x; then
60963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60967      # Going to short mode and back again did indeed matter. Since short mode is
60968      # case insensitive, let's make it lowercase to improve readability.
60969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60970      # Now convert it back to Unix-style (cygpath)
60971      input_path=`$CYGPATH -u "$shortmode_path"`
60972      new_path="$input_path"
60973    fi
60974  fi
60975
60976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60977  if test "x$test_cygdrive_prefix" = x; then
60978    # As a simple fix, exclude /usr/bin since it's not a real path.
60979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60981      # a path prefixed by /cygdrive for fixpath to work.
60982      new_path="$CYGWIN_ROOT_PATH$input_path"
60983    fi
60984  fi
60985
60986
60987  if test "x$path" != "x$new_path"; then
60988    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60991  fi
60992
60993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60994
60995  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60996  has_colon=`$ECHO $path | $GREP ^.:`
60997  new_path="$path"
60998  if test "x$has_colon" = x; then
60999    # Not in mixed or Windows style, start by that.
61000    new_path=`cmd //c echo $path`
61001  fi
61002
61003
61004  input_path="$new_path"
61005  # Check if we need to convert this using DOS-style short mode. If the path
61006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61007  # take no chances and rewrite it.
61008  # Note: m4 eats our [], so we need to use [ and ] instead.
61009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61010  if test "x$has_forbidden_chars" != x; then
61011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61013  fi
61014
61015
61016  windows_path="$new_path"
61017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61018    unix_path=`$CYGPATH -u "$windows_path"`
61019    new_path="$unix_path"
61020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61022    new_path="$unix_path"
61023  fi
61024
61025  if test "x$path" != "x$new_path"; then
61026    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61028$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61029  fi
61030
61031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61033
61034    else
61035      # We're on a unix platform. Hooray! :)
61036      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61037      has_space=`$ECHO "$path" | $GREP " "`
61038      if test "x$has_space" != x; then
61039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61042      fi
61043
61044      # Use eval to expand a potential ~
61045      eval path="$path"
61046      if test ! -f "$path" && test ! -d "$path"; then
61047        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61048      fi
61049
61050      if test -d "$path"; then
61051        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61052      else
61053        dir="`$DIRNAME "$path"`"
61054        base="`$BASENAME "$path"`"
61055        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61056      fi
61057    fi
61058  fi
61059
61060
61061  # Only process if variable expands to non-empty
61062
61063  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61065
61066  # Input might be given as Windows format, start by converting to
61067  # unix format.
61068  path="$POTENTIAL_FREETYPE_LIB_PATH"
61069  new_path=`$CYGPATH -u "$path"`
61070
61071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61074  # "foo.exe" is OK but "foo" is an error.
61075  #
61076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61077  # It is also a way to make sure we got the proper file name for the real test later on.
61078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61079  if test "x$test_shortpath" = x; then
61080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61082    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61083  fi
61084
61085  # Call helper function which possibly converts this using DOS-style short mode.
61086  # If so, the updated path is stored in $new_path.
61087
61088  input_path="$new_path"
61089  # Check if we need to convert this using DOS-style short mode. If the path
61090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61091  # take no chances and rewrite it.
61092  # Note: m4 eats our [], so we need to use [ and ] instead.
61093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61094  if test "x$has_forbidden_chars" != x; then
61095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61099      # Going to short mode and back again did indeed matter. Since short mode is
61100      # case insensitive, let's make it lowercase to improve readability.
61101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61102      # Now convert it back to Unix-style (cygpath)
61103      input_path=`$CYGPATH -u "$shortmode_path"`
61104      new_path="$input_path"
61105    fi
61106  fi
61107
61108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61109  if test "x$test_cygdrive_prefix" = x; then
61110    # As a simple fix, exclude /usr/bin since it's not a real path.
61111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61113      # a path prefixed by /cygdrive for fixpath to work.
61114      new_path="$CYGWIN_ROOT_PATH$input_path"
61115    fi
61116  fi
61117
61118
61119  if test "x$path" != "x$new_path"; then
61120    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61123  fi
61124
61125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61126
61127  path="$POTENTIAL_FREETYPE_LIB_PATH"
61128  has_colon=`$ECHO $path | $GREP ^.:`
61129  new_path="$path"
61130  if test "x$has_colon" = x; then
61131    # Not in mixed or Windows style, start by that.
61132    new_path=`cmd //c echo $path`
61133  fi
61134
61135
61136  input_path="$new_path"
61137  # Check if we need to convert this using DOS-style short mode. If the path
61138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61139  # take no chances and rewrite it.
61140  # Note: m4 eats our [], so we need to use [ and ] instead.
61141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61142  if test "x$has_forbidden_chars" != x; then
61143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61145  fi
61146
61147
61148  windows_path="$new_path"
61149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61150    unix_path=`$CYGPATH -u "$windows_path"`
61151    new_path="$unix_path"
61152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61154    new_path="$unix_path"
61155  fi
61156
61157  if test "x$path" != "x$new_path"; then
61158    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61161  fi
61162
61163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61165
61166    else
61167      # We're on a unix platform. Hooray! :)
61168      path="$POTENTIAL_FREETYPE_LIB_PATH"
61169      has_space=`$ECHO "$path" | $GREP " "`
61170      if test "x$has_space" != x; then
61171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61172$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61174      fi
61175
61176      # Use eval to expand a potential ~
61177      eval path="$path"
61178      if test ! -f "$path" && test ! -d "$path"; then
61179        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61180      fi
61181
61182      if test -d "$path"; then
61183        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61184      else
61185        dir="`$DIRNAME "$path"`"
61186        base="`$BASENAME "$path"`"
61187        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61188      fi
61189    fi
61190  fi
61191
61192
61193    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61195$as_echo_n "checking for freetype includes... " >&6; }
61196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61197$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61198    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61200$as_echo_n "checking for freetype libraries... " >&6; }
61201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61202$as_echo "$FREETYPE_LIB_PATH" >&6; }
61203  fi
61204
61205
61206          if test "x$FOUND_FREETYPE" != xyes; then
61207            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61208
61209  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61210  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61211  METHOD="well-known location"
61212
61213  # Let's start with an optimistic view of the world :-)
61214  FOUND_FREETYPE=yes
61215
61216  # First look for the canonical freetype main include file ft2build.h.
61217  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61218    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61219    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61220    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61221      # Fail.
61222      FOUND_FREETYPE=no
61223    fi
61224  fi
61225
61226  if test "x$FOUND_FREETYPE" = xyes; then
61227    # Include file found, let's continue the sanity check.
61228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61229$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61230
61231    # Reset to default value
61232    FREETYPE_BASE_NAME=freetype
61233    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61234    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61235      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61236          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61237        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61238        # for the .6 version explicitly.
61239        FREETYPE_BASE_NAME=freetype.6
61240        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61241        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61242$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61243      else
61244        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61245$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61246        FOUND_FREETYPE=no
61247      fi
61248    else
61249      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61250        # On Windows, we will need both .lib and .dll file.
61251        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61252          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61253$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61254          FOUND_FREETYPE=no
61255        fi
61256      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61257          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61258        # Found lib in isa dir, use that instead.
61259        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61260        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61261$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61262      fi
61263    fi
61264  fi
61265
61266  if test "x$FOUND_FREETYPE" = xyes; then
61267
61268  # Only process if variable expands to non-empty
61269
61270  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61272
61273  # Input might be given as Windows format, start by converting to
61274  # unix format.
61275  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61276  new_path=`$CYGPATH -u "$path"`
61277
61278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61281  # "foo.exe" is OK but "foo" is an error.
61282  #
61283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61284  # It is also a way to make sure we got the proper file name for the real test later on.
61285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61286  if test "x$test_shortpath" = x; then
61287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61289    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61290  fi
61291
61292  # Call helper function which possibly converts this using DOS-style short mode.
61293  # If so, the updated path is stored in $new_path.
61294
61295  input_path="$new_path"
61296  # Check if we need to convert this using DOS-style short mode. If the path
61297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61298  # take no chances and rewrite it.
61299  # Note: m4 eats our [], so we need to use [ and ] instead.
61300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61301  if test "x$has_forbidden_chars" != x; then
61302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61306      # Going to short mode and back again did indeed matter. Since short mode is
61307      # case insensitive, let's make it lowercase to improve readability.
61308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61309      # Now convert it back to Unix-style (cygpath)
61310      input_path=`$CYGPATH -u "$shortmode_path"`
61311      new_path="$input_path"
61312    fi
61313  fi
61314
61315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61316  if test "x$test_cygdrive_prefix" = x; then
61317    # As a simple fix, exclude /usr/bin since it's not a real path.
61318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61320      # a path prefixed by /cygdrive for fixpath to work.
61321      new_path="$CYGWIN_ROOT_PATH$input_path"
61322    fi
61323  fi
61324
61325
61326  if test "x$path" != "x$new_path"; then
61327    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61330  fi
61331
61332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61333
61334  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61335  has_colon=`$ECHO $path | $GREP ^.:`
61336  new_path="$path"
61337  if test "x$has_colon" = x; then
61338    # Not in mixed or Windows style, start by that.
61339    new_path=`cmd //c echo $path`
61340  fi
61341
61342
61343  input_path="$new_path"
61344  # Check if we need to convert this using DOS-style short mode. If the path
61345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61346  # take no chances and rewrite it.
61347  # Note: m4 eats our [], so we need to use [ and ] instead.
61348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61349  if test "x$has_forbidden_chars" != x; then
61350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61352  fi
61353
61354
61355  windows_path="$new_path"
61356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61357    unix_path=`$CYGPATH -u "$windows_path"`
61358    new_path="$unix_path"
61359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61361    new_path="$unix_path"
61362  fi
61363
61364  if test "x$path" != "x$new_path"; then
61365    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61368  fi
61369
61370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61372
61373    else
61374      # We're on a unix platform. Hooray! :)
61375      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61376      has_space=`$ECHO "$path" | $GREP " "`
61377      if test "x$has_space" != x; then
61378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61380        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61381      fi
61382
61383      # Use eval to expand a potential ~
61384      eval path="$path"
61385      if test ! -f "$path" && test ! -d "$path"; then
61386        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61387      fi
61388
61389      if test -d "$path"; then
61390        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61391      else
61392        dir="`$DIRNAME "$path"`"
61393        base="`$BASENAME "$path"`"
61394        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61395      fi
61396    fi
61397  fi
61398
61399
61400  # Only process if variable expands to non-empty
61401
61402  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61404
61405  # Input might be given as Windows format, start by converting to
61406  # unix format.
61407  path="$POTENTIAL_FREETYPE_LIB_PATH"
61408  new_path=`$CYGPATH -u "$path"`
61409
61410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61413  # "foo.exe" is OK but "foo" is an error.
61414  #
61415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61416  # It is also a way to make sure we got the proper file name for the real test later on.
61417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61418  if test "x$test_shortpath" = x; then
61419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61421    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61422  fi
61423
61424  # Call helper function which possibly converts this using DOS-style short mode.
61425  # If so, the updated path is stored in $new_path.
61426
61427  input_path="$new_path"
61428  # Check if we need to convert this using DOS-style short mode. If the path
61429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61430  # take no chances and rewrite it.
61431  # Note: m4 eats our [], so we need to use [ and ] instead.
61432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61433  if test "x$has_forbidden_chars" != x; then
61434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61438      # Going to short mode and back again did indeed matter. Since short mode is
61439      # case insensitive, let's make it lowercase to improve readability.
61440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61441      # Now convert it back to Unix-style (cygpath)
61442      input_path=`$CYGPATH -u "$shortmode_path"`
61443      new_path="$input_path"
61444    fi
61445  fi
61446
61447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61448  if test "x$test_cygdrive_prefix" = x; then
61449    # As a simple fix, exclude /usr/bin since it's not a real path.
61450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61452      # a path prefixed by /cygdrive for fixpath to work.
61453      new_path="$CYGWIN_ROOT_PATH$input_path"
61454    fi
61455  fi
61456
61457
61458  if test "x$path" != "x$new_path"; then
61459    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61462  fi
61463
61464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61465
61466  path="$POTENTIAL_FREETYPE_LIB_PATH"
61467  has_colon=`$ECHO $path | $GREP ^.:`
61468  new_path="$path"
61469  if test "x$has_colon" = x; then
61470    # Not in mixed or Windows style, start by that.
61471    new_path=`cmd //c echo $path`
61472  fi
61473
61474
61475  input_path="$new_path"
61476  # Check if we need to convert this using DOS-style short mode. If the path
61477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61478  # take no chances and rewrite it.
61479  # Note: m4 eats our [], so we need to use [ and ] instead.
61480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61481  if test "x$has_forbidden_chars" != x; then
61482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61484  fi
61485
61486
61487  windows_path="$new_path"
61488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61489    unix_path=`$CYGPATH -u "$windows_path"`
61490    new_path="$unix_path"
61491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61493    new_path="$unix_path"
61494  fi
61495
61496  if test "x$path" != "x$new_path"; then
61497    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61499$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61500  fi
61501
61502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61504
61505    else
61506      # We're on a unix platform. Hooray! :)
61507      path="$POTENTIAL_FREETYPE_LIB_PATH"
61508      has_space=`$ECHO "$path" | $GREP " "`
61509      if test "x$has_space" != x; then
61510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61513      fi
61514
61515      # Use eval to expand a potential ~
61516      eval path="$path"
61517      if test ! -f "$path" && test ! -d "$path"; then
61518        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61519      fi
61520
61521      if test -d "$path"; then
61522        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61523      else
61524        dir="`$DIRNAME "$path"`"
61525        base="`$BASENAME "$path"`"
61526        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61527      fi
61528    fi
61529  fi
61530
61531
61532    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61534$as_echo_n "checking for freetype includes... " >&6; }
61535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61536$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61537    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61539$as_echo_n "checking for freetype libraries... " >&6; }
61540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61541$as_echo "$FREETYPE_LIB_PATH" >&6; }
61542  fi
61543
61544          fi
61545          if test "x$FOUND_FREETYPE" != xyes; then
61546            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61547
61548  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61549  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61550  METHOD="well-known location"
61551
61552  # Let's start with an optimistic view of the world :-)
61553  FOUND_FREETYPE=yes
61554
61555  # First look for the canonical freetype main include file ft2build.h.
61556  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61557    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61558    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61559    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61560      # Fail.
61561      FOUND_FREETYPE=no
61562    fi
61563  fi
61564
61565  if test "x$FOUND_FREETYPE" = xyes; then
61566    # Include file found, let's continue the sanity check.
61567    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61568$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61569
61570    # Reset to default value
61571    FREETYPE_BASE_NAME=freetype
61572    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61573    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61574      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61575          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61576        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61577        # for the .6 version explicitly.
61578        FREETYPE_BASE_NAME=freetype.6
61579        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61580        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61581$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61582      else
61583        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61584$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61585        FOUND_FREETYPE=no
61586      fi
61587    else
61588      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61589        # On Windows, we will need both .lib and .dll file.
61590        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61591          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61592$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61593          FOUND_FREETYPE=no
61594        fi
61595      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61596          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61597        # Found lib in isa dir, use that instead.
61598        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61599        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61600$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61601      fi
61602    fi
61603  fi
61604
61605  if test "x$FOUND_FREETYPE" = xyes; then
61606
61607  # Only process if variable expands to non-empty
61608
61609  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61611
61612  # Input might be given as Windows format, start by converting to
61613  # unix format.
61614  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61615  new_path=`$CYGPATH -u "$path"`
61616
61617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61620  # "foo.exe" is OK but "foo" is an error.
61621  #
61622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61623  # It is also a way to make sure we got the proper file name for the real test later on.
61624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61625  if test "x$test_shortpath" = x; then
61626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61628    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61629  fi
61630
61631  # Call helper function which possibly converts this using DOS-style short mode.
61632  # If so, the updated path is stored in $new_path.
61633
61634  input_path="$new_path"
61635  # Check if we need to convert this using DOS-style short mode. If the path
61636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61637  # take no chances and rewrite it.
61638  # Note: m4 eats our [], so we need to use [ and ] instead.
61639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61640  if test "x$has_forbidden_chars" != x; then
61641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61645      # Going to short mode and back again did indeed matter. Since short mode is
61646      # case insensitive, let's make it lowercase to improve readability.
61647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61648      # Now convert it back to Unix-style (cygpath)
61649      input_path=`$CYGPATH -u "$shortmode_path"`
61650      new_path="$input_path"
61651    fi
61652  fi
61653
61654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61655  if test "x$test_cygdrive_prefix" = x; then
61656    # As a simple fix, exclude /usr/bin since it's not a real path.
61657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61659      # a path prefixed by /cygdrive for fixpath to work.
61660      new_path="$CYGWIN_ROOT_PATH$input_path"
61661    fi
61662  fi
61663
61664
61665  if test "x$path" != "x$new_path"; then
61666    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61669  fi
61670
61671    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61672
61673  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61674  has_colon=`$ECHO $path | $GREP ^.:`
61675  new_path="$path"
61676  if test "x$has_colon" = x; then
61677    # Not in mixed or Windows style, start by that.
61678    new_path=`cmd //c echo $path`
61679  fi
61680
61681
61682  input_path="$new_path"
61683  # Check if we need to convert this using DOS-style short mode. If the path
61684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61685  # take no chances and rewrite it.
61686  # Note: m4 eats our [], so we need to use [ and ] instead.
61687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61688  if test "x$has_forbidden_chars" != x; then
61689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61691  fi
61692
61693
61694  windows_path="$new_path"
61695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61696    unix_path=`$CYGPATH -u "$windows_path"`
61697    new_path="$unix_path"
61698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61700    new_path="$unix_path"
61701  fi
61702
61703  if test "x$path" != "x$new_path"; then
61704    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61707  fi
61708
61709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61711
61712    else
61713      # We're on a unix platform. Hooray! :)
61714      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61715      has_space=`$ECHO "$path" | $GREP " "`
61716      if test "x$has_space" != x; then
61717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61719        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61720      fi
61721
61722      # Use eval to expand a potential ~
61723      eval path="$path"
61724      if test ! -f "$path" && test ! -d "$path"; then
61725        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61726      fi
61727
61728      if test -d "$path"; then
61729        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61730      else
61731        dir="`$DIRNAME "$path"`"
61732        base="`$BASENAME "$path"`"
61733        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61734      fi
61735    fi
61736  fi
61737
61738
61739  # Only process if variable expands to non-empty
61740
61741  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61743
61744  # Input might be given as Windows format, start by converting to
61745  # unix format.
61746  path="$POTENTIAL_FREETYPE_LIB_PATH"
61747  new_path=`$CYGPATH -u "$path"`
61748
61749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61752  # "foo.exe" is OK but "foo" is an error.
61753  #
61754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61755  # It is also a way to make sure we got the proper file name for the real test later on.
61756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61757  if test "x$test_shortpath" = x; then
61758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61760    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61761  fi
61762
61763  # Call helper function which possibly converts this using DOS-style short mode.
61764  # If so, the updated path is stored in $new_path.
61765
61766  input_path="$new_path"
61767  # Check if we need to convert this using DOS-style short mode. If the path
61768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61769  # take no chances and rewrite it.
61770  # Note: m4 eats our [], so we need to use [ and ] instead.
61771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61772  if test "x$has_forbidden_chars" != x; then
61773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61777      # Going to short mode and back again did indeed matter. Since short mode is
61778      # case insensitive, let's make it lowercase to improve readability.
61779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61780      # Now convert it back to Unix-style (cygpath)
61781      input_path=`$CYGPATH -u "$shortmode_path"`
61782      new_path="$input_path"
61783    fi
61784  fi
61785
61786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61787  if test "x$test_cygdrive_prefix" = x; then
61788    # As a simple fix, exclude /usr/bin since it's not a real path.
61789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61791      # a path prefixed by /cygdrive for fixpath to work.
61792      new_path="$CYGWIN_ROOT_PATH$input_path"
61793    fi
61794  fi
61795
61796
61797  if test "x$path" != "x$new_path"; then
61798    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61801  fi
61802
61803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61804
61805  path="$POTENTIAL_FREETYPE_LIB_PATH"
61806  has_colon=`$ECHO $path | $GREP ^.:`
61807  new_path="$path"
61808  if test "x$has_colon" = x; then
61809    # Not in mixed or Windows style, start by that.
61810    new_path=`cmd //c echo $path`
61811  fi
61812
61813
61814  input_path="$new_path"
61815  # Check if we need to convert this using DOS-style short mode. If the path
61816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61817  # take no chances and rewrite it.
61818  # Note: m4 eats our [], so we need to use [ and ] instead.
61819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61820  if test "x$has_forbidden_chars" != x; then
61821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61823  fi
61824
61825
61826  windows_path="$new_path"
61827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61828    unix_path=`$CYGPATH -u "$windows_path"`
61829    new_path="$unix_path"
61830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61832    new_path="$unix_path"
61833  fi
61834
61835  if test "x$path" != "x$new_path"; then
61836    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61839  fi
61840
61841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61843
61844    else
61845      # We're on a unix platform. Hooray! :)
61846      path="$POTENTIAL_FREETYPE_LIB_PATH"
61847      has_space=`$ECHO "$path" | $GREP " "`
61848      if test "x$has_space" != x; then
61849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61852      fi
61853
61854      # Use eval to expand a potential ~
61855      eval path="$path"
61856      if test ! -f "$path" && test ! -d "$path"; then
61857        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61858      fi
61859
61860      if test -d "$path"; then
61861        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61862      else
61863        dir="`$DIRNAME "$path"`"
61864        base="`$BASENAME "$path"`"
61865        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61866      fi
61867    fi
61868  fi
61869
61870
61871    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61873$as_echo_n "checking for freetype includes... " >&6; }
61874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61875$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61876    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61878$as_echo_n "checking for freetype libraries... " >&6; }
61879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61880$as_echo "$FREETYPE_LIB_PATH" >&6; }
61881  fi
61882
61883          fi
61884
61885          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61886            if test "x$FOUND_FREETYPE" != xyes; then
61887              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61888              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61889
61890  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61891  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61892  METHOD="well-known location"
61893
61894  # Let's start with an optimistic view of the world :-)
61895  FOUND_FREETYPE=yes
61896
61897  # First look for the canonical freetype main include file ft2build.h.
61898  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61899    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61900    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61901    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61902      # Fail.
61903      FOUND_FREETYPE=no
61904    fi
61905  fi
61906
61907  if test "x$FOUND_FREETYPE" = xyes; then
61908    # Include file found, let's continue the sanity check.
61909    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61910$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61911
61912    # Reset to default value
61913    FREETYPE_BASE_NAME=freetype
61914    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61915    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61916      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61917          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61918        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61919        # for the .6 version explicitly.
61920        FREETYPE_BASE_NAME=freetype.6
61921        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61922        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61923$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61924      else
61925        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61926$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61927        FOUND_FREETYPE=no
61928      fi
61929    else
61930      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61931        # On Windows, we will need both .lib and .dll file.
61932        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61933          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61934$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61935          FOUND_FREETYPE=no
61936        fi
61937      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61938          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61939        # Found lib in isa dir, use that instead.
61940        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61941        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61942$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61943      fi
61944    fi
61945  fi
61946
61947  if test "x$FOUND_FREETYPE" = xyes; then
61948
61949  # Only process if variable expands to non-empty
61950
61951  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61953
61954  # Input might be given as Windows format, start by converting to
61955  # unix format.
61956  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61957  new_path=`$CYGPATH -u "$path"`
61958
61959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61962  # "foo.exe" is OK but "foo" is an error.
61963  #
61964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61965  # It is also a way to make sure we got the proper file name for the real test later on.
61966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61967  if test "x$test_shortpath" = x; then
61968    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61969$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61970    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61971  fi
61972
61973  # Call helper function which possibly converts this using DOS-style short mode.
61974  # If so, the updated path is stored in $new_path.
61975
61976  input_path="$new_path"
61977  # Check if we need to convert this using DOS-style short mode. If the path
61978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61979  # take no chances and rewrite it.
61980  # Note: m4 eats our [], so we need to use [ and ] instead.
61981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61982  if test "x$has_forbidden_chars" != x; then
61983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61987      # Going to short mode and back again did indeed matter. Since short mode is
61988      # case insensitive, let's make it lowercase to improve readability.
61989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61990      # Now convert it back to Unix-style (cygpath)
61991      input_path=`$CYGPATH -u "$shortmode_path"`
61992      new_path="$input_path"
61993    fi
61994  fi
61995
61996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61997  if test "x$test_cygdrive_prefix" = x; then
61998    # As a simple fix, exclude /usr/bin since it's not a real path.
61999    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62001      # a path prefixed by /cygdrive for fixpath to work.
62002      new_path="$CYGWIN_ROOT_PATH$input_path"
62003    fi
62004  fi
62005
62006
62007  if test "x$path" != "x$new_path"; then
62008    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62011  fi
62012
62013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62014
62015  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62016  has_colon=`$ECHO $path | $GREP ^.:`
62017  new_path="$path"
62018  if test "x$has_colon" = x; then
62019    # Not in mixed or Windows style, start by that.
62020    new_path=`cmd //c echo $path`
62021  fi
62022
62023
62024  input_path="$new_path"
62025  # Check if we need to convert this using DOS-style short mode. If the path
62026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62027  # take no chances and rewrite it.
62028  # Note: m4 eats our [], so we need to use [ and ] instead.
62029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62030  if test "x$has_forbidden_chars" != x; then
62031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62033  fi
62034
62035
62036  windows_path="$new_path"
62037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62038    unix_path=`$CYGPATH -u "$windows_path"`
62039    new_path="$unix_path"
62040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62042    new_path="$unix_path"
62043  fi
62044
62045  if test "x$path" != "x$new_path"; then
62046    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62048$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62049  fi
62050
62051  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62052  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62053
62054    else
62055      # We're on a unix platform. Hooray! :)
62056      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62057      has_space=`$ECHO "$path" | $GREP " "`
62058      if test "x$has_space" != x; then
62059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62061        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62062      fi
62063
62064      # Use eval to expand a potential ~
62065      eval path="$path"
62066      if test ! -f "$path" && test ! -d "$path"; then
62067        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62068      fi
62069
62070      if test -d "$path"; then
62071        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62072      else
62073        dir="`$DIRNAME "$path"`"
62074        base="`$BASENAME "$path"`"
62075        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62076      fi
62077    fi
62078  fi
62079
62080
62081  # Only process if variable expands to non-empty
62082
62083  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62085
62086  # Input might be given as Windows format, start by converting to
62087  # unix format.
62088  path="$POTENTIAL_FREETYPE_LIB_PATH"
62089  new_path=`$CYGPATH -u "$path"`
62090
62091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62094  # "foo.exe" is OK but "foo" is an error.
62095  #
62096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62097  # It is also a way to make sure we got the proper file name for the real test later on.
62098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62099  if test "x$test_shortpath" = x; then
62100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62102    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62103  fi
62104
62105  # Call helper function which possibly converts this using DOS-style short mode.
62106  # If so, the updated path is stored in $new_path.
62107
62108  input_path="$new_path"
62109  # Check if we need to convert this using DOS-style short mode. If the path
62110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62111  # take no chances and rewrite it.
62112  # Note: m4 eats our [], so we need to use [ and ] instead.
62113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62114  if test "x$has_forbidden_chars" != x; then
62115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62119      # Going to short mode and back again did indeed matter. Since short mode is
62120      # case insensitive, let's make it lowercase to improve readability.
62121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62122      # Now convert it back to Unix-style (cygpath)
62123      input_path=`$CYGPATH -u "$shortmode_path"`
62124      new_path="$input_path"
62125    fi
62126  fi
62127
62128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62129  if test "x$test_cygdrive_prefix" = x; then
62130    # As a simple fix, exclude /usr/bin since it's not a real path.
62131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62133      # a path prefixed by /cygdrive for fixpath to work.
62134      new_path="$CYGWIN_ROOT_PATH$input_path"
62135    fi
62136  fi
62137
62138
62139  if test "x$path" != "x$new_path"; then
62140    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62143  fi
62144
62145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62146
62147  path="$POTENTIAL_FREETYPE_LIB_PATH"
62148  has_colon=`$ECHO $path | $GREP ^.:`
62149  new_path="$path"
62150  if test "x$has_colon" = x; then
62151    # Not in mixed or Windows style, start by that.
62152    new_path=`cmd //c echo $path`
62153  fi
62154
62155
62156  input_path="$new_path"
62157  # Check if we need to convert this using DOS-style short mode. If the path
62158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62159  # take no chances and rewrite it.
62160  # Note: m4 eats our [], so we need to use [ and ] instead.
62161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62162  if test "x$has_forbidden_chars" != x; then
62163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62165  fi
62166
62167
62168  windows_path="$new_path"
62169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62170    unix_path=`$CYGPATH -u "$windows_path"`
62171    new_path="$unix_path"
62172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62174    new_path="$unix_path"
62175  fi
62176
62177  if test "x$path" != "x$new_path"; then
62178    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62181  fi
62182
62183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62185
62186    else
62187      # We're on a unix platform. Hooray! :)
62188      path="$POTENTIAL_FREETYPE_LIB_PATH"
62189      has_space=`$ECHO "$path" | $GREP " "`
62190      if test "x$has_space" != x; then
62191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62193        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62194      fi
62195
62196      # Use eval to expand a potential ~
62197      eval path="$path"
62198      if test ! -f "$path" && test ! -d "$path"; then
62199        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62200      fi
62201
62202      if test -d "$path"; then
62203        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62204      else
62205        dir="`$DIRNAME "$path"`"
62206        base="`$BASENAME "$path"`"
62207        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62208      fi
62209    fi
62210  fi
62211
62212
62213    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62215$as_echo_n "checking for freetype includes... " >&6; }
62216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62217$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62218    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62220$as_echo_n "checking for freetype libraries... " >&6; }
62221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62222$as_echo "$FREETYPE_LIB_PATH" >&6; }
62223  fi
62224
62225            fi
62226          fi
62227
62228          if test "x$FOUND_FREETYPE" != xyes; then
62229            FREETYPE_BASE_DIR="$SYSROOT/usr"
62230            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62231
62232  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62233  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62234  METHOD="well-known location"
62235
62236  # Let's start with an optimistic view of the world :-)
62237  FOUND_FREETYPE=yes
62238
62239  # First look for the canonical freetype main include file ft2build.h.
62240  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62241    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62242    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62243    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62244      # Fail.
62245      FOUND_FREETYPE=no
62246    fi
62247  fi
62248
62249  if test "x$FOUND_FREETYPE" = xyes; then
62250    # Include file found, let's continue the sanity check.
62251    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62252$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62253
62254    # Reset to default value
62255    FREETYPE_BASE_NAME=freetype
62256    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62257    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62258      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62259          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62260        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62261        # for the .6 version explicitly.
62262        FREETYPE_BASE_NAME=freetype.6
62263        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62264        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62265$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62266      else
62267        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62268$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62269        FOUND_FREETYPE=no
62270      fi
62271    else
62272      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62273        # On Windows, we will need both .lib and .dll file.
62274        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62275          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62276$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62277          FOUND_FREETYPE=no
62278        fi
62279      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62280          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62281        # Found lib in isa dir, use that instead.
62282        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62283        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62284$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62285      fi
62286    fi
62287  fi
62288
62289  if test "x$FOUND_FREETYPE" = xyes; then
62290
62291  # Only process if variable expands to non-empty
62292
62293  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62295
62296  # Input might be given as Windows format, start by converting to
62297  # unix format.
62298  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62299  new_path=`$CYGPATH -u "$path"`
62300
62301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62304  # "foo.exe" is OK but "foo" is an error.
62305  #
62306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62307  # It is also a way to make sure we got the proper file name for the real test later on.
62308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62309  if test "x$test_shortpath" = x; then
62310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62312    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62313  fi
62314
62315  # Call helper function which possibly converts this using DOS-style short mode.
62316  # If so, the updated path is stored in $new_path.
62317
62318  input_path="$new_path"
62319  # Check if we need to convert this using DOS-style short mode. If the path
62320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62321  # take no chances and rewrite it.
62322  # Note: m4 eats our [], so we need to use [ and ] instead.
62323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62324  if test "x$has_forbidden_chars" != x; then
62325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62329      # Going to short mode and back again did indeed matter. Since short mode is
62330      # case insensitive, let's make it lowercase to improve readability.
62331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62332      # Now convert it back to Unix-style (cygpath)
62333      input_path=`$CYGPATH -u "$shortmode_path"`
62334      new_path="$input_path"
62335    fi
62336  fi
62337
62338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62339  if test "x$test_cygdrive_prefix" = x; then
62340    # As a simple fix, exclude /usr/bin since it's not a real path.
62341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62343      # a path prefixed by /cygdrive for fixpath to work.
62344      new_path="$CYGWIN_ROOT_PATH$input_path"
62345    fi
62346  fi
62347
62348
62349  if test "x$path" != "x$new_path"; then
62350    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62352$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62353  fi
62354
62355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62356
62357  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62358  has_colon=`$ECHO $path | $GREP ^.:`
62359  new_path="$path"
62360  if test "x$has_colon" = x; then
62361    # Not in mixed or Windows style, start by that.
62362    new_path=`cmd //c echo $path`
62363  fi
62364
62365
62366  input_path="$new_path"
62367  # Check if we need to convert this using DOS-style short mode. If the path
62368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62369  # take no chances and rewrite it.
62370  # Note: m4 eats our [], so we need to use [ and ] instead.
62371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62372  if test "x$has_forbidden_chars" != x; then
62373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62375  fi
62376
62377
62378  windows_path="$new_path"
62379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62380    unix_path=`$CYGPATH -u "$windows_path"`
62381    new_path="$unix_path"
62382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62384    new_path="$unix_path"
62385  fi
62386
62387  if test "x$path" != "x$new_path"; then
62388    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62390$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62391  fi
62392
62393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62395
62396    else
62397      # We're on a unix platform. Hooray! :)
62398      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62399      has_space=`$ECHO "$path" | $GREP " "`
62400      if test "x$has_space" != x; then
62401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62402$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62404      fi
62405
62406      # Use eval to expand a potential ~
62407      eval path="$path"
62408      if test ! -f "$path" && test ! -d "$path"; then
62409        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62410      fi
62411
62412      if test -d "$path"; then
62413        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62414      else
62415        dir="`$DIRNAME "$path"`"
62416        base="`$BASENAME "$path"`"
62417        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62418      fi
62419    fi
62420  fi
62421
62422
62423  # Only process if variable expands to non-empty
62424
62425  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62427
62428  # Input might be given as Windows format, start by converting to
62429  # unix format.
62430  path="$POTENTIAL_FREETYPE_LIB_PATH"
62431  new_path=`$CYGPATH -u "$path"`
62432
62433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62436  # "foo.exe" is OK but "foo" is an error.
62437  #
62438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62439  # It is also a way to make sure we got the proper file name for the real test later on.
62440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62441  if test "x$test_shortpath" = x; then
62442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62444    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62445  fi
62446
62447  # Call helper function which possibly converts this using DOS-style short mode.
62448  # If so, the updated path is stored in $new_path.
62449
62450  input_path="$new_path"
62451  # Check if we need to convert this using DOS-style short mode. If the path
62452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62453  # take no chances and rewrite it.
62454  # Note: m4 eats our [], so we need to use [ and ] instead.
62455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62456  if test "x$has_forbidden_chars" != x; then
62457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62461      # Going to short mode and back again did indeed matter. Since short mode is
62462      # case insensitive, let's make it lowercase to improve readability.
62463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62464      # Now convert it back to Unix-style (cygpath)
62465      input_path=`$CYGPATH -u "$shortmode_path"`
62466      new_path="$input_path"
62467    fi
62468  fi
62469
62470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62471  if test "x$test_cygdrive_prefix" = x; then
62472    # As a simple fix, exclude /usr/bin since it's not a real path.
62473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62475      # a path prefixed by /cygdrive for fixpath to work.
62476      new_path="$CYGWIN_ROOT_PATH$input_path"
62477    fi
62478  fi
62479
62480
62481  if test "x$path" != "x$new_path"; then
62482    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62485  fi
62486
62487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62488
62489  path="$POTENTIAL_FREETYPE_LIB_PATH"
62490  has_colon=`$ECHO $path | $GREP ^.:`
62491  new_path="$path"
62492  if test "x$has_colon" = x; then
62493    # Not in mixed or Windows style, start by that.
62494    new_path=`cmd //c echo $path`
62495  fi
62496
62497
62498  input_path="$new_path"
62499  # Check if we need to convert this using DOS-style short mode. If the path
62500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62501  # take no chances and rewrite it.
62502  # Note: m4 eats our [], so we need to use [ and ] instead.
62503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62504  if test "x$has_forbidden_chars" != x; then
62505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62507  fi
62508
62509
62510  windows_path="$new_path"
62511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62512    unix_path=`$CYGPATH -u "$windows_path"`
62513    new_path="$unix_path"
62514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62516    new_path="$unix_path"
62517  fi
62518
62519  if test "x$path" != "x$new_path"; then
62520    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62523  fi
62524
62525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62527
62528    else
62529      # We're on a unix platform. Hooray! :)
62530      path="$POTENTIAL_FREETYPE_LIB_PATH"
62531      has_space=`$ECHO "$path" | $GREP " "`
62532      if test "x$has_space" != x; then
62533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62536      fi
62537
62538      # Use eval to expand a potential ~
62539      eval path="$path"
62540      if test ! -f "$path" && test ! -d "$path"; then
62541        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62542      fi
62543
62544      if test -d "$path"; then
62545        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62546      else
62547        dir="`$DIRNAME "$path"`"
62548        base="`$BASENAME "$path"`"
62549        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62550      fi
62551    fi
62552  fi
62553
62554
62555    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62557$as_echo_n "checking for freetype includes... " >&6; }
62558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62559$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62560    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62562$as_echo_n "checking for freetype libraries... " >&6; }
62563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62564$as_echo "$FREETYPE_LIB_PATH" >&6; }
62565  fi
62566
62567            else
62568
62569  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62570  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62571  METHOD="well-known location"
62572
62573  # Let's start with an optimistic view of the world :-)
62574  FOUND_FREETYPE=yes
62575
62576  # First look for the canonical freetype main include file ft2build.h.
62577  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62578    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62579    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62580    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62581      # Fail.
62582      FOUND_FREETYPE=no
62583    fi
62584  fi
62585
62586  if test "x$FOUND_FREETYPE" = xyes; then
62587    # Include file found, let's continue the sanity check.
62588    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62589$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62590
62591    # Reset to default value
62592    FREETYPE_BASE_NAME=freetype
62593    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62594    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62595      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62596          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62597        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62598        # for the .6 version explicitly.
62599        FREETYPE_BASE_NAME=freetype.6
62600        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62601        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62602$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62603      else
62604        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62605$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62606        FOUND_FREETYPE=no
62607      fi
62608    else
62609      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62610        # On Windows, we will need both .lib and .dll file.
62611        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62612          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62613$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62614          FOUND_FREETYPE=no
62615        fi
62616      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62617          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62618        # Found lib in isa dir, use that instead.
62619        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62620        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62621$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62622      fi
62623    fi
62624  fi
62625
62626  if test "x$FOUND_FREETYPE" = xyes; then
62627
62628  # Only process if variable expands to non-empty
62629
62630  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62632
62633  # Input might be given as Windows format, start by converting to
62634  # unix format.
62635  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62636  new_path=`$CYGPATH -u "$path"`
62637
62638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62641  # "foo.exe" is OK but "foo" is an error.
62642  #
62643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62644  # It is also a way to make sure we got the proper file name for the real test later on.
62645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62646  if test "x$test_shortpath" = x; then
62647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62649    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62650  fi
62651
62652  # Call helper function which possibly converts this using DOS-style short mode.
62653  # If so, the updated path is stored in $new_path.
62654
62655  input_path="$new_path"
62656  # Check if we need to convert this using DOS-style short mode. If the path
62657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62658  # take no chances and rewrite it.
62659  # Note: m4 eats our [], so we need to use [ and ] instead.
62660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62661  if test "x$has_forbidden_chars" != x; then
62662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62666      # Going to short mode and back again did indeed matter. Since short mode is
62667      # case insensitive, let's make it lowercase to improve readability.
62668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62669      # Now convert it back to Unix-style (cygpath)
62670      input_path=`$CYGPATH -u "$shortmode_path"`
62671      new_path="$input_path"
62672    fi
62673  fi
62674
62675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62676  if test "x$test_cygdrive_prefix" = x; then
62677    # As a simple fix, exclude /usr/bin since it's not a real path.
62678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62680      # a path prefixed by /cygdrive for fixpath to work.
62681      new_path="$CYGWIN_ROOT_PATH$input_path"
62682    fi
62683  fi
62684
62685
62686  if test "x$path" != "x$new_path"; then
62687    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62689$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62690  fi
62691
62692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62693
62694  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62695  has_colon=`$ECHO $path | $GREP ^.:`
62696  new_path="$path"
62697  if test "x$has_colon" = x; then
62698    # Not in mixed or Windows style, start by that.
62699    new_path=`cmd //c echo $path`
62700  fi
62701
62702
62703  input_path="$new_path"
62704  # Check if we need to convert this using DOS-style short mode. If the path
62705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62706  # take no chances and rewrite it.
62707  # Note: m4 eats our [], so we need to use [ and ] instead.
62708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62709  if test "x$has_forbidden_chars" != x; then
62710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62712  fi
62713
62714
62715  windows_path="$new_path"
62716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62717    unix_path=`$CYGPATH -u "$windows_path"`
62718    new_path="$unix_path"
62719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62721    new_path="$unix_path"
62722  fi
62723
62724  if test "x$path" != "x$new_path"; then
62725    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62728  fi
62729
62730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62732
62733    else
62734      # We're on a unix platform. Hooray! :)
62735      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62736      has_space=`$ECHO "$path" | $GREP " "`
62737      if test "x$has_space" != x; then
62738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62739$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62740        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62741      fi
62742
62743      # Use eval to expand a potential ~
62744      eval path="$path"
62745      if test ! -f "$path" && test ! -d "$path"; then
62746        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62747      fi
62748
62749      if test -d "$path"; then
62750        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62751      else
62752        dir="`$DIRNAME "$path"`"
62753        base="`$BASENAME "$path"`"
62754        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62755      fi
62756    fi
62757  fi
62758
62759
62760  # Only process if variable expands to non-empty
62761
62762  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62764
62765  # Input might be given as Windows format, start by converting to
62766  # unix format.
62767  path="$POTENTIAL_FREETYPE_LIB_PATH"
62768  new_path=`$CYGPATH -u "$path"`
62769
62770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62773  # "foo.exe" is OK but "foo" is an error.
62774  #
62775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62776  # It is also a way to make sure we got the proper file name for the real test later on.
62777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62778  if test "x$test_shortpath" = x; then
62779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62781    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62782  fi
62783
62784  # Call helper function which possibly converts this using DOS-style short mode.
62785  # If so, the updated path is stored in $new_path.
62786
62787  input_path="$new_path"
62788  # Check if we need to convert this using DOS-style short mode. If the path
62789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62790  # take no chances and rewrite it.
62791  # Note: m4 eats our [], so we need to use [ and ] instead.
62792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62793  if test "x$has_forbidden_chars" != x; then
62794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62798      # Going to short mode and back again did indeed matter. Since short mode is
62799      # case insensitive, let's make it lowercase to improve readability.
62800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62801      # Now convert it back to Unix-style (cygpath)
62802      input_path=`$CYGPATH -u "$shortmode_path"`
62803      new_path="$input_path"
62804    fi
62805  fi
62806
62807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62808  if test "x$test_cygdrive_prefix" = x; then
62809    # As a simple fix, exclude /usr/bin since it's not a real path.
62810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62812      # a path prefixed by /cygdrive for fixpath to work.
62813      new_path="$CYGWIN_ROOT_PATH$input_path"
62814    fi
62815  fi
62816
62817
62818  if test "x$path" != "x$new_path"; then
62819    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62821$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62822  fi
62823
62824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62825
62826  path="$POTENTIAL_FREETYPE_LIB_PATH"
62827  has_colon=`$ECHO $path | $GREP ^.:`
62828  new_path="$path"
62829  if test "x$has_colon" = x; then
62830    # Not in mixed or Windows style, start by that.
62831    new_path=`cmd //c echo $path`
62832  fi
62833
62834
62835  input_path="$new_path"
62836  # Check if we need to convert this using DOS-style short mode. If the path
62837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62838  # take no chances and rewrite it.
62839  # Note: m4 eats our [], so we need to use [ and ] instead.
62840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62841  if test "x$has_forbidden_chars" != x; then
62842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62844  fi
62845
62846
62847  windows_path="$new_path"
62848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62849    unix_path=`$CYGPATH -u "$windows_path"`
62850    new_path="$unix_path"
62851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62853    new_path="$unix_path"
62854  fi
62855
62856  if test "x$path" != "x$new_path"; then
62857    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62859$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62860  fi
62861
62862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62864
62865    else
62866      # We're on a unix platform. Hooray! :)
62867      path="$POTENTIAL_FREETYPE_LIB_PATH"
62868      has_space=`$ECHO "$path" | $GREP " "`
62869      if test "x$has_space" != x; then
62870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62871$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62873      fi
62874
62875      # Use eval to expand a potential ~
62876      eval path="$path"
62877      if test ! -f "$path" && test ! -d "$path"; then
62878        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62879      fi
62880
62881      if test -d "$path"; then
62882        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62883      else
62884        dir="`$DIRNAME "$path"`"
62885        base="`$BASENAME "$path"`"
62886        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62887      fi
62888    fi
62889  fi
62890
62891
62892    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62894$as_echo_n "checking for freetype includes... " >&6; }
62895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62896$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62897    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62899$as_echo_n "checking for freetype libraries... " >&6; }
62900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62901$as_echo "$FREETYPE_LIB_PATH" >&6; }
62902  fi
62903
62904              if test "x$FOUND_FREETYPE" != xyes; then
62905
62906  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62907  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62908  METHOD="well-known location"
62909
62910  # Let's start with an optimistic view of the world :-)
62911  FOUND_FREETYPE=yes
62912
62913  # First look for the canonical freetype main include file ft2build.h.
62914  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62915    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62916    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62917    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62918      # Fail.
62919      FOUND_FREETYPE=no
62920    fi
62921  fi
62922
62923  if test "x$FOUND_FREETYPE" = xyes; then
62924    # Include file found, let's continue the sanity check.
62925    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62926$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62927
62928    # Reset to default value
62929    FREETYPE_BASE_NAME=freetype
62930    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62931    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62932      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62933          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62934        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62935        # for the .6 version explicitly.
62936        FREETYPE_BASE_NAME=freetype.6
62937        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62938        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62939$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62940      else
62941        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62942$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62943        FOUND_FREETYPE=no
62944      fi
62945    else
62946      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62947        # On Windows, we will need both .lib and .dll file.
62948        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62949          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62950$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62951          FOUND_FREETYPE=no
62952        fi
62953      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62954          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62955        # Found lib in isa dir, use that instead.
62956        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62957        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62958$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62959      fi
62960    fi
62961  fi
62962
62963  if test "x$FOUND_FREETYPE" = xyes; then
62964
62965  # Only process if variable expands to non-empty
62966
62967  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62969
62970  # Input might be given as Windows format, start by converting to
62971  # unix format.
62972  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62973  new_path=`$CYGPATH -u "$path"`
62974
62975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62978  # "foo.exe" is OK but "foo" is an error.
62979  #
62980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62981  # It is also a way to make sure we got the proper file name for the real test later on.
62982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62983  if test "x$test_shortpath" = x; then
62984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62986    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62987  fi
62988
62989  # Call helper function which possibly converts this using DOS-style short mode.
62990  # If so, the updated path is stored in $new_path.
62991
62992  input_path="$new_path"
62993  # Check if we need to convert this using DOS-style short mode. If the path
62994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62995  # take no chances and rewrite it.
62996  # Note: m4 eats our [], so we need to use [ and ] instead.
62997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62998  if test "x$has_forbidden_chars" != x; then
62999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63003      # Going to short mode and back again did indeed matter. Since short mode is
63004      # case insensitive, let's make it lowercase to improve readability.
63005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63006      # Now convert it back to Unix-style (cygpath)
63007      input_path=`$CYGPATH -u "$shortmode_path"`
63008      new_path="$input_path"
63009    fi
63010  fi
63011
63012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63013  if test "x$test_cygdrive_prefix" = x; then
63014    # As a simple fix, exclude /usr/bin since it's not a real path.
63015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63017      # a path prefixed by /cygdrive for fixpath to work.
63018      new_path="$CYGWIN_ROOT_PATH$input_path"
63019    fi
63020  fi
63021
63022
63023  if test "x$path" != "x$new_path"; then
63024    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63027  fi
63028
63029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63030
63031  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63032  has_colon=`$ECHO $path | $GREP ^.:`
63033  new_path="$path"
63034  if test "x$has_colon" = x; then
63035    # Not in mixed or Windows style, start by that.
63036    new_path=`cmd //c echo $path`
63037  fi
63038
63039
63040  input_path="$new_path"
63041  # Check if we need to convert this using DOS-style short mode. If the path
63042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63043  # take no chances and rewrite it.
63044  # Note: m4 eats our [], so we need to use [ and ] instead.
63045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63046  if test "x$has_forbidden_chars" != x; then
63047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63049  fi
63050
63051
63052  windows_path="$new_path"
63053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63054    unix_path=`$CYGPATH -u "$windows_path"`
63055    new_path="$unix_path"
63056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63058    new_path="$unix_path"
63059  fi
63060
63061  if test "x$path" != "x$new_path"; then
63062    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63065  fi
63066
63067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63069
63070    else
63071      # We're on a unix platform. Hooray! :)
63072      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63073      has_space=`$ECHO "$path" | $GREP " "`
63074      if test "x$has_space" != x; then
63075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63076$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63078      fi
63079
63080      # Use eval to expand a potential ~
63081      eval path="$path"
63082      if test ! -f "$path" && test ! -d "$path"; then
63083        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63084      fi
63085
63086      if test -d "$path"; then
63087        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63088      else
63089        dir="`$DIRNAME "$path"`"
63090        base="`$BASENAME "$path"`"
63091        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63092      fi
63093    fi
63094  fi
63095
63096
63097  # Only process if variable expands to non-empty
63098
63099  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63101
63102  # Input might be given as Windows format, start by converting to
63103  # unix format.
63104  path="$POTENTIAL_FREETYPE_LIB_PATH"
63105  new_path=`$CYGPATH -u "$path"`
63106
63107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63110  # "foo.exe" is OK but "foo" is an error.
63111  #
63112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63113  # It is also a way to make sure we got the proper file name for the real test later on.
63114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63115  if test "x$test_shortpath" = x; then
63116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63118    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63119  fi
63120
63121  # Call helper function which possibly converts this using DOS-style short mode.
63122  # If so, the updated path is stored in $new_path.
63123
63124  input_path="$new_path"
63125  # Check if we need to convert this using DOS-style short mode. If the path
63126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63127  # take no chances and rewrite it.
63128  # Note: m4 eats our [], so we need to use [ and ] instead.
63129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63130  if test "x$has_forbidden_chars" != x; then
63131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63135      # Going to short mode and back again did indeed matter. Since short mode is
63136      # case insensitive, let's make it lowercase to improve readability.
63137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63138      # Now convert it back to Unix-style (cygpath)
63139      input_path=`$CYGPATH -u "$shortmode_path"`
63140      new_path="$input_path"
63141    fi
63142  fi
63143
63144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63145  if test "x$test_cygdrive_prefix" = x; then
63146    # As a simple fix, exclude /usr/bin since it's not a real path.
63147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63149      # a path prefixed by /cygdrive for fixpath to work.
63150      new_path="$CYGWIN_ROOT_PATH$input_path"
63151    fi
63152  fi
63153
63154
63155  if test "x$path" != "x$new_path"; then
63156    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63159  fi
63160
63161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63162
63163  path="$POTENTIAL_FREETYPE_LIB_PATH"
63164  has_colon=`$ECHO $path | $GREP ^.:`
63165  new_path="$path"
63166  if test "x$has_colon" = x; then
63167    # Not in mixed or Windows style, start by that.
63168    new_path=`cmd //c echo $path`
63169  fi
63170
63171
63172  input_path="$new_path"
63173  # Check if we need to convert this using DOS-style short mode. If the path
63174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63175  # take no chances and rewrite it.
63176  # Note: m4 eats our [], so we need to use [ and ] instead.
63177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63178  if test "x$has_forbidden_chars" != x; then
63179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63181  fi
63182
63183
63184  windows_path="$new_path"
63185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63186    unix_path=`$CYGPATH -u "$windows_path"`
63187    new_path="$unix_path"
63188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63190    new_path="$unix_path"
63191  fi
63192
63193  if test "x$path" != "x$new_path"; then
63194    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63196$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63197  fi
63198
63199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63201
63202    else
63203      # We're on a unix platform. Hooray! :)
63204      path="$POTENTIAL_FREETYPE_LIB_PATH"
63205      has_space=`$ECHO "$path" | $GREP " "`
63206      if test "x$has_space" != x; then
63207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63210      fi
63211
63212      # Use eval to expand a potential ~
63213      eval path="$path"
63214      if test ! -f "$path" && test ! -d "$path"; then
63215        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63216      fi
63217
63218      if test -d "$path"; then
63219        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63220      else
63221        dir="`$DIRNAME "$path"`"
63222        base="`$BASENAME "$path"`"
63223        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63224      fi
63225    fi
63226  fi
63227
63228
63229    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63231$as_echo_n "checking for freetype includes... " >&6; }
63232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63233$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63234    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63236$as_echo_n "checking for freetype libraries... " >&6; }
63237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63238$as_echo "$FREETYPE_LIB_PATH" >&6; }
63239  fi
63240
63241              fi
63242            fi
63243          fi
63244        fi
63245      fi # end check in well-known locations
63246
63247      if test "x$FOUND_FREETYPE" != xyes; then
63248
63249  # Print a helpful message on how to acquire the necessary build dependency.
63250  # freetype is the help tag: freetype, cups, alsa etc
63251  MISSING_DEPENDENCY=freetype
63252
63253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63254    cygwin_help $MISSING_DEPENDENCY
63255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63256    msys_help $MISSING_DEPENDENCY
63257  else
63258    PKGHANDLER_COMMAND=
63259
63260    case $PKGHANDLER in
63261      apt-get)
63262        apt_help     $MISSING_DEPENDENCY ;;
63263      yum)
63264        yum_help     $MISSING_DEPENDENCY ;;
63265      brew)
63266        brew_help    $MISSING_DEPENDENCY ;;
63267      port)
63268        port_help    $MISSING_DEPENDENCY ;;
63269      pkgutil)
63270        pkgutil_help $MISSING_DEPENDENCY ;;
63271      pkgadd)
63272        pkgadd_help  $MISSING_DEPENDENCY ;;
63273    esac
63274
63275    if test "x$PKGHANDLER_COMMAND" != x; then
63276      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63277    fi
63278  fi
63279
63280        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63281      fi
63282    fi # end user specified settings
63283
63284    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63285    if test "x$FREETYPE_CFLAGS" = x; then
63286
63287  # Only process if variable expands to non-empty
63288
63289  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63291
63292  # Input might be given as Windows format, start by converting to
63293  # unix format.
63294  path="$FREETYPE_INCLUDE_PATH"
63295  new_path=`$CYGPATH -u "$path"`
63296
63297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63300  # "foo.exe" is OK but "foo" is an error.
63301  #
63302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63303  # It is also a way to make sure we got the proper file name for the real test later on.
63304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63305  if test "x$test_shortpath" = x; then
63306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63307$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63308    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63309  fi
63310
63311  # Call helper function which possibly converts this using DOS-style short mode.
63312  # If so, the updated path is stored in $new_path.
63313
63314  input_path="$new_path"
63315  # Check if we need to convert this using DOS-style short mode. If the path
63316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63317  # take no chances and rewrite it.
63318  # Note: m4 eats our [], so we need to use [ and ] instead.
63319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63320  if test "x$has_forbidden_chars" != x; then
63321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63325      # Going to short mode and back again did indeed matter. Since short mode is
63326      # case insensitive, let's make it lowercase to improve readability.
63327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63328      # Now convert it back to Unix-style (cygpath)
63329      input_path=`$CYGPATH -u "$shortmode_path"`
63330      new_path="$input_path"
63331    fi
63332  fi
63333
63334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63335  if test "x$test_cygdrive_prefix" = x; then
63336    # As a simple fix, exclude /usr/bin since it's not a real path.
63337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63339      # a path prefixed by /cygdrive for fixpath to work.
63340      new_path="$CYGWIN_ROOT_PATH$input_path"
63341    fi
63342  fi
63343
63344
63345  if test "x$path" != "x$new_path"; then
63346    FREETYPE_INCLUDE_PATH="$new_path"
63347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63348$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63349  fi
63350
63351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63352
63353  path="$FREETYPE_INCLUDE_PATH"
63354  has_colon=`$ECHO $path | $GREP ^.:`
63355  new_path="$path"
63356  if test "x$has_colon" = x; then
63357    # Not in mixed or Windows style, start by that.
63358    new_path=`cmd //c echo $path`
63359  fi
63360
63361
63362  input_path="$new_path"
63363  # Check if we need to convert this using DOS-style short mode. If the path
63364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63365  # take no chances and rewrite it.
63366  # Note: m4 eats our [], so we need to use [ and ] instead.
63367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63368  if test "x$has_forbidden_chars" != x; then
63369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63371  fi
63372
63373
63374  windows_path="$new_path"
63375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63376    unix_path=`$CYGPATH -u "$windows_path"`
63377    new_path="$unix_path"
63378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63380    new_path="$unix_path"
63381  fi
63382
63383  if test "x$path" != "x$new_path"; then
63384    FREETYPE_INCLUDE_PATH="$new_path"
63385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63386$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63387  fi
63388
63389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63391
63392    else
63393      # We're on a unix platform. Hooray! :)
63394      path="$FREETYPE_INCLUDE_PATH"
63395      has_space=`$ECHO "$path" | $GREP " "`
63396      if test "x$has_space" != x; then
63397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63398$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63400      fi
63401
63402      # Use eval to expand a potential ~
63403      eval path="$path"
63404      if test ! -f "$path" && test ! -d "$path"; then
63405        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63406      fi
63407
63408      if test -d "$path"; then
63409        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63410      else
63411        dir="`$DIRNAME "$path"`"
63412        base="`$BASENAME "$path"`"
63413        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63414      fi
63415    fi
63416  fi
63417
63418      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63419        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63420      else
63421        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63422      fi
63423    fi
63424
63425    if test "x$FREETYPE_LIBS" = x; then
63426
63427  # Only process if variable expands to non-empty
63428
63429  if test "x$FREETYPE_LIB_PATH" != x; then
63430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63431
63432  # Input might be given as Windows format, start by converting to
63433  # unix format.
63434  path="$FREETYPE_LIB_PATH"
63435  new_path=`$CYGPATH -u "$path"`
63436
63437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63440  # "foo.exe" is OK but "foo" is an error.
63441  #
63442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63443  # It is also a way to make sure we got the proper file name for the real test later on.
63444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63445  if test "x$test_shortpath" = x; then
63446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63447$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63448    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63449  fi
63450
63451  # Call helper function which possibly converts this using DOS-style short mode.
63452  # If so, the updated path is stored in $new_path.
63453
63454  input_path="$new_path"
63455  # Check if we need to convert this using DOS-style short mode. If the path
63456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63457  # take no chances and rewrite it.
63458  # Note: m4 eats our [], so we need to use [ and ] instead.
63459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63460  if test "x$has_forbidden_chars" != x; then
63461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63465      # Going to short mode and back again did indeed matter. Since short mode is
63466      # case insensitive, let's make it lowercase to improve readability.
63467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63468      # Now convert it back to Unix-style (cygpath)
63469      input_path=`$CYGPATH -u "$shortmode_path"`
63470      new_path="$input_path"
63471    fi
63472  fi
63473
63474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63475  if test "x$test_cygdrive_prefix" = x; then
63476    # As a simple fix, exclude /usr/bin since it's not a real path.
63477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63479      # a path prefixed by /cygdrive for fixpath to work.
63480      new_path="$CYGWIN_ROOT_PATH$input_path"
63481    fi
63482  fi
63483
63484
63485  if test "x$path" != "x$new_path"; then
63486    FREETYPE_LIB_PATH="$new_path"
63487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63488$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63489  fi
63490
63491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63492
63493  path="$FREETYPE_LIB_PATH"
63494  has_colon=`$ECHO $path | $GREP ^.:`
63495  new_path="$path"
63496  if test "x$has_colon" = x; then
63497    # Not in mixed or Windows style, start by that.
63498    new_path=`cmd //c echo $path`
63499  fi
63500
63501
63502  input_path="$new_path"
63503  # Check if we need to convert this using DOS-style short mode. If the path
63504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63505  # take no chances and rewrite it.
63506  # Note: m4 eats our [], so we need to use [ and ] instead.
63507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63508  if test "x$has_forbidden_chars" != x; then
63509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63511  fi
63512
63513
63514  windows_path="$new_path"
63515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63516    unix_path=`$CYGPATH -u "$windows_path"`
63517    new_path="$unix_path"
63518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63520    new_path="$unix_path"
63521  fi
63522
63523  if test "x$path" != "x$new_path"; then
63524    FREETYPE_LIB_PATH="$new_path"
63525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63526$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63527  fi
63528
63529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63531
63532    else
63533      # We're on a unix platform. Hooray! :)
63534      path="$FREETYPE_LIB_PATH"
63535      has_space=`$ECHO "$path" | $GREP " "`
63536      if test "x$has_space" != x; then
63537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63538$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63540      fi
63541
63542      # Use eval to expand a potential ~
63543      eval path="$path"
63544      if test ! -f "$path" && test ! -d "$path"; then
63545        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63546      fi
63547
63548      if test -d "$path"; then
63549        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63550      else
63551        dir="`$DIRNAME "$path"`"
63552        base="`$BASENAME "$path"`"
63553        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63554      fi
63555    fi
63556  fi
63557
63558      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63559        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63560      else
63561        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63562      fi
63563    fi
63564
63565    # Try to compile it
63566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63567$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63568    ac_ext=cpp
63569ac_cpp='$CXXCPP $CPPFLAGS'
63570ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63571ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63572ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63573
63574    PREV_CXXCFLAGS="$CXXFLAGS"
63575    PREV_LIBS="$LIBS"
63576    PREV_CXX="$CXX"
63577    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63578    LIBS="$LIBS $FREETYPE_LIBS"
63579    CXX="$FIXPATH $CXX"
63580    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63581/* end confdefs.h.  */
63582
63583          #include<ft2build.h>
63584          #include FT_FREETYPE_H
63585          int main () {
63586            FT_Init_FreeType(NULL);
63587            return 0;
63588          }
63589
63590_ACEOF
63591if ac_fn_cxx_try_link "$LINENO"; then :
63592
63593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63594$as_echo "yes" >&6; }
63595
63596else
63597
63598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63599$as_echo "no" >&6; }
63600          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63601$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63602          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63603$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63604
63605
63606  # Print a helpful message on how to acquire the necessary build dependency.
63607  # freetype is the help tag: freetype, cups, alsa etc
63608  MISSING_DEPENDENCY=freetype
63609
63610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63611    cygwin_help $MISSING_DEPENDENCY
63612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63613    msys_help $MISSING_DEPENDENCY
63614  else
63615    PKGHANDLER_COMMAND=
63616
63617    case $PKGHANDLER in
63618      apt-get)
63619        apt_help     $MISSING_DEPENDENCY ;;
63620      yum)
63621        yum_help     $MISSING_DEPENDENCY ;;
63622      brew)
63623        brew_help    $MISSING_DEPENDENCY ;;
63624      port)
63625        port_help    $MISSING_DEPENDENCY ;;
63626      pkgutil)
63627        pkgutil_help $MISSING_DEPENDENCY ;;
63628      pkgadd)
63629        pkgadd_help  $MISSING_DEPENDENCY ;;
63630    esac
63631
63632    if test "x$PKGHANDLER_COMMAND" != x; then
63633      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63634    fi
63635  fi
63636
63637
63638          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63639
63640
63641fi
63642rm -f core conftest.err conftest.$ac_objext \
63643    conftest$ac_exeext conftest.$ac_ext
63644    CXXCFLAGS="$PREV_CXXFLAGS"
63645    LIBS="$PREV_LIBS"
63646    CXX="$PREV_CXX"
63647    ac_ext=cpp
63648ac_cpp='$CXXCPP $CPPFLAGS'
63649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63652
63653
63654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63655$as_echo_n "checking if we should bundle freetype... " >&6; }
63656    if test "x$BUNDLE_FREETYPE" = xyes; then
63657      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63658    fi
63659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63660$as_echo "$BUNDLE_FREETYPE" >&6; }
63661
63662  fi # end freetype needed
63663
63664  FREETYPE_LICENSE=""
63665  if test "x$with_freetype_license" = "xyes"; then
63666    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
63667  elif test "x$with_freetype_license" != "x"; then
63668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
63669$as_echo_n "checking for freetype license... " >&6; }
63670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
63671$as_echo "$with_freetype_license" >&6; }
63672    FREETYPE_LICENSE="$with_freetype_license"
63673
63674  # Only process if variable expands to non-empty
63675
63676  if test "x$FREETYPE_LICENSE" != x; then
63677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63678
63679  # Input might be given as Windows format, start by converting to
63680  # unix format.
63681  path="$FREETYPE_LICENSE"
63682  new_path=`$CYGPATH -u "$path"`
63683
63684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63687  # "foo.exe" is OK but "foo" is an error.
63688  #
63689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63690  # It is also a way to make sure we got the proper file name for the real test later on.
63691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63692  if test "x$test_shortpath" = x; then
63693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
63694$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
63695    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
63696  fi
63697
63698  # Call helper function which possibly converts this using DOS-style short mode.
63699  # If so, the updated path is stored in $new_path.
63700
63701  input_path="$new_path"
63702  # Check if we need to convert this using DOS-style short mode. If the path
63703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63704  # take no chances and rewrite it.
63705  # Note: m4 eats our [], so we need to use [ and ] instead.
63706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63707  if test "x$has_forbidden_chars" != x; then
63708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63712      # Going to short mode and back again did indeed matter. Since short mode is
63713      # case insensitive, let's make it lowercase to improve readability.
63714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63715      # Now convert it back to Unix-style (cygpath)
63716      input_path=`$CYGPATH -u "$shortmode_path"`
63717      new_path="$input_path"
63718    fi
63719  fi
63720
63721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63722  if test "x$test_cygdrive_prefix" = x; then
63723    # As a simple fix, exclude /usr/bin since it's not a real path.
63724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63726      # a path prefixed by /cygdrive for fixpath to work.
63727      new_path="$CYGWIN_ROOT_PATH$input_path"
63728    fi
63729  fi
63730
63731
63732  if test "x$path" != "x$new_path"; then
63733    FREETYPE_LICENSE="$new_path"
63734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
63735$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
63736  fi
63737
63738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63739
63740  path="$FREETYPE_LICENSE"
63741  has_colon=`$ECHO $path | $GREP ^.:`
63742  new_path="$path"
63743  if test "x$has_colon" = x; then
63744    # Not in mixed or Windows style, start by that.
63745    new_path=`cmd //c echo $path`
63746  fi
63747
63748
63749  input_path="$new_path"
63750  # Check if we need to convert this using DOS-style short mode. If the path
63751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63752  # take no chances and rewrite it.
63753  # Note: m4 eats our [], so we need to use [ and ] instead.
63754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63755  if test "x$has_forbidden_chars" != x; then
63756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63758  fi
63759
63760
63761  windows_path="$new_path"
63762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63763    unix_path=`$CYGPATH -u "$windows_path"`
63764    new_path="$unix_path"
63765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63767    new_path="$unix_path"
63768  fi
63769
63770  if test "x$path" != "x$new_path"; then
63771    FREETYPE_LICENSE="$new_path"
63772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
63773$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
63774  fi
63775
63776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63778
63779    else
63780      # We're on a unix platform. Hooray! :)
63781      path="$FREETYPE_LICENSE"
63782      has_space=`$ECHO "$path" | $GREP " "`
63783      if test "x$has_space" != x; then
63784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
63785$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
63786        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63787      fi
63788
63789      # Use eval to expand a potential ~
63790      eval path="$path"
63791      if test ! -f "$path" && test ! -d "$path"; then
63792        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
63793      fi
63794
63795      if test -d "$path"; then
63796        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
63797      else
63798        dir="`$DIRNAME "$path"`"
63799        base="`$BASENAME "$path"`"
63800        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
63801      fi
63802    fi
63803  fi
63804
63805    if test ! -f "$FREETYPE_LICENSE"; then
63806      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
63807    fi
63808  fi
63809
63810
63811
63812
63813
63814
63815
63816
63817# Check whether --with-alsa was given.
63818if test "${with_alsa+set}" = set; then :
63819  withval=$with_alsa;
63820fi
63821
63822
63823# Check whether --with-alsa-include was given.
63824if test "${with_alsa_include+set}" = set; then :
63825  withval=$with_alsa_include;
63826fi
63827
63828
63829# Check whether --with-alsa-lib was given.
63830if test "${with_alsa_lib+set}" = set; then :
63831  withval=$with_alsa_lib;
63832fi
63833
63834
63835  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63836    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63837        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63838        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63839      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63840$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63841    fi
63842    ALSA_CFLAGS=
63843    ALSA_LIBS=
63844  else
63845    ALSA_FOUND=no
63846
63847    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63848      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63849    fi
63850
63851    if test "x${with_alsa}" != x; then
63852      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63853      ALSA_CFLAGS="-I${with_alsa}/include"
63854      ALSA_FOUND=yes
63855    fi
63856    if test "x${with_alsa_include}" != x; then
63857      ALSA_CFLAGS="-I${with_alsa_include}"
63858      ALSA_FOUND=yes
63859    fi
63860    if test "x${with_alsa_lib}" != x; then
63861      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63862      ALSA_FOUND=yes
63863    fi
63864    # Do not try pkg-config if we have a sysroot set.
63865    if test "x$SYSROOT" = x; then
63866      if test "x$ALSA_FOUND" = xno; then
63867
63868pkg_failed=no
63869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63870$as_echo_n "checking for ALSA... " >&6; }
63871
63872if test -n "$ALSA_CFLAGS"; then
63873    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63874 elif test -n "$PKG_CONFIG"; then
63875    if test -n "$PKG_CONFIG" && \
63876    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63877  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63878  ac_status=$?
63879  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63880  test $ac_status = 0; }; then
63881  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63882else
63883  pkg_failed=yes
63884fi
63885 else
63886    pkg_failed=untried
63887fi
63888if test -n "$ALSA_LIBS"; then
63889    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63890 elif test -n "$PKG_CONFIG"; then
63891    if test -n "$PKG_CONFIG" && \
63892    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63893  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63894  ac_status=$?
63895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63896  test $ac_status = 0; }; then
63897  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63898else
63899  pkg_failed=yes
63900fi
63901 else
63902    pkg_failed=untried
63903fi
63904
63905
63906
63907if test $pkg_failed = yes; then
63908
63909if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63910        _pkg_short_errors_supported=yes
63911else
63912        _pkg_short_errors_supported=no
63913fi
63914        if test $_pkg_short_errors_supported = yes; then
63915	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63916        else
63917	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63918        fi
63919	# Put the nasty error message in config.log where it belongs
63920	echo "$ALSA_PKG_ERRORS" >&5
63921
63922	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63923$as_echo "no" >&6; }
63924                ALSA_FOUND=no
63925elif test $pkg_failed = untried; then
63926	ALSA_FOUND=no
63927else
63928	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63929	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63931$as_echo "yes" >&6; }
63932	ALSA_FOUND=yes
63933fi
63934      fi
63935    fi
63936    if test "x$ALSA_FOUND" = xno; then
63937      for ac_header in alsa/asoundlib.h
63938do :
63939  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63940if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63941  cat >>confdefs.h <<_ACEOF
63942#define HAVE_ALSA_ASOUNDLIB_H 1
63943_ACEOF
63944
63945            ALSA_FOUND=yes
63946            ALSA_CFLAGS=-Iignoreme
63947            ALSA_LIBS=-lasound
63948            DEFAULT_ALSA=yes
63949
63950else
63951  ALSA_FOUND=no
63952
63953fi
63954
63955done
63956
63957    fi
63958    if test "x$ALSA_FOUND" = xno; then
63959
63960  # Print a helpful message on how to acquire the necessary build dependency.
63961  # alsa is the help tag: freetype, cups, alsa etc
63962  MISSING_DEPENDENCY=alsa
63963
63964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63965    cygwin_help $MISSING_DEPENDENCY
63966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63967    msys_help $MISSING_DEPENDENCY
63968  else
63969    PKGHANDLER_COMMAND=
63970
63971    case $PKGHANDLER in
63972      apt-get)
63973        apt_help     $MISSING_DEPENDENCY ;;
63974      yum)
63975        yum_help     $MISSING_DEPENDENCY ;;
63976      brew)
63977        brew_help    $MISSING_DEPENDENCY ;;
63978      port)
63979        port_help    $MISSING_DEPENDENCY ;;
63980      pkgutil)
63981        pkgutil_help $MISSING_DEPENDENCY ;;
63982      pkgadd)
63983        pkgadd_help  $MISSING_DEPENDENCY ;;
63984    esac
63985
63986    if test "x$PKGHANDLER_COMMAND" != x; then
63987      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63988    fi
63989  fi
63990
63991      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63992    fi
63993  fi
63994
63995
63996
63997
63998
63999
64000# Check whether --with-libffi was given.
64001if test "${with_libffi+set}" = set; then :
64002  withval=$with_libffi;
64003fi
64004
64005
64006# Check whether --with-libffi-include was given.
64007if test "${with_libffi_include+set}" = set; then :
64008  withval=$with_libffi_include;
64009fi
64010
64011
64012# Check whether --with-libffi-lib was given.
64013if test "${with_libffi_lib+set}" = set; then :
64014  withval=$with_libffi_lib;
64015fi
64016
64017  # Check whether --enable-libffi-bundling was given.
64018if test "${enable_libffi_bundling+set}" = set; then :
64019  enableval=$enable_libffi_bundling;
64020fi
64021
64022
64023  if test "x$NEEDS_LIB_FFI" = xfalse; then
64024    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64025        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64026        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64027      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64028$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64029    fi
64030    LIBFFI_CFLAGS=
64031    LIBFFI_LIBS=
64032  else
64033    LIBFFI_FOUND=no
64034
64035    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64036      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64037    fi
64038
64039    if test "x${with_libffi}" != x; then
64040      LIBFFI_LIB_PATH="${with_libffi}/lib"
64041      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64042      LIBFFI_CFLAGS="-I${with_libffi}/include"
64043      LIBFFI_FOUND=yes
64044    fi
64045    if test "x${with_libffi_include}" != x; then
64046      LIBFFI_CFLAGS="-I${with_libffi_include}"
64047      LIBFFI_FOUND=yes
64048    fi
64049    if test "x${with_libffi_lib}" != x; then
64050      LIBFFI_LIB_PATH="${with_libffi_lib}"
64051      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64052      LIBFFI_FOUND=yes
64053    fi
64054    # Do not try pkg-config if we have a sysroot set.
64055    if test "x$SYSROOT" = x; then
64056      if test "x$LIBFFI_FOUND" = xno; then
64057        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64058
64059pkg_failed=no
64060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64061$as_echo_n "checking for LIBFFI... " >&6; }
64062
64063if test -n "$LIBFFI_CFLAGS"; then
64064    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64065 elif test -n "$PKG_CONFIG"; then
64066    if test -n "$PKG_CONFIG" && \
64067    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64068  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64069  ac_status=$?
64070  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64071  test $ac_status = 0; }; then
64072  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64073else
64074  pkg_failed=yes
64075fi
64076 else
64077    pkg_failed=untried
64078fi
64079if test -n "$LIBFFI_LIBS"; then
64080    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64081 elif test -n "$PKG_CONFIG"; then
64082    if test -n "$PKG_CONFIG" && \
64083    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64084  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64085  ac_status=$?
64086  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64087  test $ac_status = 0; }; then
64088  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64089else
64090  pkg_failed=yes
64091fi
64092 else
64093    pkg_failed=untried
64094fi
64095
64096
64097
64098if test $pkg_failed = yes; then
64099
64100if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64101        _pkg_short_errors_supported=yes
64102else
64103        _pkg_short_errors_supported=no
64104fi
64105        if test $_pkg_short_errors_supported = yes; then
64106	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64107        else
64108	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64109        fi
64110	# Put the nasty error message in config.log where it belongs
64111	echo "$LIBFFI_PKG_ERRORS" >&5
64112
64113	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64114$as_echo "no" >&6; }
64115                LIBFFI_FOUND=no
64116elif test $pkg_failed = untried; then
64117	LIBFFI_FOUND=no
64118else
64119	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64120	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64122$as_echo "yes" >&6; }
64123	LIBFFI_FOUND=yes
64124fi
64125      fi
64126    fi
64127    if test "x$LIBFFI_FOUND" = xno; then
64128      for ac_header in ffi.h
64129do :
64130  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64131if test "x$ac_cv_header_ffi_h" = xyes; then :
64132  cat >>confdefs.h <<_ACEOF
64133#define HAVE_FFI_H 1
64134_ACEOF
64135
64136            LIBFFI_FOUND=yes
64137            LIBFFI_CFLAGS=
64138            LIBFFI_LIBS=-lffi
64139
64140else
64141  LIBFFI_FOUND=no
64142
64143fi
64144
64145done
64146
64147    fi
64148    if test "x$LIBFFI_FOUND" = xno; then
64149
64150  # Print a helpful message on how to acquire the necessary build dependency.
64151  # ffi is the help tag: freetype, cups, alsa etc
64152  MISSING_DEPENDENCY=ffi
64153
64154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64155    cygwin_help $MISSING_DEPENDENCY
64156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64157    msys_help $MISSING_DEPENDENCY
64158  else
64159    PKGHANDLER_COMMAND=
64160
64161    case $PKGHANDLER in
64162      apt-get)
64163        apt_help     $MISSING_DEPENDENCY ;;
64164      yum)
64165        yum_help     $MISSING_DEPENDENCY ;;
64166      brew)
64167        brew_help    $MISSING_DEPENDENCY ;;
64168      port)
64169        port_help    $MISSING_DEPENDENCY ;;
64170      pkgutil)
64171        pkgutil_help $MISSING_DEPENDENCY ;;
64172      pkgadd)
64173        pkgadd_help  $MISSING_DEPENDENCY ;;
64174    esac
64175
64176    if test "x$PKGHANDLER_COMMAND" != x; then
64177      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64178    fi
64179  fi
64180
64181      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64182    fi
64183
64184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64185$as_echo_n "checking if libffi works... " >&6; }
64186    ac_ext=c
64187ac_cpp='$CPP $CPPFLAGS'
64188ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64189ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64190ac_compiler_gnu=$ac_cv_c_compiler_gnu
64191
64192    OLD_CFLAGS="$CFLAGS"
64193    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64194    OLD_LIBS="$LIBS"
64195    LIBS="$LIBS $LIBFFI_LIBS"
64196    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64197/* end confdefs.h.  */
64198#include <ffi.h>
64199int
64200main ()
64201{
64202
64203          ffi_call(NULL, NULL, NULL, NULL);
64204          return 0;
64205
64206  ;
64207  return 0;
64208}
64209_ACEOF
64210if ac_fn_c_try_link "$LINENO"; then :
64211  LIBFFI_WORKS=yes
64212else
64213  LIBFFI_WORKS=no
64214
64215fi
64216rm -f core conftest.err conftest.$ac_objext \
64217    conftest$ac_exeext conftest.$ac_ext
64218    CFLAGS="$OLD_CFLAGS"
64219    LIBS="$OLD_LIBS"
64220    ac_ext=cpp
64221ac_cpp='$CXXCPP $CPPFLAGS'
64222ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64223ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64224ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64225
64226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64227$as_echo "$LIBFFI_WORKS" >&6; }
64228
64229    if test "x$LIBFFI_WORKS" = xno; then
64230
64231  # Print a helpful message on how to acquire the necessary build dependency.
64232  # ffi is the help tag: freetype, cups, alsa etc
64233  MISSING_DEPENDENCY=ffi
64234
64235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64236    cygwin_help $MISSING_DEPENDENCY
64237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64238    msys_help $MISSING_DEPENDENCY
64239  else
64240    PKGHANDLER_COMMAND=
64241
64242    case $PKGHANDLER in
64243      apt-get)
64244        apt_help     $MISSING_DEPENDENCY ;;
64245      yum)
64246        yum_help     $MISSING_DEPENDENCY ;;
64247      brew)
64248        brew_help    $MISSING_DEPENDENCY ;;
64249      port)
64250        port_help    $MISSING_DEPENDENCY ;;
64251      pkgutil)
64252        pkgutil_help $MISSING_DEPENDENCY ;;
64253      pkgadd)
64254        pkgadd_help  $MISSING_DEPENDENCY ;;
64255    esac
64256
64257    if test "x$PKGHANDLER_COMMAND" != x; then
64258      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64259    fi
64260  fi
64261
64262      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64263    fi
64264
64265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64266$as_echo_n "checking if libffi should be bundled... " >&6; }
64267    if test "x$enable_libffi_bundling" = "x"; then
64268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64269$as_echo "no" >&6; }
64270      ENABLE_LIBFFI_BUNDLING=false
64271    elif  test "x$enable_libffi_bundling" = "xno"; then
64272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64273$as_echo "no, forced" >&6; }
64274      ENABLE_LIBFFI_BUNDLING=false
64275    elif  test "x$enable_libffi_bundling" = "xyes"; then
64276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64277$as_echo "yes, forced" >&6; }
64278      ENABLE_LIBFFI_BUNDLING=true
64279    else
64280      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64281    fi
64282
64283    # Find the libffi.so.X to bundle
64284    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64286$as_echo_n "checking for libffi lib file location... " >&6; }
64287      if test "x${LIBFFI_LIB_PATH}" != x; then
64288        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64289          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64290        else
64291          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64292        fi
64293      else
64294        # If we don't have an explicit path, look in a few obvious places
64295        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64296          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64297            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64298          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64299            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64300          else
64301            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64302          fi
64303        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64304          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64305            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64306          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64307            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64308          else
64309            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64310          fi
64311        else
64312          # Fallback on the default /usr/lib dir
64313          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64314            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64315          else
64316            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64317          fi
64318        fi
64319      fi
64320      # Make sure the wildcard is evaluated
64321      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64323$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64324    fi
64325  fi
64326
64327
64328
64329
64330
64331
64332
64333  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64334    # Extract the first word of "llvm-config", so it can be a program name with args.
64335set dummy llvm-config; ac_word=$2
64336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64337$as_echo_n "checking for $ac_word... " >&6; }
64338if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64339  $as_echo_n "(cached) " >&6
64340else
64341  if test -n "$LLVM_CONFIG"; then
64342  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64343else
64344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64345for as_dir in $PATH
64346do
64347  IFS=$as_save_IFS
64348  test -z "$as_dir" && as_dir=.
64349    for ac_exec_ext in '' $ac_executable_extensions; do
64350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64351    ac_cv_prog_LLVM_CONFIG="llvm-config"
64352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64353    break 2
64354  fi
64355done
64356  done
64357IFS=$as_save_IFS
64358
64359fi
64360fi
64361LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64362if test -n "$LLVM_CONFIG"; then
64363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64364$as_echo "$LLVM_CONFIG" >&6; }
64365else
64366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64367$as_echo "no" >&6; }
64368fi
64369
64370
64371
64372    if test "x$LLVM_CONFIG" != xllvm-config; then
64373      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64374    fi
64375
64376    llvm_components="jit mcjit engine nativecodegen native"
64377    unset LLVM_CFLAGS
64378    for flag in $("$LLVM_CONFIG" --cxxflags); do
64379      if echo "${flag}" | grep -q '^-[ID]'; then
64380        if test "${flag}" != "-D_DEBUG" ; then
64381          if test "${LLVM_CFLAGS}" != "" ; then
64382            LLVM_CFLAGS="${LLVM_CFLAGS} "
64383          fi
64384          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64385        fi
64386      fi
64387    done
64388    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64389    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64390
64391    unset LLVM_LDFLAGS
64392    for flag in $("${LLVM_CONFIG}" --ldflags); do
64393      if echo "${flag}" | grep -q '^-L'; then
64394        if test "${LLVM_LDFLAGS}" != ""; then
64395          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64396        fi
64397        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64398      fi
64399    done
64400
64401    unset LLVM_LIBS
64402    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64403      if echo "${flag}" | grep -q '^-l'; then
64404        if test "${LLVM_LIBS}" != ""; then
64405          LLVM_LIBS="${LLVM_LIBS} "
64406        fi
64407        LLVM_LIBS="${LLVM_LIBS}${flag}"
64408      fi
64409    done
64410
64411    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64412    # always properly detect -ltinfo
64413    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64414
64415
64416
64417
64418  fi
64419
64420
64421
64422# Check whether --with-libjpeg was given.
64423if test "${with_libjpeg+set}" = set; then :
64424  withval=$with_libjpeg;
64425fi
64426
64427
64428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64429$as_echo_n "checking for which libjpeg to use... " >&6; }
64430  # default is bundled
64431  DEFAULT_LIBJPEG=bundled
64432  # if user didn't specify, use DEFAULT_LIBJPEG
64433  if test "x${with_libjpeg}" = "x"; then
64434    with_libjpeg=${DEFAULT_LIBJPEG}
64435  fi
64436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64437$as_echo "${with_libjpeg}" >&6; }
64438
64439  if test "x${with_libjpeg}" = "xbundled"; then
64440    USE_EXTERNAL_LIBJPEG=false
64441  elif test "x${with_libjpeg}" = "xsystem"; then
64442    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64443if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64444
64445else
64446   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64447fi
64448
64449
64450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64451$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64452if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64453  $as_echo_n "(cached) " >&6
64454else
64455  ac_check_lib_save_LIBS=$LIBS
64456LIBS="-ljpeg  $LIBS"
64457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64458/* end confdefs.h.  */
64459
64460/* Override any GCC internal prototype to avoid an error.
64461   Use char because int might match the return type of a GCC
64462   builtin and then its argument prototype would still apply.  */
64463#ifdef __cplusplus
64464extern "C"
64465#endif
64466char jpeg_CreateDecompress ();
64467int
64468main ()
64469{
64470return jpeg_CreateDecompress ();
64471  ;
64472  return 0;
64473}
64474_ACEOF
64475if ac_fn_cxx_try_link "$LINENO"; then :
64476  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64477else
64478  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64479fi
64480rm -f core conftest.err conftest.$ac_objext \
64481    conftest$ac_exeext conftest.$ac_ext
64482LIBS=$ac_check_lib_save_LIBS
64483fi
64484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64485$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64486if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64487  cat >>confdefs.h <<_ACEOF
64488#define HAVE_LIBJPEG 1
64489_ACEOF
64490
64491  LIBS="-ljpeg $LIBS"
64492
64493else
64494   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64495fi
64496
64497
64498    USE_EXTERNAL_LIBJPEG=true
64499  else
64500    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64501  fi
64502
64503
64504
64505
64506
64507# Check whether --with-giflib was given.
64508if test "${with_giflib+set}" = set; then :
64509  withval=$with_giflib;
64510fi
64511
64512
64513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64514$as_echo_n "checking for which giflib to use... " >&6; }
64515  # default is bundled
64516  DEFAULT_GIFLIB=bundled
64517  # if user didn't specify, use DEFAULT_GIFLIB
64518  if test "x${with_giflib}" = "x"; then
64519    with_giflib=${DEFAULT_GIFLIB}
64520  fi
64521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64522$as_echo "${with_giflib}" >&6; }
64523
64524  if test "x${with_giflib}" = "xbundled"; then
64525    USE_EXTERNAL_LIBGIF=false
64526  elif test "x${with_giflib}" = "xsystem"; then
64527    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64528if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64529
64530else
64531   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64532fi
64533
64534
64535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64536$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64537if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64538  $as_echo_n "(cached) " >&6
64539else
64540  ac_check_lib_save_LIBS=$LIBS
64541LIBS="-lgif  $LIBS"
64542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64543/* end confdefs.h.  */
64544
64545/* Override any GCC internal prototype to avoid an error.
64546   Use char because int might match the return type of a GCC
64547   builtin and then its argument prototype would still apply.  */
64548#ifdef __cplusplus
64549extern "C"
64550#endif
64551char DGifGetCode ();
64552int
64553main ()
64554{
64555return DGifGetCode ();
64556  ;
64557  return 0;
64558}
64559_ACEOF
64560if ac_fn_cxx_try_link "$LINENO"; then :
64561  ac_cv_lib_gif_DGifGetCode=yes
64562else
64563  ac_cv_lib_gif_DGifGetCode=no
64564fi
64565rm -f core conftest.err conftest.$ac_objext \
64566    conftest$ac_exeext conftest.$ac_ext
64567LIBS=$ac_check_lib_save_LIBS
64568fi
64569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64570$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64571if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64572  cat >>confdefs.h <<_ACEOF
64573#define HAVE_LIBGIF 1
64574_ACEOF
64575
64576  LIBS="-lgif $LIBS"
64577
64578else
64579   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64580fi
64581
64582
64583    USE_EXTERNAL_LIBGIF=true
64584  else
64585    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64586  fi
64587
64588
64589
64590
64591
64592# Check whether --with-libpng was given.
64593if test "${with_libpng+set}" = set; then :
64594  withval=$with_libpng;
64595fi
64596
64597
64598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64599$as_echo_n "checking for which libpng to use... " >&6; }
64600
64601  # default is bundled
64602  DEFAULT_LIBPNG=bundled
64603  # if user didn't specify, use DEFAULT_LIBPNG
64604  if test "x${with_libpng}" = "x"; then
64605    with_libpng=${DEFAULT_LIBPNG}
64606  fi
64607
64608  if test "x${with_libpng}" = "xbundled"; then
64609    USE_EXTERNAL_LIBPNG=false
64610    PNG_CFLAGS=""
64611    PNG_LIBS=""
64612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64613$as_echo "bundled" >&6; }
64614  elif test "x${with_libpng}" = "xsystem"; then
64615
64616pkg_failed=no
64617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64618$as_echo_n "checking for PNG... " >&6; }
64619
64620if test -n "$PNG_CFLAGS"; then
64621    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64622 elif test -n "$PKG_CONFIG"; then
64623    if test -n "$PKG_CONFIG" && \
64624    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64625  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64626  ac_status=$?
64627  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64628  test $ac_status = 0; }; then
64629  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64630else
64631  pkg_failed=yes
64632fi
64633 else
64634    pkg_failed=untried
64635fi
64636if test -n "$PNG_LIBS"; then
64637    pkg_cv_PNG_LIBS="$PNG_LIBS"
64638 elif test -n "$PKG_CONFIG"; then
64639    if test -n "$PKG_CONFIG" && \
64640    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64641  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64642  ac_status=$?
64643  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64644  test $ac_status = 0; }; then
64645  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64646else
64647  pkg_failed=yes
64648fi
64649 else
64650    pkg_failed=untried
64651fi
64652
64653
64654
64655if test $pkg_failed = yes; then
64656
64657if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64658        _pkg_short_errors_supported=yes
64659else
64660        _pkg_short_errors_supported=no
64661fi
64662        if test $_pkg_short_errors_supported = yes; then
64663	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64664        else
64665	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64666        fi
64667	# Put the nasty error message in config.log where it belongs
64668	echo "$PNG_PKG_ERRORS" >&5
64669
64670	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64671$as_echo "no" >&6; }
64672                LIBPNG_FOUND=no
64673elif test $pkg_failed = untried; then
64674	LIBPNG_FOUND=no
64675else
64676	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64677	PNG_LIBS=$pkg_cv_PNG_LIBS
64678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64679$as_echo "yes" >&6; }
64680	LIBPNG_FOUND=yes
64681fi
64682    if test "x${LIBPNG_FOUND}" = "xyes"; then
64683      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64684      USE_EXTERNAL_LIBPNG=true
64685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64686$as_echo "system" >&6; }
64687    else
64688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64689$as_echo "system not found" >&6; }
64690      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64691    fi
64692  else
64693    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64694  fi
64695
64696
64697
64698
64699
64700
64701
64702# Check whether --with-zlib was given.
64703if test "${with_zlib+set}" = set; then :
64704  withval=$with_zlib;
64705fi
64706
64707
64708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64709$as_echo_n "checking for compress in -lz... " >&6; }
64710if ${ac_cv_lib_z_compress+:} false; then :
64711  $as_echo_n "(cached) " >&6
64712else
64713  ac_check_lib_save_LIBS=$LIBS
64714LIBS="-lz  $LIBS"
64715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64716/* end confdefs.h.  */
64717
64718/* Override any GCC internal prototype to avoid an error.
64719   Use char because int might match the return type of a GCC
64720   builtin and then its argument prototype would still apply.  */
64721#ifdef __cplusplus
64722extern "C"
64723#endif
64724char compress ();
64725int
64726main ()
64727{
64728return compress ();
64729  ;
64730  return 0;
64731}
64732_ACEOF
64733if ac_fn_cxx_try_link "$LINENO"; then :
64734  ac_cv_lib_z_compress=yes
64735else
64736  ac_cv_lib_z_compress=no
64737fi
64738rm -f core conftest.err conftest.$ac_objext \
64739    conftest$ac_exeext conftest.$ac_ext
64740LIBS=$ac_check_lib_save_LIBS
64741fi
64742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64743$as_echo "$ac_cv_lib_z_compress" >&6; }
64744if test "x$ac_cv_lib_z_compress" = xyes; then :
64745   ZLIB_FOUND=yes
64746else
64747   ZLIB_FOUND=no
64748fi
64749
64750
64751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64752$as_echo_n "checking for which zlib to use... " >&6; }
64753
64754  DEFAULT_ZLIB=system
64755  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64756    # On windows default is bundled...on others default is system
64757    DEFAULT_ZLIB=bundled
64758  fi
64759
64760  if test "x${ZLIB_FOUND}" != "xyes"; then
64761    # If we don't find any system...set default to bundled
64762    DEFAULT_ZLIB=bundled
64763  fi
64764
64765  # If user didn't specify, use DEFAULT_ZLIB
64766  if test "x${with_zlib}" = "x"; then
64767    with_zlib=${DEFAULT_ZLIB}
64768  fi
64769
64770  if test "x${with_zlib}" = "xbundled"; then
64771    USE_EXTERNAL_LIBZ=false
64772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64773$as_echo "bundled" >&6; }
64774  elif test "x${with_zlib}" = "xsystem"; then
64775    if test "x${ZLIB_FOUND}" = "xyes"; then
64776      USE_EXTERNAL_LIBZ=true
64777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64778$as_echo "system" >&6; }
64779    else
64780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64781$as_echo "system not found" >&6; }
64782      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64783    fi
64784  else
64785    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64786  fi
64787
64788
64789
64790
64791
64792# Check whether --with-lcms was given.
64793if test "${with_lcms+set}" = set; then :
64794  withval=$with_lcms;
64795fi
64796
64797
64798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64799$as_echo_n "checking for which lcms to use... " >&6; }
64800
64801  DEFAULT_LCMS=bundled
64802  # If user didn't specify, use DEFAULT_LCMS
64803  if test "x${with_lcms}" = "x"; then
64804    with_lcms=${DEFAULT_LCMS}
64805  fi
64806
64807  if test "x${with_lcms}" = "xbundled"; then
64808    USE_EXTERNAL_LCMS=false
64809    LCMS_CFLAGS=""
64810    LCMS_LIBS=""
64811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64812$as_echo "bundled" >&6; }
64813  elif test "x${with_lcms}" = "xsystem"; then
64814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64815$as_echo "system" >&6; }
64816
64817pkg_failed=no
64818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64819$as_echo_n "checking for LCMS... " >&6; }
64820
64821if test -n "$LCMS_CFLAGS"; then
64822    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64823 elif test -n "$PKG_CONFIG"; then
64824    if test -n "$PKG_CONFIG" && \
64825    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64826  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64827  ac_status=$?
64828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64829  test $ac_status = 0; }; then
64830  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64831else
64832  pkg_failed=yes
64833fi
64834 else
64835    pkg_failed=untried
64836fi
64837if test -n "$LCMS_LIBS"; then
64838    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64839 elif test -n "$PKG_CONFIG"; then
64840    if test -n "$PKG_CONFIG" && \
64841    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64842  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64843  ac_status=$?
64844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64845  test $ac_status = 0; }; then
64846  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64847else
64848  pkg_failed=yes
64849fi
64850 else
64851    pkg_failed=untried
64852fi
64853
64854
64855
64856if test $pkg_failed = yes; then
64857
64858if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64859        _pkg_short_errors_supported=yes
64860else
64861        _pkg_short_errors_supported=no
64862fi
64863        if test $_pkg_short_errors_supported = yes; then
64864	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64865        else
64866	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64867        fi
64868	# Put the nasty error message in config.log where it belongs
64869	echo "$LCMS_PKG_ERRORS" >&5
64870
64871	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64872$as_echo "no" >&6; }
64873                LCMS_FOUND=no
64874elif test $pkg_failed = untried; then
64875	LCMS_FOUND=no
64876else
64877	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64878	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64880$as_echo "yes" >&6; }
64881	LCMS_FOUND=yes
64882fi
64883    if test "x${LCMS_FOUND}" = "xyes"; then
64884      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64885      USE_EXTERNAL_LCMS=true
64886    else
64887      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64888    fi
64889  else
64890    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64891  fi
64892
64893
64894
64895
64896
64897
64898
64899
64900
64901
64902
64903
64904
64905  # Setup libm (the maths library)
64906  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64908$as_echo_n "checking for cos in -lm... " >&6; }
64909if ${ac_cv_lib_m_cos+:} false; then :
64910  $as_echo_n "(cached) " >&6
64911else
64912  ac_check_lib_save_LIBS=$LIBS
64913LIBS="-lm  $LIBS"
64914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64915/* end confdefs.h.  */
64916
64917/* Override any GCC internal prototype to avoid an error.
64918   Use char because int might match the return type of a GCC
64919   builtin and then its argument prototype would still apply.  */
64920#ifdef __cplusplus
64921extern "C"
64922#endif
64923char cos ();
64924int
64925main ()
64926{
64927return cos ();
64928  ;
64929  return 0;
64930}
64931_ACEOF
64932if ac_fn_cxx_try_link "$LINENO"; then :
64933  ac_cv_lib_m_cos=yes
64934else
64935  ac_cv_lib_m_cos=no
64936fi
64937rm -f core conftest.err conftest.$ac_objext \
64938    conftest$ac_exeext conftest.$ac_ext
64939LIBS=$ac_check_lib_save_LIBS
64940fi
64941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64942$as_echo "$ac_cv_lib_m_cos" >&6; }
64943if test "x$ac_cv_lib_m_cos" = xyes; then :
64944  cat >>confdefs.h <<_ACEOF
64945#define HAVE_LIBM 1
64946_ACEOF
64947
64948  LIBS="-lm $LIBS"
64949
64950else
64951
64952        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64953$as_echo "$as_me: Maths library was not found" >&6;}
64954
64955fi
64956
64957    LIBM="-lm"
64958  else
64959    LIBM=""
64960  fi
64961
64962
64963  # Setup libdl (for dynamic library loading)
64964  save_LIBS="$LIBS"
64965  LIBS=""
64966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64967$as_echo_n "checking for dlopen in -ldl... " >&6; }
64968if ${ac_cv_lib_dl_dlopen+:} false; then :
64969  $as_echo_n "(cached) " >&6
64970else
64971  ac_check_lib_save_LIBS=$LIBS
64972LIBS="-ldl  $LIBS"
64973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64974/* end confdefs.h.  */
64975
64976/* Override any GCC internal prototype to avoid an error.
64977   Use char because int might match the return type of a GCC
64978   builtin and then its argument prototype would still apply.  */
64979#ifdef __cplusplus
64980extern "C"
64981#endif
64982char dlopen ();
64983int
64984main ()
64985{
64986return dlopen ();
64987  ;
64988  return 0;
64989}
64990_ACEOF
64991if ac_fn_cxx_try_link "$LINENO"; then :
64992  ac_cv_lib_dl_dlopen=yes
64993else
64994  ac_cv_lib_dl_dlopen=no
64995fi
64996rm -f core conftest.err conftest.$ac_objext \
64997    conftest$ac_exeext conftest.$ac_ext
64998LIBS=$ac_check_lib_save_LIBS
64999fi
65000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65001$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65002if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65003  cat >>confdefs.h <<_ACEOF
65004#define HAVE_LIBDL 1
65005_ACEOF
65006
65007  LIBS="-ldl $LIBS"
65008
65009fi
65010
65011  LIBDL="$LIBS"
65012
65013  LIBS="$save_LIBS"
65014
65015  # Deprecated libraries, keep the flags for backwards compatibility
65016  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65017
65018
65019# Check whether --with-dxsdk was given.
65020if test "${with_dxsdk+set}" = set; then :
65021  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65022$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65023fi
65024
65025
65026
65027
65028# Check whether --with-dxsdk-lib was given.
65029if test "${with_dxsdk_lib+set}" = set; then :
65030  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65031$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65032fi
65033
65034
65035
65036
65037# Check whether --with-dxsdk-include was given.
65038if test "${with_dxsdk_include+set}" = set; then :
65039  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65040$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65041fi
65042
65043
65044  fi
65045
65046  # Control if libzip can use mmap. Available for purposes of overriding.
65047  LIBZIP_CAN_USE_MMAP=true
65048
65049
65050
65051  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65052    # Find the root of the Solaris Studio installation from the compiler path
65053    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65054    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65056$as_echo_n "checking for libstlport.so.1... " >&6; }
65057    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65058      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65059      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65060    fi
65061    if test -f "$STLPORT_LIB"; then
65062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65063$as_echo "yes, $STLPORT_LIB" >&6; }
65064
65065  # Only process if variable expands to non-empty
65066
65067  if test "x$STLPORT_LIB" != x; then
65068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65069
65070  # Input might be given as Windows format, start by converting to
65071  # unix format.
65072  path="$STLPORT_LIB"
65073  new_path=`$CYGPATH -u "$path"`
65074
65075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65078  # "foo.exe" is OK but "foo" is an error.
65079  #
65080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65081  # It is also a way to make sure we got the proper file name for the real test later on.
65082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65083  if test "x$test_shortpath" = x; then
65084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65085$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65086    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65087  fi
65088
65089  # Call helper function which possibly converts this using DOS-style short mode.
65090  # If so, the updated path is stored in $new_path.
65091
65092  input_path="$new_path"
65093  # Check if we need to convert this using DOS-style short mode. If the path
65094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65095  # take no chances and rewrite it.
65096  # Note: m4 eats our [], so we need to use [ and ] instead.
65097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65098  if test "x$has_forbidden_chars" != x; then
65099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65103      # Going to short mode and back again did indeed matter. Since short mode is
65104      # case insensitive, let's make it lowercase to improve readability.
65105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65106      # Now convert it back to Unix-style (cygpath)
65107      input_path=`$CYGPATH -u "$shortmode_path"`
65108      new_path="$input_path"
65109    fi
65110  fi
65111
65112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65113  if test "x$test_cygdrive_prefix" = x; then
65114    # As a simple fix, exclude /usr/bin since it's not a real path.
65115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65117      # a path prefixed by /cygdrive for fixpath to work.
65118      new_path="$CYGWIN_ROOT_PATH$input_path"
65119    fi
65120  fi
65121
65122
65123  if test "x$path" != "x$new_path"; then
65124    STLPORT_LIB="$new_path"
65125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65126$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65127  fi
65128
65129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65130
65131  path="$STLPORT_LIB"
65132  has_colon=`$ECHO $path | $GREP ^.:`
65133  new_path="$path"
65134  if test "x$has_colon" = x; then
65135    # Not in mixed or Windows style, start by that.
65136    new_path=`cmd //c echo $path`
65137  fi
65138
65139
65140  input_path="$new_path"
65141  # Check if we need to convert this using DOS-style short mode. If the path
65142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65143  # take no chances and rewrite it.
65144  # Note: m4 eats our [], so we need to use [ and ] instead.
65145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65146  if test "x$has_forbidden_chars" != x; then
65147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65149  fi
65150
65151
65152  windows_path="$new_path"
65153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65154    unix_path=`$CYGPATH -u "$windows_path"`
65155    new_path="$unix_path"
65156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65158    new_path="$unix_path"
65159  fi
65160
65161  if test "x$path" != "x$new_path"; then
65162    STLPORT_LIB="$new_path"
65163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65164$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65165  fi
65166
65167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65169
65170    else
65171      # We're on a unix platform. Hooray! :)
65172      path="$STLPORT_LIB"
65173      has_space=`$ECHO "$path" | $GREP " "`
65174      if test "x$has_space" != x; then
65175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65176$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65178      fi
65179
65180      # Use eval to expand a potential ~
65181      eval path="$path"
65182      if test ! -f "$path" && test ! -d "$path"; then
65183        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65184      fi
65185
65186      if test -d "$path"; then
65187        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65188      else
65189        dir="`$DIRNAME "$path"`"
65190        base="`$BASENAME "$path"`"
65191        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65192      fi
65193    fi
65194  fi
65195
65196    else
65197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65198$as_echo "no, not found at $STLPORT_LIB" >&6; }
65199      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65200    fi
65201
65202  fi
65203
65204
65205
65206# Check whether --with-libelf was given.
65207if test "${with_libelf+set}" = set; then :
65208  withval=$with_libelf;
65209fi
65210
65211
65212# Check whether --with-libelf-include was given.
65213if test "${with_libelf_include+set}" = set; then :
65214  withval=$with_libelf_include;
65215fi
65216
65217
65218# Check whether --with-libelf-lib was given.
65219if test "${with_libelf_lib+set}" = set; then :
65220  withval=$with_libelf_lib;
65221fi
65222
65223
65224  if test "x$ENABLE_AOT" = xfalse; then
65225    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
65226        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
65227        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
65228      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
65229$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
65230    fi
65231    LIBELF_CFLAGS=
65232    LIBELF_LIBS=
65233  else
65234    LIBELF_FOUND=no
65235
65236    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
65237      ENABLE_AOT="false"
65238      if test "x${enable_aot}" = xyes; then
65239        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
65240      fi
65241    else
65242      if test "x${with_libelf}" != x; then
65243        ELF_LIBS="-L${with_libelf}/lib -lelf"
65244        ELF_CFLAGS="-I${with_libelf}/include"
65245        LIBELF_FOUND=yes
65246      fi
65247      if test "x${with_libelf_include}" != x; then
65248        ELF_CFLAGS="-I${with_libelf_include}"
65249        LIBELF_FOUND=yes
65250      fi
65251      if test "x${with_libelf_lib}" != x; then
65252        ELF_LIBS="-L${with_libelf_lib} -lelf"
65253        LIBELF_FOUND=yes
65254      fi
65255      # Do not try pkg-config if we have a sysroot set.
65256      if test "x$SYSROOT" = x; then
65257        if test "x$LIBELF_FOUND" = xno; then
65258          # Figure out ELF_CFLAGS and ELF_LIBS
65259
65260pkg_failed=no
65261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
65262$as_echo_n "checking for ELF... " >&6; }
65263
65264if test -n "$ELF_CFLAGS"; then
65265    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
65266 elif test -n "$PKG_CONFIG"; then
65267    if test -n "$PKG_CONFIG" && \
65268    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
65269  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
65270  ac_status=$?
65271  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65272  test $ac_status = 0; }; then
65273  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
65274else
65275  pkg_failed=yes
65276fi
65277 else
65278    pkg_failed=untried
65279fi
65280if test -n "$ELF_LIBS"; then
65281    pkg_cv_ELF_LIBS="$ELF_LIBS"
65282 elif test -n "$PKG_CONFIG"; then
65283    if test -n "$PKG_CONFIG" && \
65284    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
65285  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
65286  ac_status=$?
65287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65288  test $ac_status = 0; }; then
65289  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
65290else
65291  pkg_failed=yes
65292fi
65293 else
65294    pkg_failed=untried
65295fi
65296
65297
65298
65299if test $pkg_failed = yes; then
65300
65301if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65302        _pkg_short_errors_supported=yes
65303else
65304        _pkg_short_errors_supported=no
65305fi
65306        if test $_pkg_short_errors_supported = yes; then
65307	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
65308        else
65309	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
65310        fi
65311	# Put the nasty error message in config.log where it belongs
65312	echo "$ELF_PKG_ERRORS" >&5
65313
65314	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65315$as_echo "no" >&6; }
65316                LIBELF_FOUND=no
65317elif test $pkg_failed = untried; then
65318	LIBELF_FOUND=no
65319else
65320	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
65321	ELF_LIBS=$pkg_cv_ELF_LIBS
65322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65323$as_echo "yes" >&6; }
65324	LIBELF_FOUND=yes
65325fi
65326        fi
65327      fi
65328      if test "x$LIBELF_FOUND" = xno; then
65329        for ac_header in libelf.h
65330do :
65331  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
65332if test "x$ac_cv_header_libelf_h" = xyes; then :
65333  cat >>confdefs.h <<_ACEOF
65334#define HAVE_LIBELF_H 1
65335_ACEOF
65336
65337              LIBELF_FOUND=yes
65338              ELF_CFLAGS=
65339              ELF_LIBS=-lelf
65340
65341else
65342  LIBELF_FOUND=no
65343
65344fi
65345
65346done
65347
65348      fi
65349      if test "x$LIBELF_FOUND" = xno; then
65350        ENABLE_AOT="false"
65351
65352  # Print a helpful message on how to acquire the necessary build dependency.
65353  # elf is the help tag: freetype, cups, alsa etc
65354  MISSING_DEPENDENCY=elf
65355
65356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65357    cygwin_help $MISSING_DEPENDENCY
65358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65359    msys_help $MISSING_DEPENDENCY
65360  else
65361    PKGHANDLER_COMMAND=
65362
65363    case $PKGHANDLER in
65364      apt-get)
65365        apt_help     $MISSING_DEPENDENCY ;;
65366      yum)
65367        yum_help     $MISSING_DEPENDENCY ;;
65368      brew)
65369        brew_help    $MISSING_DEPENDENCY ;;
65370      port)
65371        port_help    $MISSING_DEPENDENCY ;;
65372      pkgutil)
65373        pkgutil_help $MISSING_DEPENDENCY ;;
65374      pkgadd)
65375        pkgadd_help  $MISSING_DEPENDENCY ;;
65376    esac
65377
65378    if test "x$PKGHANDLER_COMMAND" != x; then
65379      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65380    fi
65381  fi
65382
65383        if test "x${enable_aot}" = xyes; then
65384          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65385        else
65386          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
65387$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
65388        fi
65389      else
65390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
65391$as_echo_n "checking if libelf works... " >&6; }
65392        ac_ext=c
65393ac_cpp='$CPP $CPPFLAGS'
65394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65396ac_compiler_gnu=$ac_cv_c_compiler_gnu
65397
65398        OLD_CFLAGS="$CFLAGS"
65399        CFLAGS="$CFLAGS $ELF_CFLAGS"
65400        OLD_LIBS="$LIBS"
65401        LIBS="$LIBS $ELF_LIBS"
65402        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65403/* end confdefs.h.  */
65404#include <libelf.h>
65405int
65406main ()
65407{
65408
65409              elf_version(0);
65410              return 0;
65411
65412  ;
65413  return 0;
65414}
65415_ACEOF
65416if ac_fn_c_try_link "$LINENO"; then :
65417  LIBELF_WORKS=yes
65418else
65419  LIBELF_WORKS=no
65420
65421fi
65422rm -f core conftest.err conftest.$ac_objext \
65423    conftest$ac_exeext conftest.$ac_ext
65424        CFLAGS="$OLD_CFLAGS"
65425        LIBS="$OLD_LIBS"
65426        ac_ext=cpp
65427ac_cpp='$CXXCPP $CPPFLAGS'
65428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65431
65432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
65433$as_echo "$LIBELF_WORKS" >&6; }
65434
65435        if test "x$LIBELF_WORKS" = xno; then
65436          ENABLE_AOT="false"
65437
65438  # Print a helpful message on how to acquire the necessary build dependency.
65439  # elf is the help tag: freetype, cups, alsa etc
65440  MISSING_DEPENDENCY=elf
65441
65442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65443    cygwin_help $MISSING_DEPENDENCY
65444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65445    msys_help $MISSING_DEPENDENCY
65446  else
65447    PKGHANDLER_COMMAND=
65448
65449    case $PKGHANDLER in
65450      apt-get)
65451        apt_help     $MISSING_DEPENDENCY ;;
65452      yum)
65453        yum_help     $MISSING_DEPENDENCY ;;
65454      brew)
65455        brew_help    $MISSING_DEPENDENCY ;;
65456      port)
65457        port_help    $MISSING_DEPENDENCY ;;
65458      pkgutil)
65459        pkgutil_help $MISSING_DEPENDENCY ;;
65460      pkgadd)
65461        pkgadd_help  $MISSING_DEPENDENCY ;;
65462    esac
65463
65464    if test "x$PKGHANDLER_COMMAND" != x; then
65465      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65466    fi
65467  fi
65468
65469          if test "x$enable_aot" = "xyes"; then
65470            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65471          else
65472            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
65473$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
65474          fi
65475        fi
65476      fi
65477    fi
65478  fi
65479
65480
65481
65482
65483
65484
65485
65486
65487
65488
65489
65490
65491
65492
65493
65494
65495
65496
65497# Hotspot setup depends on lib checks (AOT needs libelf).
65498
65499
65500  # The user can in some cases supply additional jvm features. For the custom
65501  # variant, this defines the entire variant.
65502
65503# Check whether --with-jvm-features was given.
65504if test "${with_jvm_features+set}" = set; then :
65505  withval=$with_jvm_features;
65506fi
65507
65508  if test "x$with_jvm_features" != x; then
65509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65510$as_echo_n "checking additional JVM features... " >&6; }
65511    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65513$as_echo "$JVM_FEATURES" >&6; }
65514  fi
65515
65516  # Override hotspot cpu definitions for ARM platforms
65517  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65518    HOTSPOT_TARGET_CPU=arm_32
65519    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65520    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65521    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65522  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65523    HOTSPOT_TARGET_CPU=arm_64
65524    HOTSPOT_TARGET_CPU_ARCH=arm
65525    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65526    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65527  fi
65528
65529  # Verify that dependencies are met for explicitly set features.
65530  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65531    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65532  fi
65533
65534  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65535    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65536  fi
65537
65538  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65539    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65540  fi
65541
65542  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65543    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65544  fi
65545
65546  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65547    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65548  fi
65549
65550  # Turn on additional features based on other parts of configure
65551  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65552    JVM_FEATURES="$JVM_FEATURES dtrace"
65553  else
65554    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65555      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65556    fi
65557  fi
65558
65559  if test "x$STATIC_BUILD" = "xtrue"; then
65560    JVM_FEATURES="$JVM_FEATURES static-build"
65561  else
65562    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65563      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65564    fi
65565  fi
65566
65567  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65568    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65569      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65570    fi
65571  fi
65572
65573  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65574    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65575      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65576    fi
65577  fi
65578
65579  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65580  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65581     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65582     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65583    JVM_FEATURES_jvmci="jvmci"
65584  else
65585    JVM_FEATURES_jvmci=""
65586  fi
65587
65588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65589$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65590  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65592$as_echo "yes, forced" >&6; }
65593    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65594      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65595    fi
65596    INCLUDE_GRAAL="true"
65597  else
65598    # By default enable graal build where AOT is available
65599    if test "x$ENABLE_AOT" = "xtrue"; then
65600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65601$as_echo "yes" >&6; }
65602      JVM_FEATURES_graal="graal"
65603      INCLUDE_GRAAL="true"
65604    else
65605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65606$as_echo "no" >&6; }
65607      JVM_FEATURES_graal=""
65608      INCLUDE_GRAAL="false"
65609    fi
65610  fi
65611
65612
65613
65614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65615$as_echo_n "checking if aot should be enabled... " >&6; }
65616  if test "x$ENABLE_AOT" = "xtrue"; then
65617    if test "x$enable_aot" = "xyes"; then
65618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65619$as_echo "yes, forced" >&6; }
65620    else
65621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65622$as_echo "yes" >&6; }
65623    fi
65624    JVM_FEATURES_aot="aot"
65625  else
65626    if test "x$enable_aot" = "xno"; then
65627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65628$as_echo "no, forced" >&6; }
65629    else
65630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65631$as_echo "no" >&6; }
65632    fi
65633    JVM_FEATURES_aot=""
65634  fi
65635
65636  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65637    # Default to use link time optimizations on minimal on arm
65638    JVM_FEATURES_link_time_opt="link-time-opt"
65639  else
65640    JVM_FEATURES_link_time_opt=""
65641  fi
65642
65643  # All variants but minimal (and custom) get these features
65644  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65645
65646  # Enable features depending on variant.
65647  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65648  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65649  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65650  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65651  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65652  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65653  JVM_FEATURES_custom="$JVM_FEATURES"
65654
65655
65656
65657
65658
65659
65660
65661
65662
65663  # Used for verification of Makefiles by check-jvm-feature
65664
65665
65666  # We don't support --with-jvm-interpreter anymore, use zero instead.
65667
65668
65669# Check whether --with-jvm-interpreter was given.
65670if test "${with_jvm_interpreter+set}" = set; then :
65671  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65672$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65673fi
65674
65675
65676
65677
65678###############################################################################
65679#
65680# We need to do some final tweaking, when everything else is done.
65681#
65682###############################################################################
65683
65684
65685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65686$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65687
65688  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65689    ENABLE_INTREE_EC=true
65690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65691$as_echo "yes" >&6; }
65692  else
65693    ENABLE_INTREE_EC=false
65694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65695$as_echo "no" >&6; }
65696  fi
65697
65698
65699
65700
65701  # Check whether --enable-jtreg-failure-handler was given.
65702if test "${enable_jtreg_failure_handler+set}" = set; then :
65703  enableval=$enable_jtreg_failure_handler;
65704fi
65705
65706
65707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65708$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65709
65710  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65711    if test "x$JT_HOME" = "x"; then
65712      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65713    else
65714      BUILD_FAILURE_HANDLER=true
65715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65716$as_echo "yes, forced" >&6; }
65717    fi
65718  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65719    BUILD_FAILURE_HANDLER=false
65720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65721$as_echo "no, forced" >&6; }
65722  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65723      || test "x$enable_jtreg_failure_handler" = "x"; then
65724    if test "x$JT_HOME" = "x"; then
65725      BUILD_FAILURE_HANDLER=false
65726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65727$as_echo "no, missing jtreg" >&6; }
65728    else
65729      BUILD_FAILURE_HANDLER=true
65730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65731$as_echo "yes, jtreg present" >&6; }
65732    fi
65733  else
65734    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65735  fi
65736
65737
65738
65739
65740  # Check whether --enable-generate-classlist was given.
65741if test "${enable_generate_classlist+set}" = set; then :
65742  enableval=$enable_generate_classlist;
65743fi
65744
65745
65746  # Check if it's likely that it's possible to generate the classlist. Depending
65747  # on exact jvm configuration it could be possible anyway.
65748  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65749    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65750  else
65751    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65752  fi
65753
65754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65755$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65756  if test "x$enable_generate_classlist" = "xyes"; then
65757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65758$as_echo "yes, forced" >&6; }
65759    ENABLE_GENERATE_CLASSLIST="true"
65760    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65761      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65762$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65763    fi
65764  elif test "x$enable_generate_classlist" = "xno"; then
65765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65766$as_echo "no, forced" >&6; }
65767    ENABLE_GENERATE_CLASSLIST="false"
65768  elif test "x$enable_generate_classlist" = "x"; then
65769    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65771$as_echo "yes" >&6; }
65772      ENABLE_GENERATE_CLASSLIST="true"
65773    else
65774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65775$as_echo "no" >&6; }
65776      ENABLE_GENERATE_CLASSLIST="false"
65777    fi
65778  else
65779    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65780  fi
65781
65782
65783
65784
65785###############################################################################
65786#
65787# Configure parts of the build that only affect the build performance,
65788# not the result.
65789#
65790###############################################################################
65791
65792
65793  # How many cores do we have on this build system?
65794
65795# Check whether --with-num-cores was given.
65796if test "${with_num_cores+set}" = set; then :
65797  withval=$with_num_cores;
65798fi
65799
65800  if test "x$with_num_cores" = x; then
65801    # The number of cores were not specified, try to probe them.
65802
65803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65804$as_echo_n "checking for number of cores... " >&6; }
65805  NUM_CORES=1
65806  FOUND_CORES=no
65807
65808  if test -f /proc/cpuinfo; then
65809    # Looks like a Linux (or cygwin) system
65810    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65811    FOUND_CORES=yes
65812  elif test -x /usr/sbin/psrinfo; then
65813    # Looks like a Solaris system
65814    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65815    FOUND_CORES=yes
65816  elif test -x /usr/sbin/sysctl; then
65817    # Looks like a MacOSX system
65818    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65819    FOUND_CORES=yes
65820  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65821    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65822    FOUND_CORES=yes
65823  elif test -n "$NUMBER_OF_PROCESSORS"; then
65824    # On windows, look in the env
65825    NUM_CORES=$NUMBER_OF_PROCESSORS
65826    FOUND_CORES=yes
65827  fi
65828
65829  if test "x$FOUND_CORES" = xyes; then
65830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65831$as_echo "$NUM_CORES" >&6; }
65832  else
65833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65834$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65835    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65836$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65837  fi
65838
65839  else
65840    NUM_CORES=$with_num_cores
65841  fi
65842
65843
65844
65845  # How much memory do we have on this build system?
65846
65847# Check whether --with-memory-size was given.
65848if test "${with_memory_size+set}" = set; then :
65849  withval=$with_memory_size;
65850fi
65851
65852  if test "x$with_memory_size" = x; then
65853    # The memory size was not specified, try to probe it.
65854
65855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65856$as_echo_n "checking for memory size... " >&6; }
65857  # Default to 1024 MB
65858  MEMORY_SIZE=1024
65859  FOUND_MEM=no
65860
65861  if test -f /proc/meminfo; then
65862    # Looks like a Linux (or cygwin) system
65863    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65864    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65865    FOUND_MEM=yes
65866  elif test -x /usr/sbin/prtconf; then
65867    # Looks like a Solaris or AIX system
65868    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65869    FOUND_MEM=yes
65870  elif test -x /usr/sbin/sysctl; then
65871    # Looks like a MacOSX system
65872    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65873    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65874    FOUND_MEM=yes
65875  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65876    # Windows, but without cygwin
65877    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65878    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65879    FOUND_MEM=yes
65880  fi
65881
65882  if test "x$FOUND_MEM" = xyes; then
65883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65884$as_echo "$MEMORY_SIZE MB" >&6; }
65885  else
65886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65887$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65888    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65889$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65890  fi
65891
65892  else
65893    MEMORY_SIZE=$with_memory_size
65894  fi
65895
65896
65897
65898  # Provide a decent default number of parallel jobs for make depending on
65899  # number of cores, amount of memory and machine architecture.
65900
65901# Check whether --with-jobs was given.
65902if test "${with_jobs+set}" = set; then :
65903  withval=$with_jobs;
65904fi
65905
65906  if test "x$with_jobs" = x; then
65907    # Number of jobs was not specified, calculate.
65908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65909$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65910    # Approximate memory in GB.
65911    memory_gb=`expr $MEMORY_SIZE / 1024`
65912    # Pick the lowest of memory in gb and number of cores.
65913    if test "$memory_gb" -lt "$NUM_CORES"; then
65914      JOBS="$memory_gb"
65915    else
65916      JOBS="$NUM_CORES"
65917    fi
65918    if test "$JOBS" -eq "0"; then
65919      JOBS=1
65920    fi
65921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65922$as_echo "$JOBS" >&6; }
65923  else
65924    JOBS=$with_jobs
65925  fi
65926
65927
65928
65929  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65930
65931# Check whether --with-test-jobs was given.
65932if test "${with_test_jobs+set}" = set; then :
65933  withval=$with_test_jobs;
65934fi
65935
65936  if test "x$with_test_jobs" = x; then
65937      TEST_JOBS=0
65938  else
65939      TEST_JOBS=$with_test_jobs
65940  fi
65941
65942
65943
65944# Setup arguments for the boot jdk (after cores and memory have been setup)
65945
65946  ##############################################################################
65947  #
65948  # Specify jvm options for anything that is run with the Boot JDK.
65949  # Not all JVM:s accept the same arguments on the command line.
65950  #
65951
65952# Check whether --with-boot-jdk-jvmargs was given.
65953if test "${with_boot_jdk_jvmargs+set}" = set; then :
65954  withval=$with_boot_jdk_jvmargs;
65955fi
65956
65957
65958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65959$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65960
65961  # Disable special log output when a debug build is used as Boot JDK...
65962
65963  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65964  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65965  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65966  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65967  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65968  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65969    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65970    JVM_ARG_OK=true
65971  else
65972    $ECHO "Arg failed:" >&5
65973    $ECHO "$OUTPUT" >&5
65974    JVM_ARG_OK=false
65975  fi
65976
65977
65978  # Force en-US environment
65979
65980  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65981  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65982  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65983  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65984  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65985  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65986    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65987    JVM_ARG_OK=true
65988  else
65989    $ECHO "Arg failed:" >&5
65990    $ECHO "$OUTPUT" >&5
65991    JVM_ARG_OK=false
65992  fi
65993
65994
65995  # Apply user provided options.
65996
65997  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65998  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65999  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66000  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66001  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66002  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66003    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66004    JVM_ARG_OK=true
66005  else
66006    $ECHO "Arg failed:" >&5
66007    $ECHO "$OUTPUT" >&5
66008    JVM_ARG_OK=false
66009  fi
66010
66011
66012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66013$as_echo "$boot_jdk_jvmargs" >&6; }
66014
66015  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66016  JAVA_FLAGS=$boot_jdk_jvmargs
66017
66018
66019
66020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66021$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66022
66023  # Starting amount of heap memory.
66024
66025  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66026  $ECHO "Command: $JAVA -Xms64M -version" >&5
66027  OUTPUT=`$JAVA -Xms64M -version 2>&1`
66028  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66029  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66030  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66031    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66032    JVM_ARG_OK=true
66033  else
66034    $ECHO "Arg failed:" >&5
66035    $ECHO "$OUTPUT" >&5
66036    JVM_ARG_OK=false
66037  fi
66038
66039  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66040
66041  # Maximum amount of heap memory and stack size.
66042  JVM_HEAP_LIMIT_32="1024"
66043  # Running a 64 bit JVM allows for and requires a bigger heap
66044  JVM_HEAP_LIMIT_64="1600"
66045  STACK_SIZE_32=768
66046  STACK_SIZE_64=1536
66047  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66048  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66049    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66050  fi
66051  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66052    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66053  fi
66054  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66055    JVM_HEAP_LIMIT_32=512
66056    JVM_HEAP_LIMIT_64=512
66057  fi
66058
66059  if test "x$BOOT_JDK_BITS" = "x32"; then
66060    STACK_SIZE=$STACK_SIZE_32
66061    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66062  else
66063    STACK_SIZE=$STACK_SIZE_64
66064    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66065  fi
66066
66067  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66068  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66069  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66070  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66071  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66072  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66073    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66074    JVM_ARG_OK=true
66075  else
66076    $ECHO "Arg failed:" >&5
66077    $ECHO "$OUTPUT" >&5
66078    JVM_ARG_OK=false
66079  fi
66080
66081
66082  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66083  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66084  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66085  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66086  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66087  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66088    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66089    JVM_ARG_OK=true
66090  else
66091    $ECHO "Arg failed:" >&5
66092    $ECHO "$OUTPUT" >&5
66093    JVM_ARG_OK=false
66094  fi
66095
66096
66097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66098$as_echo "$boot_jdk_jvmargs_big" >&6; }
66099
66100  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66101
66102
66103  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66104    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66105    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66106  else
66107    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66108    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66109  fi
66110  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66111  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66113$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66115$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66116
66117
66118  # By default, the main javac compilations use big
66119  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66120
66121
66122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66123$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66124
66125  # Use serial gc for small short lived tools if possible
66126
66127  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66128  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66129  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66130  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66131  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66132  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66133    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66134    JVM_ARG_OK=true
66135  else
66136    $ECHO "Arg failed:" >&5
66137    $ECHO "$OUTPUT" >&5
66138    JVM_ARG_OK=false
66139  fi
66140
66141
66142  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66143  $ECHO "Command: $JAVA -Xms32M -version" >&5
66144  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66145  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66146  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66147  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66148    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66149    JVM_ARG_OK=true
66150  else
66151    $ECHO "Arg failed:" >&5
66152    $ECHO "$OUTPUT" >&5
66153    JVM_ARG_OK=false
66154  fi
66155
66156
66157  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66158  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66159  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66160  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66161  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66162  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66163    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66164    JVM_ARG_OK=true
66165  else
66166    $ECHO "Arg failed:" >&5
66167    $ECHO "$OUTPUT" >&5
66168    JVM_ARG_OK=false
66169  fi
66170
66171
66172  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66173  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66174  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66175  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66176  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66177  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66178    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66179    JVM_ARG_OK=true
66180  else
66181    $ECHO "Arg failed:" >&5
66182    $ECHO "$OUTPUT" >&5
66183    JVM_ARG_OK=false
66184  fi
66185
66186
66187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66188$as_echo "$boot_jdk_jvmargs_small" >&6; }
66189
66190  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66191
66192
66193  JAVA_TOOL_FLAGS_SMALL=""
66194  for f in $JAVA_FLAGS_SMALL; do
66195    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66196  done
66197
66198
66199
66200# Setup smart javac (after cores and memory have been setup)
66201
66202
66203# Check whether --with-sjavac-server-java was given.
66204if test "${with_sjavac_server_java+set}" = set; then :
66205  withval=$with_sjavac_server_java;
66206fi
66207
66208
66209  if test "x$with_sjavac_server_java" != x; then
66210    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66211    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66212    if test "x$FOUND_VERSION" = x; then
66213      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66214    fi
66215  else
66216    SJAVAC_SERVER_JAVA="$JAVA"
66217  fi
66218
66219
66220  if test "$MEMORY_SIZE" -gt "3000"; then
66221
66222  $ECHO "Check if jvm arg is ok: -d64" >&5
66223  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
66224  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
66225  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66226  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66227  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66228    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
66229    JVM_ARG_OK=true
66230  else
66231    $ECHO "Arg failed:" >&5
66232    $ECHO "$OUTPUT" >&5
66233    JVM_ARG_OK=false
66234  fi
66235
66236    if test "$JVM_ARG_OK" = true; then
66237      JVM_64BIT=true
66238      JVM_ARG_OK=false
66239    fi
66240  fi
66241
66242  MX_VALUE=`expr $MEMORY_SIZE / 2`
66243  if test "$JVM_64BIT" = true; then
66244    # Set ms lower than mx since more than one instance of the server might
66245    # get launched at the same time before they figure out which instance won.
66246    MS_VALUE=512
66247    if test "$MX_VALUE" -gt "2048"; then
66248      MX_VALUE=2048
66249    fi
66250  else
66251    MS_VALUE=256
66252    if test "$MX_VALUE" -gt "1500"; then
66253      MX_VALUE=1500
66254    fi
66255  fi
66256  if test "$MX_VALUE" -lt "512"; then
66257    MX_VALUE=512
66258  fi
66259
66260  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66261  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66262  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66263  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66264  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66265  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66266    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66267    JVM_ARG_OK=true
66268  else
66269    $ECHO "Arg failed:" >&5
66270    $ECHO "$OUTPUT" >&5
66271    JVM_ARG_OK=false
66272  fi
66273
66274
66275
66276  # Check whether --enable-sjavac was given.
66277if test "${enable_sjavac+set}" = set; then :
66278  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66279else
66280  ENABLE_SJAVAC="no"
66281fi
66282
66283  if test "x$JVM_ARG_OK" = "xfalse"; then
66284    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66285$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66286    ENABLE_SJAVAC="no"
66287  fi
66288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66289$as_echo_n "checking whether to use sjavac... " >&6; }
66290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66291$as_echo "$ENABLE_SJAVAC" >&6; }
66292
66293
66294  # Check whether --enable-javac-server was given.
66295if test "${enable_javac_server+set}" = set; then :
66296  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66297else
66298  ENABLE_JAVAC_SERVER="yes"
66299fi
66300
66301  if test "x$JVM_ARG_OK" = "xfalse"; then
66302    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66303$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66304    ENABLE_JAVAC_SERVER="no"
66305  fi
66306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66307$as_echo_n "checking whether to use javac server... " >&6; }
66308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66309$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66310
66311
66312  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66313    # When using a server javac, the small client instances do not need much
66314    # resources.
66315    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66316  fi
66317
66318
66319# Setup use of icecc if requested
66320
66321  # Check whether --enable-icecc was given.
66322if test "${enable_icecc+set}" = set; then :
66323  enableval=$enable_icecc;
66324fi
66325
66326
66327  if test "x${enable_icecc}" = "xyes"; then
66328
66329
66330
66331  # Publish this variable in the help.
66332
66333
66334  if [ -z "${ICECC_CMD+x}" ]; then
66335    # The variable is not set by user, try to locate tool using the code snippet
66336    for ac_prog in icecc
66337do
66338  # Extract the first word of "$ac_prog", so it can be a program name with args.
66339set dummy $ac_prog; ac_word=$2
66340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66341$as_echo_n "checking for $ac_word... " >&6; }
66342if ${ac_cv_path_ICECC_CMD+:} false; then :
66343  $as_echo_n "(cached) " >&6
66344else
66345  case $ICECC_CMD in
66346  [\\/]* | ?:[\\/]*)
66347  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66348  ;;
66349  *)
66350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66351for as_dir in $PATH
66352do
66353  IFS=$as_save_IFS
66354  test -z "$as_dir" && as_dir=.
66355    for ac_exec_ext in '' $ac_executable_extensions; do
66356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66357    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66359    break 2
66360  fi
66361done
66362  done
66363IFS=$as_save_IFS
66364
66365  ;;
66366esac
66367fi
66368ICECC_CMD=$ac_cv_path_ICECC_CMD
66369if test -n "$ICECC_CMD"; then
66370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66371$as_echo "$ICECC_CMD" >&6; }
66372else
66373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66374$as_echo "no" >&6; }
66375fi
66376
66377
66378  test -n "$ICECC_CMD" && break
66379done
66380
66381  else
66382    # The variable is set, but is it from the command line or the environment?
66383
66384    # Try to remove the string !ICECC_CMD! from our list.
66385    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66386    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66387      # If it failed, the variable was not from the command line. Ignore it,
66388      # but warn the user (except for BASH, which is always set by the calling BASH).
66389      if test "xICECC_CMD" != xBASH; then
66390        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66391$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66392      fi
66393      # Try to locate tool using the code snippet
66394      for ac_prog in icecc
66395do
66396  # Extract the first word of "$ac_prog", so it can be a program name with args.
66397set dummy $ac_prog; ac_word=$2
66398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66399$as_echo_n "checking for $ac_word... " >&6; }
66400if ${ac_cv_path_ICECC_CMD+:} false; then :
66401  $as_echo_n "(cached) " >&6
66402else
66403  case $ICECC_CMD in
66404  [\\/]* | ?:[\\/]*)
66405  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66406  ;;
66407  *)
66408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66409for as_dir in $PATH
66410do
66411  IFS=$as_save_IFS
66412  test -z "$as_dir" && as_dir=.
66413    for ac_exec_ext in '' $ac_executable_extensions; do
66414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66415    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66417    break 2
66418  fi
66419done
66420  done
66421IFS=$as_save_IFS
66422
66423  ;;
66424esac
66425fi
66426ICECC_CMD=$ac_cv_path_ICECC_CMD
66427if test -n "$ICECC_CMD"; then
66428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66429$as_echo "$ICECC_CMD" >&6; }
66430else
66431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66432$as_echo "no" >&6; }
66433fi
66434
66435
66436  test -n "$ICECC_CMD" && break
66437done
66438
66439    else
66440      # If it succeeded, then it was overridden by the user. We will use it
66441      # for the tool.
66442
66443      # First remove it from the list of overridden variables, so we can test
66444      # for unknown variables in the end.
66445      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66446
66447      # Check if we try to supply an empty value
66448      if test "x$ICECC_CMD" = x; then
66449        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66450$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66452$as_echo_n "checking for ICECC_CMD... " >&6; }
66453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66454$as_echo "disabled" >&6; }
66455      else
66456        # Check if the provided tool contains a complete path.
66457        tool_specified="$ICECC_CMD"
66458        tool_basename="${tool_specified##*/}"
66459        if test "x$tool_basename" = "x$tool_specified"; then
66460          # A command without a complete path is provided, search $PATH.
66461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66462$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66463          # Extract the first word of "$tool_basename", so it can be a program name with args.
66464set dummy $tool_basename; ac_word=$2
66465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66466$as_echo_n "checking for $ac_word... " >&6; }
66467if ${ac_cv_path_ICECC_CMD+:} false; then :
66468  $as_echo_n "(cached) " >&6
66469else
66470  case $ICECC_CMD in
66471  [\\/]* | ?:[\\/]*)
66472  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66473  ;;
66474  *)
66475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66476for as_dir in $PATH
66477do
66478  IFS=$as_save_IFS
66479  test -z "$as_dir" && as_dir=.
66480    for ac_exec_ext in '' $ac_executable_extensions; do
66481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66482    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66484    break 2
66485  fi
66486done
66487  done
66488IFS=$as_save_IFS
66489
66490  ;;
66491esac
66492fi
66493ICECC_CMD=$ac_cv_path_ICECC_CMD
66494if test -n "$ICECC_CMD"; then
66495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66496$as_echo "$ICECC_CMD" >&6; }
66497else
66498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66499$as_echo "no" >&6; }
66500fi
66501
66502
66503          if test "x$ICECC_CMD" = x; then
66504            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66505          fi
66506        else
66507          # Otherwise we believe it is a complete path. Use it as it is.
66508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66509$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66510          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66511$as_echo_n "checking for ICECC_CMD... " >&6; }
66512          if test ! -x "$tool_specified"; then
66513            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66514$as_echo "not found" >&6; }
66515            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66516          fi
66517          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66518$as_echo "$tool_specified" >&6; }
66519        fi
66520      fi
66521    fi
66522
66523  fi
66524
66525
66526
66527  if test "x$ICECC_CMD" = x; then
66528    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66529  fi
66530
66531
66532    old_path="$PATH"
66533
66534    # Look for icecc-create-env in some known places
66535    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66536
66537
66538
66539  # Publish this variable in the help.
66540
66541
66542  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66543    # The variable is not set by user, try to locate tool using the code snippet
66544    for ac_prog in icecc-create-env
66545do
66546  # Extract the first word of "$ac_prog", so it can be a program name with args.
66547set dummy $ac_prog; ac_word=$2
66548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66549$as_echo_n "checking for $ac_word... " >&6; }
66550if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66551  $as_echo_n "(cached) " >&6
66552else
66553  case $ICECC_CREATE_ENV in
66554  [\\/]* | ?:[\\/]*)
66555  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66556  ;;
66557  *)
66558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66559for as_dir in $PATH
66560do
66561  IFS=$as_save_IFS
66562  test -z "$as_dir" && as_dir=.
66563    for ac_exec_ext in '' $ac_executable_extensions; do
66564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66565    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66567    break 2
66568  fi
66569done
66570  done
66571IFS=$as_save_IFS
66572
66573  ;;
66574esac
66575fi
66576ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66577if test -n "$ICECC_CREATE_ENV"; then
66578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66579$as_echo "$ICECC_CREATE_ENV" >&6; }
66580else
66581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66582$as_echo "no" >&6; }
66583fi
66584
66585
66586  test -n "$ICECC_CREATE_ENV" && break
66587done
66588
66589  else
66590    # The variable is set, but is it from the command line or the environment?
66591
66592    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66595      # If it failed, the variable was not from the command line. Ignore it,
66596      # but warn the user (except for BASH, which is always set by the calling BASH).
66597      if test "xICECC_CREATE_ENV" != xBASH; then
66598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66599$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66600      fi
66601      # Try to locate tool using the code snippet
66602      for ac_prog in icecc-create-env
66603do
66604  # Extract the first word of "$ac_prog", so it can be a program name with args.
66605set dummy $ac_prog; ac_word=$2
66606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66607$as_echo_n "checking for $ac_word... " >&6; }
66608if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66609  $as_echo_n "(cached) " >&6
66610else
66611  case $ICECC_CREATE_ENV in
66612  [\\/]* | ?:[\\/]*)
66613  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66614  ;;
66615  *)
66616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66617for as_dir in $PATH
66618do
66619  IFS=$as_save_IFS
66620  test -z "$as_dir" && as_dir=.
66621    for ac_exec_ext in '' $ac_executable_extensions; do
66622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66623    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66625    break 2
66626  fi
66627done
66628  done
66629IFS=$as_save_IFS
66630
66631  ;;
66632esac
66633fi
66634ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66635if test -n "$ICECC_CREATE_ENV"; then
66636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66637$as_echo "$ICECC_CREATE_ENV" >&6; }
66638else
66639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66640$as_echo "no" >&6; }
66641fi
66642
66643
66644  test -n "$ICECC_CREATE_ENV" && break
66645done
66646
66647    else
66648      # If it succeeded, then it was overridden by the user. We will use it
66649      # for the tool.
66650
66651      # First remove it from the list of overridden variables, so we can test
66652      # for unknown variables in the end.
66653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66654
66655      # Check if we try to supply an empty value
66656      if test "x$ICECC_CREATE_ENV" = x; then
66657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66658$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66660$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66662$as_echo "disabled" >&6; }
66663      else
66664        # Check if the provided tool contains a complete path.
66665        tool_specified="$ICECC_CREATE_ENV"
66666        tool_basename="${tool_specified##*/}"
66667        if test "x$tool_basename" = "x$tool_specified"; then
66668          # A command without a complete path is provided, search $PATH.
66669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66670$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66671          # Extract the first word of "$tool_basename", so it can be a program name with args.
66672set dummy $tool_basename; ac_word=$2
66673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66674$as_echo_n "checking for $ac_word... " >&6; }
66675if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66676  $as_echo_n "(cached) " >&6
66677else
66678  case $ICECC_CREATE_ENV in
66679  [\\/]* | ?:[\\/]*)
66680  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66681  ;;
66682  *)
66683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66684for as_dir in $PATH
66685do
66686  IFS=$as_save_IFS
66687  test -z "$as_dir" && as_dir=.
66688    for ac_exec_ext in '' $ac_executable_extensions; do
66689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66690    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66692    break 2
66693  fi
66694done
66695  done
66696IFS=$as_save_IFS
66697
66698  ;;
66699esac
66700fi
66701ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66702if test -n "$ICECC_CREATE_ENV"; then
66703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66704$as_echo "$ICECC_CREATE_ENV" >&6; }
66705else
66706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66707$as_echo "no" >&6; }
66708fi
66709
66710
66711          if test "x$ICECC_CREATE_ENV" = x; then
66712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66713          fi
66714        else
66715          # Otherwise we believe it is a complete path. Use it as it is.
66716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66717$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66719$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66720          if test ! -x "$tool_specified"; then
66721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66722$as_echo "not found" >&6; }
66723            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66724          fi
66725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66726$as_echo "$tool_specified" >&6; }
66727        fi
66728      fi
66729    fi
66730
66731  fi
66732
66733
66734
66735  if test "x$ICECC_CREATE_ENV" = x; then
66736    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66737  fi
66738
66739
66740    # Use icecc-create-env to create a minimal compilation environment that can
66741    # be sent to the other hosts in the icecream cluster.
66742    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66743    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66744    # Older versions of icecc does not have the --gcc parameter
66745    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66746      icecc_gcc_arg="--gcc"
66747    fi
66748    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66749
66750  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66751      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66752          ${icecc_create_env_log} 2>&1 )
66753  if test "$?" != "0"; then
66754    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66755$as_echo "$as_me: icecc-create-env output:" >&6;}
66756    cat \
66757          ${icecc_create_env_log}
66758    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66759  fi
66760
66761    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66762      # For clang, the icecc compilerwrapper is needed. It usually resides next
66763      # to icecc-create-env.
66764
66765
66766
66767  # Publish this variable in the help.
66768
66769
66770  if [ -z "${ICECC_WRAPPER+x}" ]; then
66771    # The variable is not set by user, try to locate tool using the code snippet
66772    for ac_prog in compilerwrapper
66773do
66774  # Extract the first word of "$ac_prog", so it can be a program name with args.
66775set dummy $ac_prog; ac_word=$2
66776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66777$as_echo_n "checking for $ac_word... " >&6; }
66778if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66779  $as_echo_n "(cached) " >&6
66780else
66781  case $ICECC_WRAPPER in
66782  [\\/]* | ?:[\\/]*)
66783  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66784  ;;
66785  *)
66786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66787for as_dir in $PATH
66788do
66789  IFS=$as_save_IFS
66790  test -z "$as_dir" && as_dir=.
66791    for ac_exec_ext in '' $ac_executable_extensions; do
66792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66793    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66795    break 2
66796  fi
66797done
66798  done
66799IFS=$as_save_IFS
66800
66801  ;;
66802esac
66803fi
66804ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66805if test -n "$ICECC_WRAPPER"; then
66806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66807$as_echo "$ICECC_WRAPPER" >&6; }
66808else
66809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66810$as_echo "no" >&6; }
66811fi
66812
66813
66814  test -n "$ICECC_WRAPPER" && break
66815done
66816
66817  else
66818    # The variable is set, but is it from the command line or the environment?
66819
66820    # Try to remove the string !ICECC_WRAPPER! from our list.
66821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66823      # If it failed, the variable was not from the command line. Ignore it,
66824      # but warn the user (except for BASH, which is always set by the calling BASH).
66825      if test "xICECC_WRAPPER" != xBASH; then
66826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66827$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66828      fi
66829      # Try to locate tool using the code snippet
66830      for ac_prog in compilerwrapper
66831do
66832  # Extract the first word of "$ac_prog", so it can be a program name with args.
66833set dummy $ac_prog; ac_word=$2
66834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66835$as_echo_n "checking for $ac_word... " >&6; }
66836if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66837  $as_echo_n "(cached) " >&6
66838else
66839  case $ICECC_WRAPPER in
66840  [\\/]* | ?:[\\/]*)
66841  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66842  ;;
66843  *)
66844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66845for as_dir in $PATH
66846do
66847  IFS=$as_save_IFS
66848  test -z "$as_dir" && as_dir=.
66849    for ac_exec_ext in '' $ac_executable_extensions; do
66850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66851    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66853    break 2
66854  fi
66855done
66856  done
66857IFS=$as_save_IFS
66858
66859  ;;
66860esac
66861fi
66862ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66863if test -n "$ICECC_WRAPPER"; then
66864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66865$as_echo "$ICECC_WRAPPER" >&6; }
66866else
66867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66868$as_echo "no" >&6; }
66869fi
66870
66871
66872  test -n "$ICECC_WRAPPER" && break
66873done
66874
66875    else
66876      # If it succeeded, then it was overridden by the user. We will use it
66877      # for the tool.
66878
66879      # First remove it from the list of overridden variables, so we can test
66880      # for unknown variables in the end.
66881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66882
66883      # Check if we try to supply an empty value
66884      if test "x$ICECC_WRAPPER" = x; then
66885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66886$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66888$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66890$as_echo "disabled" >&6; }
66891      else
66892        # Check if the provided tool contains a complete path.
66893        tool_specified="$ICECC_WRAPPER"
66894        tool_basename="${tool_specified##*/}"
66895        if test "x$tool_basename" = "x$tool_specified"; then
66896          # A command without a complete path is provided, search $PATH.
66897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66898$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66899          # Extract the first word of "$tool_basename", so it can be a program name with args.
66900set dummy $tool_basename; ac_word=$2
66901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66902$as_echo_n "checking for $ac_word... " >&6; }
66903if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66904  $as_echo_n "(cached) " >&6
66905else
66906  case $ICECC_WRAPPER in
66907  [\\/]* | ?:[\\/]*)
66908  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66909  ;;
66910  *)
66911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66912for as_dir in $PATH
66913do
66914  IFS=$as_save_IFS
66915  test -z "$as_dir" && as_dir=.
66916    for ac_exec_ext in '' $ac_executable_extensions; do
66917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66918    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66920    break 2
66921  fi
66922done
66923  done
66924IFS=$as_save_IFS
66925
66926  ;;
66927esac
66928fi
66929ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66930if test -n "$ICECC_WRAPPER"; then
66931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66932$as_echo "$ICECC_WRAPPER" >&6; }
66933else
66934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66935$as_echo "no" >&6; }
66936fi
66937
66938
66939          if test "x$ICECC_WRAPPER" = x; then
66940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66941          fi
66942        else
66943          # Otherwise we believe it is a complete path. Use it as it is.
66944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66945$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66947$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66948          if test ! -x "$tool_specified"; then
66949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66950$as_echo "not found" >&6; }
66951            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66952          fi
66953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66954$as_echo "$tool_specified" >&6; }
66955        fi
66956      fi
66957    fi
66958
66959  fi
66960
66961
66962
66963  if test "x$ICECC_WRAPPER" = x; then
66964    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66965  fi
66966
66967
66968
66969  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66970      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66971  if test "$?" != "0"; then
66972    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66973$as_echo "$as_me: icecc-create-env output:" >&6;}
66974    cat ${icecc_create_env_log}
66975    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66976  fi
66977
66978    else
66979      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66980    fi
66981    PATH="$old_path"
66982    # The bundle with the compiler gets a name based on checksums. Parse log file
66983    # to find it.
66984    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66985    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66986    if test ! -f ${ICECC_ENV_BUNDLE}; then
66987      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66988    fi
66989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66990$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66992$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66993    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66994
66995    if test "x${COMPILE_TYPE}" = "xcross"; then
66996      # If cross compiling, create a separate env package for the build compiler
66997      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66998      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66999      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67000
67001  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67002      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67003            ${icecc_create_env_log_build} 2>&1 )
67004  if test "$?" != "0"; then
67005    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67006$as_echo "$as_me: icecc-create-env output:" >&6;}
67007    cat \
67008            ${icecc_create_env_log_build}
67009    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67010  fi
67011
67012      elif test "x${BUILD_CC##*/}" = "xclang"; then
67013
67014  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67015      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67016  if test "$?" != "0"; then
67017    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67018$as_echo "$as_me: icecc-create-env output:" >&6;}
67019    cat ${icecc_create_env_log_build}
67020    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67021  fi
67022
67023      else
67024        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67025      fi
67026      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67027      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67028      if test ! -f ${ICECC_ENV_BUNDLE}; then
67029        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67030      fi
67031      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67032$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67034$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67035      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67036          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67037    else
67038      BUILD_ICECC="${ICECC}"
67039    fi
67040
67041
67042  fi
67043
67044
67045# Can the C/C++ compiler use precompiled headers?
67046
67047
67048  ###############################################################################
67049  #
67050  # Can the C/C++ compiler use precompiled headers?
67051  #
67052  # Check whether --enable-precompiled-headers was given.
67053if test "${enable_precompiled_headers+set}" = set; then :
67054  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67055else
67056  ENABLE_PRECOMPH=yes
67057fi
67058
67059
67060  USE_PRECOMPILED_HEADER=true
67061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67062$as_echo_n "checking If precompiled header is enabled... " >&6; }
67063  if test "x$ENABLE_PRECOMPH" = xno; then
67064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67065$as_echo "no, forced" >&6; }
67066    USE_PRECOMPILED_HEADER=false
67067  elif test "x$ICECC" != "x"; then
67068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67069$as_echo "no, does not work effectively with icecc" >&6; }
67070    USE_PRECOMPILED_HEADER=false
67071  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67073$as_echo "no, does not work with Solaris Studio" >&6; }
67074    USE_PRECOMPILED_HEADER=false
67075  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67077$as_echo "no, does not work with xlc" >&6; }
67078    USE_PRECOMPILED_HEADER=false
67079  else
67080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67081$as_echo "yes" >&6; }
67082  fi
67083
67084  if test "x$ENABLE_PRECOMPH" = xyes; then
67085    # Check that the compiler actually supports precomp headers.
67086    if test "x$TOOLCHAIN_TYPE" = xgcc; then
67087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67088$as_echo_n "checking that precompiled headers work... " >&6; }
67089      echo "int alfa();" > conftest.h
67090      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67091      if test ! -f conftest.hpp.gch; then
67092        USE_PRECOMPILED_HEADER=false
67093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67094$as_echo "no" >&6; }
67095      else
67096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67097$as_echo "yes" >&6; }
67098      fi
67099      $RM conftest.h conftest.hpp.gch
67100    fi
67101  fi
67102
67103
67104
67105
67106# Setup use of ccache, if available
67107
67108  # Check whether --enable-ccache was given.
67109if test "${enable_ccache+set}" = set; then :
67110  enableval=$enable_ccache;
67111fi
67112
67113
67114  CCACHE_STATUS=
67115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67116$as_echo_n "checking is ccache enabled... " >&6; }
67117  if test "x$enable_ccache" = xyes; then
67118    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67120$as_echo "yes" >&6; }
67121      OLD_PATH="$PATH"
67122      if test "x$TOOLCHAIN_PATH" != x; then
67123        PATH=$TOOLCHAIN_PATH:$PATH
67124      fi
67125
67126
67127
67128  # Publish this variable in the help.
67129
67130
67131  if [ -z "${CCACHE+x}" ]; then
67132    # The variable is not set by user, try to locate tool using the code snippet
67133    for ac_prog in ccache
67134do
67135  # Extract the first word of "$ac_prog", so it can be a program name with args.
67136set dummy $ac_prog; ac_word=$2
67137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67138$as_echo_n "checking for $ac_word... " >&6; }
67139if ${ac_cv_path_CCACHE+:} false; then :
67140  $as_echo_n "(cached) " >&6
67141else
67142  case $CCACHE in
67143  [\\/]* | ?:[\\/]*)
67144  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67145  ;;
67146  *)
67147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67148for as_dir in $PATH
67149do
67150  IFS=$as_save_IFS
67151  test -z "$as_dir" && as_dir=.
67152    for ac_exec_ext in '' $ac_executable_extensions; do
67153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67154    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67156    break 2
67157  fi
67158done
67159  done
67160IFS=$as_save_IFS
67161
67162  ;;
67163esac
67164fi
67165CCACHE=$ac_cv_path_CCACHE
67166if test -n "$CCACHE"; then
67167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67168$as_echo "$CCACHE" >&6; }
67169else
67170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67171$as_echo "no" >&6; }
67172fi
67173
67174
67175  test -n "$CCACHE" && break
67176done
67177
67178  else
67179    # The variable is set, but is it from the command line or the environment?
67180
67181    # Try to remove the string !CCACHE! from our list.
67182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67184      # If it failed, the variable was not from the command line. Ignore it,
67185      # but warn the user (except for BASH, which is always set by the calling BASH).
67186      if test "xCCACHE" != xBASH; then
67187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67188$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67189      fi
67190      # Try to locate tool using the code snippet
67191      for ac_prog in ccache
67192do
67193  # Extract the first word of "$ac_prog", so it can be a program name with args.
67194set dummy $ac_prog; ac_word=$2
67195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67196$as_echo_n "checking for $ac_word... " >&6; }
67197if ${ac_cv_path_CCACHE+:} false; then :
67198  $as_echo_n "(cached) " >&6
67199else
67200  case $CCACHE in
67201  [\\/]* | ?:[\\/]*)
67202  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67203  ;;
67204  *)
67205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67206for as_dir in $PATH
67207do
67208  IFS=$as_save_IFS
67209  test -z "$as_dir" && as_dir=.
67210    for ac_exec_ext in '' $ac_executable_extensions; do
67211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67212    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67214    break 2
67215  fi
67216done
67217  done
67218IFS=$as_save_IFS
67219
67220  ;;
67221esac
67222fi
67223CCACHE=$ac_cv_path_CCACHE
67224if test -n "$CCACHE"; then
67225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67226$as_echo "$CCACHE" >&6; }
67227else
67228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67229$as_echo "no" >&6; }
67230fi
67231
67232
67233  test -n "$CCACHE" && break
67234done
67235
67236    else
67237      # If it succeeded, then it was overridden by the user. We will use it
67238      # for the tool.
67239
67240      # First remove it from the list of overridden variables, so we can test
67241      # for unknown variables in the end.
67242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67243
67244      # Check if we try to supply an empty value
67245      if test "x$CCACHE" = x; then
67246        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67247$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67249$as_echo_n "checking for CCACHE... " >&6; }
67250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67251$as_echo "disabled" >&6; }
67252      else
67253        # Check if the provided tool contains a complete path.
67254        tool_specified="$CCACHE"
67255        tool_basename="${tool_specified##*/}"
67256        if test "x$tool_basename" = "x$tool_specified"; then
67257          # A command without a complete path is provided, search $PATH.
67258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67259$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67260          # Extract the first word of "$tool_basename", so it can be a program name with args.
67261set dummy $tool_basename; ac_word=$2
67262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67263$as_echo_n "checking for $ac_word... " >&6; }
67264if ${ac_cv_path_CCACHE+:} false; then :
67265  $as_echo_n "(cached) " >&6
67266else
67267  case $CCACHE in
67268  [\\/]* | ?:[\\/]*)
67269  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67270  ;;
67271  *)
67272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67273for as_dir in $PATH
67274do
67275  IFS=$as_save_IFS
67276  test -z "$as_dir" && as_dir=.
67277    for ac_exec_ext in '' $ac_executable_extensions; do
67278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67279    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67281    break 2
67282  fi
67283done
67284  done
67285IFS=$as_save_IFS
67286
67287  ;;
67288esac
67289fi
67290CCACHE=$ac_cv_path_CCACHE
67291if test -n "$CCACHE"; then
67292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67293$as_echo "$CCACHE" >&6; }
67294else
67295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67296$as_echo "no" >&6; }
67297fi
67298
67299
67300          if test "x$CCACHE" = x; then
67301            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67302          fi
67303        else
67304          # Otherwise we believe it is a complete path. Use it as it is.
67305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67306$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67307          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67308$as_echo_n "checking for CCACHE... " >&6; }
67309          if test ! -x "$tool_specified"; then
67310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67311$as_echo "not found" >&6; }
67312            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67313          fi
67314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67315$as_echo "$tool_specified" >&6; }
67316        fi
67317      fi
67318    fi
67319
67320  fi
67321
67322
67323
67324  if test "x$CCACHE" = x; then
67325    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67326  fi
67327
67328
67329      PATH="$OLD_PATH"
67330      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67331      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67332    else
67333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67334$as_echo "no" >&6; }
67335      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67336$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67337    fi
67338  elif test "x$enable_ccache" = xno; then
67339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67340$as_echo "no, explicitly disabled" >&6; }
67341    CCACHE_STATUS="Disabled"
67342  elif test "x$enable_ccache" = x; then
67343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67344$as_echo "no" >&6; }
67345  else
67346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67347$as_echo "unknown" >&6; }
67348    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67349  fi
67350
67351
67352
67353# Check whether --with-ccache-dir was given.
67354if test "${with_ccache_dir+set}" = set; then :
67355  withval=$with_ccache_dir;
67356fi
67357
67358
67359  if test "x$with_ccache_dir" != x; then
67360    # When using a non home ccache directory, assume the use is to share ccache files
67361    # with other users. Thus change the umask.
67362    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67363    if test "x$CCACHE" = x; then
67364      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67365$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67366    fi
67367  fi
67368
67369  if test "x$CCACHE" != x; then
67370
67371  if test "x$CCACHE" != x; then
67372    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67373      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67374          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67375      if test "x$HAS_BAD_CCACHE" != "x"; then
67376        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67377      fi
67378    fi
67379    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67380      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67381          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67382      if test "x$HAS_BAD_CCACHE" != "x"; then
67383        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67384      fi
67385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67386$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67387      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67388      PUSHED_FLAGS="$CXXFLAGS"
67389      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67390      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67391/* end confdefs.h.  */
67392
67393int
67394main ()
67395{
67396
67397  ;
67398  return 0;
67399}
67400_ACEOF
67401if ac_fn_cxx_try_compile "$LINENO"; then :
67402  CC_KNOWS_CCACHE_TRICK=yes
67403else
67404  CC_KNOWS_CCACHE_TRICK=no
67405fi
67406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67407      CXXFLAGS="$PUSHED_FLAGS"
67408      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67410$as_echo "yes" >&6; }
67411        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67412
67413        CCACHE_SLOPPINESS=pch_defines,time_macros
67414      else
67415        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67416$as_echo "no" >&6; }
67417        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67418      fi
67419    fi
67420
67421    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67422        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67423
67424    if test "x$SET_CCACHE_DIR" != x; then
67425      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67426      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67427    fi
67428  fi
67429
67430  fi
67431
67432
67433###############################################################################
67434#
67435# And now the finish...
67436#
67437###############################################################################
67438
67439# Check for some common pitfalls
67440
67441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67442    file_to_test="$SRC_ROOT/LICENSE"
67443    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67444      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
67445    fi
67446  fi
67447
67448
67449  # Did user specify any unknown variables?
67450
67451  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67452    # Replace the separating ! with spaces before presenting for end user.
67453    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67455$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67456  fi
67457
67458
67459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67460$as_echo_n "checking if build directory is on local disk... " >&6; }
67461
67462  # df -l lists only local disks; if the given directory is not found then
67463  # a non-zero exit code is given
67464  if test "x$DF" = x; then
67465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67466      # msys does not have df; use Windows "net use" instead.
67467      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67468      if test "x$IS_NETWORK_DISK" = x; then
67469        OUTPUT_DIR_IS_LOCAL="yes"
67470      else
67471        OUTPUT_DIR_IS_LOCAL="no"
67472      fi
67473    else
67474      # No df here, say it's local
67475      OUTPUT_DIR_IS_LOCAL="yes"
67476    fi
67477  else
67478    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67479      OUTPUT_DIR_IS_LOCAL="yes"
67480    else
67481      OUTPUT_DIR_IS_LOCAL="no"
67482    fi
67483  fi
67484
67485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67486$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67487
67488
67489
67490  # Check if the user has any old-style ALT_ variables set.
67491  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67492
67493  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67494  # Since we can't properly handle the dependencies for this, warn the user about the situation
67495  if test -e $OUTPUT_ROOT/spec.gmk; then
67496    IS_RECONFIGURE=yes
67497  else
67498    IS_RECONFIGURE=no
67499  fi
67500
67501
67502# At the end, call the custom hook. (Dummy macro if no custom sources available)
67503
67504
67505# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67506
67507  # Keep feature lists sorted and free of duplicates
67508  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67509  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67510  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67511  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67512  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67513  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67514  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67515
67516  # Validate features
67517  for variant in $JVM_VARIANTS; do
67518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67519$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67520    features_var_name=JVM_FEATURES_$variant
67521    JVM_FEATURES_TO_TEST=${!features_var_name}
67522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67523$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67524    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67525    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67526    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67527    if test "x$INVALID_FEATURES" != x; then
67528      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67529    fi
67530  done
67531
67532
67533# We're messing a bit with internal autoconf variables to put the config.status
67534# in the output directory instead of the current directory.
67535CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67536
67537# Create the actual output files. Now the main work of configure is done.
67538cat >confcache <<\_ACEOF
67539# This file is a shell script that caches the results of configure
67540# tests run on this system so they can be shared between configure
67541# scripts and configure runs, see configure's option --config-cache.
67542# It is not useful on other systems.  If it contains results you don't
67543# want to keep, you may remove or edit it.
67544#
67545# config.status only pays attention to the cache file if you give it
67546# the --recheck option to rerun configure.
67547#
67548# `ac_cv_env_foo' variables (set or unset) will be overridden when
67549# loading this file, other *unset* `ac_cv_foo' will be assigned the
67550# following values.
67551
67552_ACEOF
67553
67554# The following way of writing the cache mishandles newlines in values,
67555# but we know of no workaround that is simple, portable, and efficient.
67556# So, we kill variables containing newlines.
67557# Ultrix sh set writes to stderr and can't be redirected directly,
67558# and sets the high bit in the cache file unless we assign to the vars.
67559(
67560  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67561    eval ac_val=\$$ac_var
67562    case $ac_val in #(
67563    *${as_nl}*)
67564      case $ac_var in #(
67565      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67566$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67567      esac
67568      case $ac_var in #(
67569      _ | IFS | as_nl) ;; #(
67570      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67571      *) { eval $ac_var=; unset $ac_var;} ;;
67572      esac ;;
67573    esac
67574  done
67575
67576  (set) 2>&1 |
67577    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67578    *${as_nl}ac_space=\ *)
67579      # `set' does not quote correctly, so add quotes: double-quote
67580      # substitution turns \\\\ into \\, and sed turns \\ into \.
67581      sed -n \
67582	"s/'/'\\\\''/g;
67583	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67584      ;; #(
67585    *)
67586      # `set' quotes correctly as required by POSIX, so do not add quotes.
67587      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67588      ;;
67589    esac |
67590    sort
67591) |
67592  sed '
67593     /^ac_cv_env_/b end
67594     t clear
67595     :clear
67596     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67597     t end
67598     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67599     :end' >>confcache
67600if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67601  if test -w "$cache_file"; then
67602    if test "x$cache_file" != "x/dev/null"; then
67603      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67604$as_echo "$as_me: updating cache $cache_file" >&6;}
67605      if test ! -f "$cache_file" || test -h "$cache_file"; then
67606	cat confcache >"$cache_file"
67607      else
67608        case $cache_file in #(
67609        */* | ?:*)
67610	  mv -f confcache "$cache_file"$$ &&
67611	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67612        *)
67613	  mv -f confcache "$cache_file" ;;
67614	esac
67615      fi
67616    fi
67617  else
67618    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67619$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67620  fi
67621fi
67622rm -f confcache
67623
67624test "x$prefix" = xNONE && prefix=$ac_default_prefix
67625# Let make expand exec_prefix.
67626test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67627
67628# Transform confdefs.h into DEFS.
67629# Protect against shell expansion while executing Makefile rules.
67630# Protect against Makefile macro expansion.
67631#
67632# If the first sed substitution is executed (which looks for macros that
67633# take arguments), then branch to the quote section.  Otherwise,
67634# look for a macro that doesn't take arguments.
67635ac_script='
67636:mline
67637/\\$/{
67638 N
67639 s,\\\n,,
67640 b mline
67641}
67642t clear
67643:clear
67644s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67645t quote
67646s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67647t quote
67648b any
67649:quote
67650s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67651s/\[/\\&/g
67652s/\]/\\&/g
67653s/\$/$$/g
67654H
67655:any
67656${
67657	g
67658	s/^\n//
67659	s/\n/ /g
67660	p
67661}
67662'
67663DEFS=`sed -n "$ac_script" confdefs.h`
67664
67665
67666ac_libobjs=
67667ac_ltlibobjs=
67668U=
67669for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67670  # 1. Remove the extension, and $U if already installed.
67671  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67672  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67673  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67674  #    will be set to the directory where LIBOBJS objects are built.
67675  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67676  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67677done
67678LIBOBJS=$ac_libobjs
67679
67680LTLIBOBJS=$ac_ltlibobjs
67681
67682
67683
67684: "${CONFIG_STATUS=./config.status}"
67685ac_write_fail=0
67686ac_clean_files_save=$ac_clean_files
67687ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67688{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67689$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67690as_write_fail=0
67691cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67692#! $SHELL
67693# Generated by $as_me.
67694# Run this file to recreate the current configuration.
67695# Compiler output produced by configure, useful for debugging
67696# configure, is in config.log if it exists.
67697
67698debug=false
67699ac_cs_recheck=false
67700ac_cs_silent=false
67701
67702SHELL=\${CONFIG_SHELL-$SHELL}
67703export SHELL
67704_ASEOF
67705cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67706## -------------------- ##
67707## M4sh Initialization. ##
67708## -------------------- ##
67709
67710# Be more Bourne compatible
67711DUALCASE=1; export DUALCASE # for MKS sh
67712if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67713  emulate sh
67714  NULLCMD=:
67715  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67716  # is contrary to our usage.  Disable this feature.
67717  alias -g '${1+"$@"}'='"$@"'
67718  setopt NO_GLOB_SUBST
67719else
67720  case `(set -o) 2>/dev/null` in #(
67721  *posix*) :
67722    set -o posix ;; #(
67723  *) :
67724     ;;
67725esac
67726fi
67727
67728
67729as_nl='
67730'
67731export as_nl
67732# Printing a long string crashes Solaris 7 /usr/bin/printf.
67733as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67734as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67735as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67736# Prefer a ksh shell builtin over an external printf program on Solaris,
67737# but without wasting forks for bash or zsh.
67738if test -z "$BASH_VERSION$ZSH_VERSION" \
67739    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67740  as_echo='print -r --'
67741  as_echo_n='print -rn --'
67742elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67743  as_echo='printf %s\n'
67744  as_echo_n='printf %s'
67745else
67746  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67747    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67748    as_echo_n='/usr/ucb/echo -n'
67749  else
67750    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67751    as_echo_n_body='eval
67752      arg=$1;
67753      case $arg in #(
67754      *"$as_nl"*)
67755	expr "X$arg" : "X\\(.*\\)$as_nl";
67756	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67757      esac;
67758      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67759    '
67760    export as_echo_n_body
67761    as_echo_n='sh -c $as_echo_n_body as_echo'
67762  fi
67763  export as_echo_body
67764  as_echo='sh -c $as_echo_body as_echo'
67765fi
67766
67767# The user is always right.
67768if test "${PATH_SEPARATOR+set}" != set; then
67769  PATH_SEPARATOR=:
67770  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67771    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67772      PATH_SEPARATOR=';'
67773  }
67774fi
67775
67776
67777# IFS
67778# We need space, tab and new line, in precisely that order.  Quoting is
67779# there to prevent editors from complaining about space-tab.
67780# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67781# splitting by setting IFS to empty value.)
67782IFS=" ""	$as_nl"
67783
67784# Find who we are.  Look in the path if we contain no directory separator.
67785as_myself=
67786case $0 in #((
67787  *[\\/]* ) as_myself=$0 ;;
67788  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67789for as_dir in $PATH
67790do
67791  IFS=$as_save_IFS
67792  test -z "$as_dir" && as_dir=.
67793    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67794  done
67795IFS=$as_save_IFS
67796
67797     ;;
67798esac
67799# We did not find ourselves, most probably we were run as `sh COMMAND'
67800# in which case we are not to be found in the path.
67801if test "x$as_myself" = x; then
67802  as_myself=$0
67803fi
67804if test ! -f "$as_myself"; then
67805  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67806  exit 1
67807fi
67808
67809# Unset variables that we do not need and which cause bugs (e.g. in
67810# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67811# suppresses any "Segmentation fault" message there.  '((' could
67812# trigger a bug in pdksh 5.2.14.
67813for as_var in BASH_ENV ENV MAIL MAILPATH
67814do eval test x\${$as_var+set} = xset \
67815  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67816done
67817PS1='$ '
67818PS2='> '
67819PS4='+ '
67820
67821# NLS nuisances.
67822LC_ALL=C
67823export LC_ALL
67824LANGUAGE=C
67825export LANGUAGE
67826
67827# CDPATH.
67828(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67829
67830
67831# as_fn_error STATUS ERROR [LINENO LOG_FD]
67832# ----------------------------------------
67833# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67834# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67835# script with STATUS, using 1 if that was 0.
67836as_fn_error ()
67837{
67838  as_status=$1; test $as_status -eq 0 && as_status=1
67839  if test "$4"; then
67840    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67841    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67842  fi
67843  $as_echo "$as_me: error: $2" >&2
67844  as_fn_exit $as_status
67845} # as_fn_error
67846
67847
67848# as_fn_set_status STATUS
67849# -----------------------
67850# Set $? to STATUS, without forking.
67851as_fn_set_status ()
67852{
67853  return $1
67854} # as_fn_set_status
67855
67856# as_fn_exit STATUS
67857# -----------------
67858# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67859as_fn_exit ()
67860{
67861  set +e
67862  as_fn_set_status $1
67863  exit $1
67864} # as_fn_exit
67865
67866# as_fn_unset VAR
67867# ---------------
67868# Portably unset VAR.
67869as_fn_unset ()
67870{
67871  { eval $1=; unset $1;}
67872}
67873as_unset=as_fn_unset
67874# as_fn_append VAR VALUE
67875# ----------------------
67876# Append the text in VALUE to the end of the definition contained in VAR. Take
67877# advantage of any shell optimizations that allow amortized linear growth over
67878# repeated appends, instead of the typical quadratic growth present in naive
67879# implementations.
67880if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67881  eval 'as_fn_append ()
67882  {
67883    eval $1+=\$2
67884  }'
67885else
67886  as_fn_append ()
67887  {
67888    eval $1=\$$1\$2
67889  }
67890fi # as_fn_append
67891
67892# as_fn_arith ARG...
67893# ------------------
67894# Perform arithmetic evaluation on the ARGs, and store the result in the
67895# global $as_val. Take advantage of shells that can avoid forks. The arguments
67896# must be portable across $(()) and expr.
67897if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67898  eval 'as_fn_arith ()
67899  {
67900    as_val=$(( $* ))
67901  }'
67902else
67903  as_fn_arith ()
67904  {
67905    as_val=`expr "$@" || test $? -eq 1`
67906  }
67907fi # as_fn_arith
67908
67909
67910if expr a : '\(a\)' >/dev/null 2>&1 &&
67911   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67912  as_expr=expr
67913else
67914  as_expr=false
67915fi
67916
67917if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67918  as_basename=basename
67919else
67920  as_basename=false
67921fi
67922
67923if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67924  as_dirname=dirname
67925else
67926  as_dirname=false
67927fi
67928
67929as_me=`$as_basename -- "$0" ||
67930$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67931	 X"$0" : 'X\(//\)$' \| \
67932	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67933$as_echo X/"$0" |
67934    sed '/^.*\/\([^/][^/]*\)\/*$/{
67935	    s//\1/
67936	    q
67937	  }
67938	  /^X\/\(\/\/\)$/{
67939	    s//\1/
67940	    q
67941	  }
67942	  /^X\/\(\/\).*/{
67943	    s//\1/
67944	    q
67945	  }
67946	  s/.*/./; q'`
67947
67948# Avoid depending upon Character Ranges.
67949as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67950as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67951as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67952as_cr_digits='0123456789'
67953as_cr_alnum=$as_cr_Letters$as_cr_digits
67954
67955ECHO_C= ECHO_N= ECHO_T=
67956case `echo -n x` in #(((((
67957-n*)
67958  case `echo 'xy\c'` in
67959  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67960  xy)  ECHO_C='\c';;
67961  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67962       ECHO_T='	';;
67963  esac;;
67964*)
67965  ECHO_N='-n';;
67966esac
67967
67968rm -f conf$$ conf$$.exe conf$$.file
67969if test -d conf$$.dir; then
67970  rm -f conf$$.dir/conf$$.file
67971else
67972  rm -f conf$$.dir
67973  mkdir conf$$.dir 2>/dev/null
67974fi
67975if (echo >conf$$.file) 2>/dev/null; then
67976  if ln -s conf$$.file conf$$ 2>/dev/null; then
67977    as_ln_s='ln -s'
67978    # ... but there are two gotchas:
67979    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67980    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67981    # In both cases, we have to default to `cp -pR'.
67982    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67983      as_ln_s='cp -pR'
67984  elif ln conf$$.file conf$$ 2>/dev/null; then
67985    as_ln_s=ln
67986  else
67987    as_ln_s='cp -pR'
67988  fi
67989else
67990  as_ln_s='cp -pR'
67991fi
67992rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67993rmdir conf$$.dir 2>/dev/null
67994
67995
67996# as_fn_mkdir_p
67997# -------------
67998# Create "$as_dir" as a directory, including parents if necessary.
67999as_fn_mkdir_p ()
68000{
68001
68002  case $as_dir in #(
68003  -*) as_dir=./$as_dir;;
68004  esac
68005  test -d "$as_dir" || eval $as_mkdir_p || {
68006    as_dirs=
68007    while :; do
68008      case $as_dir in #(
68009      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68010      *) as_qdir=$as_dir;;
68011      esac
68012      as_dirs="'$as_qdir' $as_dirs"
68013      as_dir=`$as_dirname -- "$as_dir" ||
68014$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68015	 X"$as_dir" : 'X\(//\)[^/]' \| \
68016	 X"$as_dir" : 'X\(//\)$' \| \
68017	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68018$as_echo X"$as_dir" |
68019    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68020	    s//\1/
68021	    q
68022	  }
68023	  /^X\(\/\/\)[^/].*/{
68024	    s//\1/
68025	    q
68026	  }
68027	  /^X\(\/\/\)$/{
68028	    s//\1/
68029	    q
68030	  }
68031	  /^X\(\/\).*/{
68032	    s//\1/
68033	    q
68034	  }
68035	  s/.*/./; q'`
68036      test -d "$as_dir" && break
68037    done
68038    test -z "$as_dirs" || eval "mkdir $as_dirs"
68039  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68040
68041
68042} # as_fn_mkdir_p
68043if mkdir -p . 2>/dev/null; then
68044  as_mkdir_p='mkdir -p "$as_dir"'
68045else
68046  test -d ./-p && rmdir ./-p
68047  as_mkdir_p=false
68048fi
68049
68050
68051# as_fn_executable_p FILE
68052# -----------------------
68053# Test if FILE is an executable regular file.
68054as_fn_executable_p ()
68055{
68056  test -f "$1" && test -x "$1"
68057} # as_fn_executable_p
68058as_test_x='test -x'
68059as_executable_p=as_fn_executable_p
68060
68061# Sed expression to map a string onto a valid CPP name.
68062as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68063
68064# Sed expression to map a string onto a valid variable name.
68065as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68066
68067
68068exec 6>&1
68069## ----------------------------------- ##
68070## Main body of $CONFIG_STATUS script. ##
68071## ----------------------------------- ##
68072_ASEOF
68073test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68074
68075cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68076# Save the log message, to keep $0 and so on meaningful, and to
68077# report actual input values of CONFIG_FILES etc. instead of their
68078# values after options handling.
68079ac_log="
68080This file was extended by OpenJDK $as_me jdk9, which was
68081generated by GNU Autoconf 2.69.  Invocation command line was
68082
68083  CONFIG_FILES    = $CONFIG_FILES
68084  CONFIG_HEADERS  = $CONFIG_HEADERS
68085  CONFIG_LINKS    = $CONFIG_LINKS
68086  CONFIG_COMMANDS = $CONFIG_COMMANDS
68087  $ $0 $@
68088
68089on `(hostname || uname -n) 2>/dev/null | sed 1q`
68090"
68091
68092_ACEOF
68093
68094case $ac_config_files in *"
68095"*) set x $ac_config_files; shift; ac_config_files=$*;;
68096esac
68097
68098
68099
68100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68101# Files that config.status was made for.
68102config_files="$ac_config_files"
68103
68104_ACEOF
68105
68106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68107ac_cs_usage="\
68108\`$as_me' instantiates files and other configuration actions
68109from templates according to the current configuration.  Unless the files
68110and actions are specified as TAGs, all are instantiated by default.
68111
68112Usage: $0 [OPTION]... [TAG]...
68113
68114  -h, --help       print this help, then exit
68115  -V, --version    print version number and configuration settings, then exit
68116      --config     print configuration, then exit
68117  -q, --quiet, --silent
68118                   do not print progress messages
68119  -d, --debug      don't remove temporary files
68120      --recheck    update $as_me by reconfiguring in the same conditions
68121      --file=FILE[:TEMPLATE]
68122                   instantiate the configuration file FILE
68123
68124Configuration files:
68125$config_files
68126
68127Report bugs to <build-dev@openjdk.java.net>.
68128OpenJDK home page: <http://openjdk.java.net>."
68129
68130_ACEOF
68131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68132ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68133ac_cs_version="\\
68134OpenJDK config.status jdk9
68135configured by $0, generated by GNU Autoconf 2.69,
68136  with options \\"\$ac_cs_config\\"
68137
68138Copyright (C) 2012 Free Software Foundation, Inc.
68139This config.status script is free software; the Free Software Foundation
68140gives unlimited permission to copy, distribute and modify it."
68141
68142ac_pwd='$ac_pwd'
68143srcdir='$srcdir'
68144AWK='$AWK'
68145test -n "\$AWK" || AWK=awk
68146_ACEOF
68147
68148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68149# The default lists apply if the user does not specify any file.
68150ac_need_defaults=:
68151while test $# != 0
68152do
68153  case $1 in
68154  --*=?*)
68155    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68156    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68157    ac_shift=:
68158    ;;
68159  --*=)
68160    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68161    ac_optarg=
68162    ac_shift=:
68163    ;;
68164  *)
68165    ac_option=$1
68166    ac_optarg=$2
68167    ac_shift=shift
68168    ;;
68169  esac
68170
68171  case $ac_option in
68172  # Handling of the options.
68173  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68174    ac_cs_recheck=: ;;
68175  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68176    $as_echo "$ac_cs_version"; exit ;;
68177  --config | --confi | --conf | --con | --co | --c )
68178    $as_echo "$ac_cs_config"; exit ;;
68179  --debug | --debu | --deb | --de | --d | -d )
68180    debug=: ;;
68181  --file | --fil | --fi | --f )
68182    $ac_shift
68183    case $ac_optarg in
68184    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68185    '') as_fn_error $? "missing file argument" ;;
68186    esac
68187    as_fn_append CONFIG_FILES " '$ac_optarg'"
68188    ac_need_defaults=false;;
68189  --he | --h |  --help | --hel | -h )
68190    $as_echo "$ac_cs_usage"; exit ;;
68191  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68192  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68193    ac_cs_silent=: ;;
68194
68195  # This is an error.
68196  -*) as_fn_error $? "unrecognized option: \`$1'
68197Try \`$0 --help' for more information." ;;
68198
68199  *) as_fn_append ac_config_targets " $1"
68200     ac_need_defaults=false ;;
68201
68202  esac
68203  shift
68204done
68205
68206ac_configure_extra_args=
68207
68208if $ac_cs_silent; then
68209  exec 6>/dev/null
68210  ac_configure_extra_args="$ac_configure_extra_args --silent"
68211fi
68212
68213_ACEOF
68214cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68215if \$ac_cs_recheck; then
68216  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68217  shift
68218  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68219  CONFIG_SHELL='$SHELL'
68220  export CONFIG_SHELL
68221  exec "\$@"
68222fi
68223
68224_ACEOF
68225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68226exec 5>>config.log
68227{
68228  echo
68229  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68230## Running $as_me. ##
68231_ASBOX
68232  $as_echo "$ac_log"
68233} >&5
68234
68235_ACEOF
68236cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68237_ACEOF
68238
68239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68240
68241# Handling of arguments.
68242for ac_config_target in $ac_config_targets
68243do
68244  case $ac_config_target in
68245    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68246    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68247    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68248    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68249    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68250
68251  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68252  esac
68253done
68254
68255
68256# If the user did not use the arguments to specify the items to instantiate,
68257# then the envvar interface is used.  Set only those that are not.
68258# We use the long form for the default assignment because of an extremely
68259# bizarre bug on SunOS 4.1.3.
68260if $ac_need_defaults; then
68261  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68262fi
68263
68264# Have a temporary directory for convenience.  Make it in the build tree
68265# simply because there is no reason against having it here, and in addition,
68266# creating and moving files from /tmp can sometimes cause problems.
68267# Hook for its removal unless debugging.
68268# Note that there is a small window in which the directory will not be cleaned:
68269# after its creation but before its name has been assigned to `$tmp'.
68270$debug ||
68271{
68272  tmp= ac_tmp=
68273  trap 'exit_status=$?
68274  : "${ac_tmp:=$tmp}"
68275  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68276' 0
68277  trap 'as_fn_exit 1' 1 2 13 15
68278}
68279# Create a (secure) tmp directory for tmp files.
68280
68281{
68282  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68283  test -d "$tmp"
68284}  ||
68285{
68286  tmp=./conf$$-$RANDOM
68287  (umask 077 && mkdir "$tmp")
68288} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68289ac_tmp=$tmp
68290
68291# Set up the scripts for CONFIG_FILES section.
68292# No need to generate them if there are no CONFIG_FILES.
68293# This happens for instance with `./config.status config.h'.
68294if test -n "$CONFIG_FILES"; then
68295
68296
68297ac_cr=`echo X | tr X '\015'`
68298# On cygwin, bash can eat \r inside `` if the user requested igncr.
68299# But we know of no other shell where ac_cr would be empty at this
68300# point, so we can use a bashism as a fallback.
68301if test "x$ac_cr" = x; then
68302  eval ac_cr=\$\'\\r\'
68303fi
68304ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68305if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68306  ac_cs_awk_cr='\\r'
68307else
68308  ac_cs_awk_cr=$ac_cr
68309fi
68310
68311echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68312_ACEOF
68313
68314
68315{
68316  echo "cat >conf$$subs.awk <<_ACEOF" &&
68317  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68318  echo "_ACEOF"
68319} >conf$$subs.sh ||
68320  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68321ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68322ac_delim='%!_!# '
68323for ac_last_try in false false false false false :; do
68324  . ./conf$$subs.sh ||
68325    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68326
68327  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68328  if test $ac_delim_n = $ac_delim_num; then
68329    break
68330  elif $ac_last_try; then
68331    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68332  else
68333    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68334  fi
68335done
68336rm -f conf$$subs.sh
68337
68338cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68339cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68340_ACEOF
68341sed -n '
68342h
68343s/^/S["/; s/!.*/"]=/
68344p
68345g
68346s/^[^!]*!//
68347:repl
68348t repl
68349s/'"$ac_delim"'$//
68350t delim
68351:nl
68352h
68353s/\(.\{148\}\)..*/\1/
68354t more1
68355s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68356p
68357n
68358b repl
68359:more1
68360s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68361p
68362g
68363s/.\{148\}//
68364t nl
68365:delim
68366h
68367s/\(.\{148\}\)..*/\1/
68368t more2
68369s/["\\]/\\&/g; s/^/"/; s/$/"/
68370p
68371b
68372:more2
68373s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68374p
68375g
68376s/.\{148\}//
68377t delim
68378' <conf$$subs.awk | sed '
68379/^[^""]/{
68380  N
68381  s/\n//
68382}
68383' >>$CONFIG_STATUS || ac_write_fail=1
68384rm -f conf$$subs.awk
68385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68386_ACAWK
68387cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68388  for (key in S) S_is_set[key] = 1
68389  FS = ""
68390
68391}
68392{
68393  line = $ 0
68394  nfields = split(line, field, "@")
68395  substed = 0
68396  len = length(field[1])
68397  for (i = 2; i < nfields; i++) {
68398    key = field[i]
68399    keylen = length(key)
68400    if (S_is_set[key]) {
68401      value = S[key]
68402      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68403      len += length(value) + length(field[++i])
68404      substed = 1
68405    } else
68406      len += 1 + keylen
68407  }
68408
68409  print line
68410}
68411
68412_ACAWK
68413_ACEOF
68414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68415if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68416  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68417else
68418  cat
68419fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68420  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68421_ACEOF
68422
68423# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68424# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68425# trailing colons and then remove the whole line if VPATH becomes empty
68426# (actually we leave an empty line to preserve line numbers).
68427if test "x$srcdir" = x.; then
68428  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68429h
68430s///
68431s/^/:/
68432s/[	 ]*$/:/
68433s/:\$(srcdir):/:/g
68434s/:\${srcdir}:/:/g
68435s/:@srcdir@:/:/g
68436s/^:*//
68437s/:*$//
68438x
68439s/\(=[	 ]*\).*/\1/
68440G
68441s/\n//
68442s/^[^=]*=[	 ]*$//
68443}'
68444fi
68445
68446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68447fi # test -n "$CONFIG_FILES"
68448
68449
68450eval set X "  :F $CONFIG_FILES      "
68451shift
68452for ac_tag
68453do
68454  case $ac_tag in
68455  :[FHLC]) ac_mode=$ac_tag; continue;;
68456  esac
68457  case $ac_mode$ac_tag in
68458  :[FHL]*:*);;
68459  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68460  :[FH]-) ac_tag=-:-;;
68461  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68462  esac
68463  ac_save_IFS=$IFS
68464  IFS=:
68465  set x $ac_tag
68466  IFS=$ac_save_IFS
68467  shift
68468  ac_file=$1
68469  shift
68470
68471  case $ac_mode in
68472  :L) ac_source=$1;;
68473  :[FH])
68474    ac_file_inputs=
68475    for ac_f
68476    do
68477      case $ac_f in
68478      -) ac_f="$ac_tmp/stdin";;
68479      *) # Look for the file first in the build tree, then in the source tree
68480	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68481	 # because $ac_f cannot contain `:'.
68482	 test -f "$ac_f" ||
68483	   case $ac_f in
68484	   [\\/$]*) false;;
68485	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68486	   esac ||
68487	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68488      esac
68489      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68490      as_fn_append ac_file_inputs " '$ac_f'"
68491    done
68492
68493    # Let's still pretend it is `configure' which instantiates (i.e., don't
68494    # use $as_me), people would be surprised to read:
68495    #    /* config.h.  Generated by config.status.  */
68496    configure_input='Generated from '`
68497	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68498	`' by configure.'
68499    if test x"$ac_file" != x-; then
68500      configure_input="$ac_file.  $configure_input"
68501      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68502$as_echo "$as_me: creating $ac_file" >&6;}
68503    fi
68504    # Neutralize special characters interpreted by sed in replacement strings.
68505    case $configure_input in #(
68506    *\&* | *\|* | *\\* )
68507       ac_sed_conf_input=`$as_echo "$configure_input" |
68508       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68509    *) ac_sed_conf_input=$configure_input;;
68510    esac
68511
68512    case $ac_tag in
68513    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68514      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68515    esac
68516    ;;
68517  esac
68518
68519  ac_dir=`$as_dirname -- "$ac_file" ||
68520$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68521	 X"$ac_file" : 'X\(//\)[^/]' \| \
68522	 X"$ac_file" : 'X\(//\)$' \| \
68523	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68524$as_echo X"$ac_file" |
68525    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68526	    s//\1/
68527	    q
68528	  }
68529	  /^X\(\/\/\)[^/].*/{
68530	    s//\1/
68531	    q
68532	  }
68533	  /^X\(\/\/\)$/{
68534	    s//\1/
68535	    q
68536	  }
68537	  /^X\(\/\).*/{
68538	    s//\1/
68539	    q
68540	  }
68541	  s/.*/./; q'`
68542  as_dir="$ac_dir"; as_fn_mkdir_p
68543  ac_builddir=.
68544
68545case "$ac_dir" in
68546.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68547*)
68548  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68549  # A ".." for each directory in $ac_dir_suffix.
68550  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68551  case $ac_top_builddir_sub in
68552  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68553  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68554  esac ;;
68555esac
68556ac_abs_top_builddir=$ac_pwd
68557ac_abs_builddir=$ac_pwd$ac_dir_suffix
68558# for backward compatibility:
68559ac_top_builddir=$ac_top_build_prefix
68560
68561case $srcdir in
68562  .)  # We are building in place.
68563    ac_srcdir=.
68564    ac_top_srcdir=$ac_top_builddir_sub
68565    ac_abs_top_srcdir=$ac_pwd ;;
68566  [\\/]* | ?:[\\/]* )  # Absolute name.
68567    ac_srcdir=$srcdir$ac_dir_suffix;
68568    ac_top_srcdir=$srcdir
68569    ac_abs_top_srcdir=$srcdir ;;
68570  *) # Relative name.
68571    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68572    ac_top_srcdir=$ac_top_build_prefix$srcdir
68573    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68574esac
68575ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68576
68577
68578  case $ac_mode in
68579  :F)
68580  #
68581  # CONFIG_FILE
68582  #
68583
68584_ACEOF
68585
68586cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68587# If the template does not know about datarootdir, expand it.
68588# FIXME: This hack should be removed a few years after 2.60.
68589ac_datarootdir_hack=; ac_datarootdir_seen=
68590ac_sed_dataroot='
68591/datarootdir/ {
68592  p
68593  q
68594}
68595/@datadir@/p
68596/@docdir@/p
68597/@infodir@/p
68598/@localedir@/p
68599/@mandir@/p'
68600case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68601*datarootdir*) ac_datarootdir_seen=yes;;
68602*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68603  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68604$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68605_ACEOF
68606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68607  ac_datarootdir_hack='
68608  s&@datadir@&$datadir&g
68609  s&@docdir@&$docdir&g
68610  s&@infodir@&$infodir&g
68611  s&@localedir@&$localedir&g
68612  s&@mandir@&$mandir&g
68613  s&\\\${datarootdir}&$datarootdir&g' ;;
68614esac
68615_ACEOF
68616
68617# Neutralize VPATH when `$srcdir' = `.'.
68618# Shell code in configure.ac might set extrasub.
68619# FIXME: do we really want to maintain this feature?
68620cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68621ac_sed_extra="$ac_vpsub
68622$extrasub
68623_ACEOF
68624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68625:t
68626/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68627s|@configure_input@|$ac_sed_conf_input|;t t
68628s&@top_builddir@&$ac_top_builddir_sub&;t t
68629s&@top_build_prefix@&$ac_top_build_prefix&;t t
68630s&@srcdir@&$ac_srcdir&;t t
68631s&@abs_srcdir@&$ac_abs_srcdir&;t t
68632s&@top_srcdir@&$ac_top_srcdir&;t t
68633s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68634s&@builddir@&$ac_builddir&;t t
68635s&@abs_builddir@&$ac_abs_builddir&;t t
68636s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68637$ac_datarootdir_hack
68638"
68639eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68640  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68641
68642test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68643  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68644  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68645      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68646  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68647which seems to be undefined.  Please make sure it is defined" >&5
68648$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68649which seems to be undefined.  Please make sure it is defined" >&2;}
68650
68651  rm -f "$ac_tmp/stdin"
68652  case $ac_file in
68653  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68654  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68655  esac \
68656  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68657 ;;
68658
68659
68660
68661  esac
68662
68663done # for ac_tag
68664
68665
68666as_fn_exit 0
68667_ACEOF
68668ac_clean_files=$ac_clean_files_save
68669
68670test $ac_write_fail = 0 ||
68671  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68672
68673
68674# configure is writing to config.log, and then calls config.status.
68675# config.status does its own redirection, appending to config.log.
68676# Unfortunately, on DOS this fails, as config.log is still kept open
68677# by configure, so config.status won't be able to write to it; its
68678# output is simply discarded.  So we exec the FD to /dev/null,
68679# effectively closing config.log, so it can be properly (re)opened and
68680# appended to by config.status.  When coming back to configure, we
68681# need to make the FD available again.
68682if test "$no_create" != yes; then
68683  ac_cs_success=:
68684  ac_config_status_args=
68685  test "$silent" = yes &&
68686    ac_config_status_args="$ac_config_status_args --quiet"
68687  exec 5>/dev/null
68688  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68689  exec 5>>config.log
68690  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68691  # would make configure fail if this is the last instruction.
68692  $ac_cs_success || as_fn_exit 1
68693fi
68694if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68695  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68696$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68697fi
68698
68699
68700# After AC_OUTPUT, we need to do final work
68701
68702
68703  # Try to move config.log (generated by autoconf) to the configure-support directory.
68704  if test -e ./config.log; then
68705    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68706  fi
68707
68708  # Rotate our log file (configure.log)
68709  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68710    $RM -f "$OUTPUT_ROOT/configure.log.old"
68711  fi
68712  if test -e "$OUTPUT_ROOT/configure.log"; then
68713    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68714  fi
68715
68716  # Move configure.log from current directory to the build output root
68717  if test -e ./configure.log; then
68718    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68719  fi
68720
68721  # Make the compare script executable
68722  $CHMOD +x $OUTPUT_ROOT/compare.sh
68723
68724
68725# Finally output some useful information to the user
68726
68727  # Finally output some useful information to the user
68728
68729  printf "\n"
68730  printf "====================================================\n"
68731  if test "x$no_create" != "xyes"; then
68732    if test "x$IS_RECONFIGURE" != "xyes"; then
68733      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68734    else
68735      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68736    fi
68737  else
68738    if test "x$IS_RECONFIGURE" != "xyes"; then
68739      printf "A configuration has been successfully checked but not created\n"
68740    else
68741      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68742    fi
68743  fi
68744  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68745    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68746  else
68747    printf "using default settings.\n"
68748  fi
68749
68750  printf "\n"
68751  printf "Configuration summary:\n"
68752  printf "* Debug level:    $DEBUG_LEVEL\n"
68753  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68754  printf "* JDK variant:    $JDK_VARIANT\n"
68755  printf "* JVM variants:   $JVM_VARIANTS\n"
68756  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68757  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68758
68759  printf "\n"
68760  printf "Tools summary:\n"
68761  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68762    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68763  fi
68764  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68765  if test "x$TOOLCHAIN_VERSION" != "x"; then
68766    print_version=" $TOOLCHAIN_VERSION"
68767  fi
68768  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68769  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68770  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68771
68772  printf "\n"
68773  printf "Build performance summary:\n"
68774  printf "* Cores to use:   $JOBS\n"
68775  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68776  if test "x$CCACHE_STATUS" != "x"; then
68777    printf "* ccache status:  $CCACHE_STATUS\n"
68778  fi
68779  printf "\n"
68780
68781  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68782    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68783    printf "will result in longer build times.\n"
68784    printf "\n"
68785  fi
68786
68787  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68788    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68789    printf "These are not respected, and will be ignored. It is recommended\n"
68790    printf "that you clean your environment. The following variables are set:\n"
68791    printf "$FOUND_ALT_VARIABLES\n"
68792    printf "\n"
68793  fi
68794
68795  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68796    printf "WARNING: Your build output directory is not on a local disk.\n"
68797    printf "This will severely degrade build performance!\n"
68798    printf "It is recommended that you create an output directory on a local disk,\n"
68799    printf "and run the configure script again from that directory.\n"
68800    printf "\n"
68801  fi
68802
68803  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68804    printf "WARNING: The result of this configuration has overridden an older\n"
68805    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68806    printf "proper build. Failure to do so might result in strange build problems.\n"
68807    printf "\n"
68808  fi
68809
68810  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68811    printf "WARNING: The result of this configuration was not saved.\n"
68812    printf "You should run without '--no-create | -n' to create the configuration.\n"
68813    printf "\n"
68814  fi
68815
68816
68817
68818  # Locate config.log.
68819  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68820    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68821  elif test -e "./config.log"; then
68822    CONFIG_LOG_PATH="."
68823  fi
68824
68825  if test -e "$CONFIG_LOG_PATH/config.log"; then
68826    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68827    if test $? -eq 0; then
68828      printf "The following warnings were produced. Repeated here for convenience:\n"
68829      # We must quote sed expression (using []) to stop m4 from eating the [].
68830      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68831      printf "\n"
68832    fi
68833  fi
68834
68835